Hi Tatsuo,
> In addition you see #define INITIAL in gram.h?
Yes -- here gram.h has both the enum and the macro:
enum yytokentype { ...; INITIAL = 472; ... };
#define INITIAL 472
The file header says "made by GNU Bison 2.3". That's macOS's system
bison, and it still emits the #define token macros, so INITIAL collides
with flex's #define INITIAL 0 in the scanner. Your 3.8.2 emits only the
enum, which is why you don't see it. 2.3 is the minimum the tree still
accepts (meson.build asks for >= 2.3) and it's what macOS ships, so a
build on that floor hits the warning.
> probably we should consider change "INITIAL" to something like
> "INITIAL_P" to avoid the collision?
That matches the _P convention already used for NULL_P / TRUE_P / IN_P,
so it seemed worth trying. I've attached a small patch that renames the
token to INITIAL_P in kwlist.h and gram.y; the SQL keyword stays
"initial". With it applied, both -Wmacro-redefined warnings are gone and
the build is warning-clean here, still on bison 2.3. The patch is on top
of v49 and named nocfbot-*.txt so cfbot doesn't pick it up. No rush on
this -- it can wait for whenever a cleanup pass fits. Please fold it in
or adjust as you see fit.
Regards,
Seongjun