This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc 2.95.2 - cpp incorrectly parses an ignored group


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]