This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/36320] New: Required diagnosis of syntax error missed
- From: "neil at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2008 10:55:37 -0000
- Subject: [Bug preprocessor/36320] New: Required diagnosis of syntax error missed
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The syntax error in #elif below is not diagnosed with (say) --std=c99
-pedantic-errors.
int z;
#if 1
#elif
#endif
Syntax is:
elif-group:
# elif constant-expression new-line groupopt
and constant expression cannot be empty. The syntax relaxation of 6.10p4 does
not apply as the group that the #elif lies in (beginning with the #if) is not
skipped.
--
Summary: Required diagnosis of syntax error missed
Product: gcc
Version: 4.1.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neil at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36320