ODR violation in cm{CommandArgument,Fortran}Lexer.cxx
Compiling cmake 1.17.2 with gcc 9.3.1 20200506 and linking with ld.bfd 2.34.50.20200519 prints:
[2/46] Linking CXX executable bin/cmake
../Source/LexerParser/cmFortranLexer.cxx:869:8: warning: type ‘struct yyguts_t’ violates the C++ One Definition Rule [-Wodr]
869 | struct yyguts_t
| ^
../Source/LexerParser/cmCommandArgumentLexer.cxx:697:8: note: a different type is defined in another translation unit
697 | struct yyguts_t
| ^
../Source/LexerParser/cmFortranLexer.cxx:873:19: note: the first difference of corresponding definitions is field ‘yyextra_r’
873 | YY_EXTRA_TYPE yyextra_r;
| ^
../Source/LexerParser/cmCommandArgumentLexer.cxx:701:19: note: a field of same name but different type is defined in another translation unit
701 | YY_EXTRA_TYPE yyextra_r;
| ^
../Source/LexerParser/cmFortranLexer.cxx:869:8: note: type name ‘cmFortranParser_s’ should match type name ‘cmCommandArgumentParserHelper’
869 | struct yyguts_t
| ^
../Source/cmCommandArgumentParserHelper.h:13:7: note: the incompatible type is defined here
13 | class cmCommandArgumentParserHelper
| ^
I use flex 2.6.4 (released 2017)
Edited by Brad King