Re: [C PATCH] Fix parsing when using declarations in for loops and typedefs (PR c/67784)

2015-11-12 Thread Joseph Myers
On Thu, 12 Nov 2015, Marek Polacek wrote: > As explained in the PR, the issue here was that we were treating a TYPENAME > wrongly as an ID. That happened because we were using information from the > wrong scope when parsing a token after an else clause. I.e. in fn1 in the > attached testcase we

[C PATCH] Fix parsing when using declarations in for loops and typedefs (PR c/67784)

2015-11-12 Thread Marek Polacek
As explained in the PR, the issue here was that we were treating a TYPENAME wrongly as an ID. That happened because we were using information from the wrong scope when parsing a token after an else clause. I.e. in fn1 in the attached testcase we need to examine the token after "if (1);" to see if