Take the following code:
@implementation A
+B
+C {} 
 @end 

With 4.0, we got:
t.m: In function ‘+[A B]’:
t.m:3: error: syntax error before ‘+’ token

But with 4.1 we get:
t.m: In function ‘+[A B]’:
t.m:3: error: expected ‘{’ before ‘+’ token
t.m: At top level:
t.m:3: error: redefinition of parameter ‘self’
t.m:3: error: previous definition of ‘self’ was here
t.m:3: error: redefinition of parameter ‘_cmd’
t.m:3: error: previous definition of ‘_cmd’ was here

The error messages about self and _cmd are not really needed (yes they are 
correct really but we should 
be able to do better with error recovery)

-- 
           Summary: [4.1 Regression] werid error message after a parse error
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: objc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to