Issue Details (XML | Word | Printable)

Key: PCC-263
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Chris Spiegel
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Mishandled scope in for statement

Created: 26/Feb/11 07:25 PM   Updated: 01/Mar/11 07:10 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Environment: pcc 1.0.0 Beta 20110226 on Linux

 Description  « Hide
The following code:

for(int i = 0; ;);
for(int i = 0; ;);

Yields: redeclaration of i

If this is changed to:
for(int i = 0; ;);
for(i = 0; ;);

The code compiles (no other declaration of i is in scope).

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 01/Mar/11 07:10 PM
Fixed now, thanks. The symbol table were only cleared after a } so if there only was one statement it would remain.