Re: [PATCH] Fix c_parser_for_statement for ObjC (PR objc/69844)

2016-02-23 Thread Jakub Jelinek
On Tue, Feb 23, 2016 at 08:24:06PM +0100, Marek Polacek wrote: > > --- gcc/c/c-parser.c.jj 2016-02-16 16:29:54.0 +0100 > > +++ gcc/c/c-parser.c2016-02-18 17:36:55.025067859 +0100 > > @@ -5887,12 +5887,27 @@ c_parser_for_statement (c_parser *parser > > { > >c_token *

Re: [PATCH] Fix c_parser_for_statement for ObjC (PR objc/69844)

2016-02-23 Thread Marek Polacek
On Thu, Feb 18, 2016 at 10:39:02PM +0100, Jakub Jelinek wrote: > Hi! > > Here is an attempt to fix up the token reclassification after for statement, > where we lexed the next token with the declaration from for in scope and > need to undo that if it wasn't else. > > If token->id_kind is C_ID_CLA

Re: [PATCH] Fix c_parser_for_statement for ObjC (PR objc/69844)

2016-02-22 Thread Jeff Law
On 02/18/2016 02:39 PM, Jakub Jelinek wrote: Hi! Here is an attempt to fix up the token reclassification after for statement, where we lexed the next token with the declaration from for in scope and need to undo that if it wasn't else. If token->id_kind is C_ID_CLASSNAME (ObjC only), then token

[PATCH] Fix c_parser_for_statement for ObjC (PR objc/69844)

2016-02-18 Thread Jakub Jelinek
Hi! Here is an attempt to fix up the token reclassification after for statement, where we lexed the next token with the declaration from for in scope and need to undo that if it wasn't else. If token->id_kind is C_ID_CLASSNAME (ObjC only), then token->value has changed already, but in that case I