https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121386
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That looks like a bug in gengtype-lex.l to me. At least the %{ #ifdef HOST_GENERATOR_FILE #include "config.h" #define GENERATOR_FILE 1 #else #include "bconfig.h" #endif #include "system.h" part shouldn't be in %{ ... } but %top{ ... } IMHO, config.h or bconfig.h needs to be the first header, followed by system.h. The reason it works on most other OSes is that e.g. glibc stdint.h has just # if __WORDSIZE == 64 # define SIZE_MAX (18446744073709551615UL) # else # if __WORDSIZE32_SIZE_ULONG # define SIZE_MAX (4294967295UL) # else # define SIZE_MAX (4294967295U) # endif # endif and not like OpenBSD #ifndef SIZE_MAX #define SIZE_MAX UINTPTR_MAX #endif As stdint.h is a system header, warning about redefinition from the flex provided #define SIZE_MAX (~(size_t)0) to the above ones isn't emitted.