This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95.2 - cpp incorrectly parses an ignored group
- To: gcc bug reports <gcc-bugs at gcc dot gnu dot org>
- Subject: gcc 2.95.2 - cpp incorrectly parses an ignored group
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Wed, 04 Oct 2000 13:40:41 -0600
- CC: Michael Yoder <yoder at roguewave dot com>
- Organization: Rogue Wave Software, Inc.
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