E.g. for the following code
int i = 1'000;
We get a "warning: missing terminating ' character" from the preprocessor. Apparently this always happens when the number of ' in a line is odd. Apparently the preprocessor lexer in libcpp/lex.c tries to lex part of the number as a character literal.
The fix would probably be to implement handling of digit separators in preprocessor number lexing. I don't know if that is worth it, though. Maybe we instead want to go for a new preprocessor (e.g. one derived from current GCC or LLVM) that already supports digit separators (and other newer C features).
The preprocessor in GCC 12.1 has support for digit separators, so by rebasing our fork on that one, this issues can be fixed.
The preprocessor has been updated to cpp from gcc 12.1.0. [r13690], fixing this issue as suggested.
Related
Commit: [r13690]