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]
Other format: [Raw text]

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


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


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