gcc 2.95.2 - cpp incorrectly parses an ignored group
Martin Sebor
sebor@roguewave.com
Wed Oct 4 12:37:00 GMT 2000
This fails to compile with 2.95.2 (gcc-20001002 gives the same
diagnostic). The preprocessor should skip the entire group between #if 0
and the ending #endif (other directives should only be processed so as
to recognize their name, no other parsing
should be done). See 6.8.1 of C89 and 6.10.1, p5 of C99.
Regards
Martin
$ cat test.cpp
#if 0
#error '
#endif
$ g++ -c test.cpp
test.cpp:4: unterminated string or character constant
More information about the Gcc-bugs
mailing list