[Bug preprocessor/36320] New: Required diagnosis of syntax error missed

neil at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat May 24 10:56:00 GMT 2008


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



More information about the Gcc-bugs mailing list