[Bug c++/32718] New: g++ looping on bad __label__ declaration

tony at rogvall dot se gcc-bugzilla@gcc.gnu.org
Tue Jul 10 13:44:00 GMT 2007


Following standalone code will make the compiler (g++) loop:

void test()
{
    __label__ 0;
}

command line: "g++ lbl.c".  However "gcc lbl.c" works (with ONE error report) 
!

output with g++ will be:

lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
lbl.c:5: error: expected `,' before numeric constant
lbl.c:5: error: expected identifier before numeric constant
...


output with gcc:

gcc lbl.c
lbl.c: In function 'test':
lbl.c:5: error: parse error before numeric constant


-- 
           Summary: g++ looping on bad __label__ declaration
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tony at rogvall dot se
 GCC build triplet: i686-apple-darwin8
  GCC host triplet: i686-apple-darwin8
GCC target triplet: i686-apple-darwin8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32718



More information about the Gcc-bugs mailing list