Issue Details (XML | Word | Printable)

Key: PCC-377
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0

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

__builtin_offset finds a syntax error with a field named same as a typedef

Created: 01/Sep/11 09:51 PM   Updated: 03/Sep/11 10:08 AM
Component/s: Common code, pcc backend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386

 Description  « Hide
The following code

typedef int foo;

struct foo {
        foo foo;
        int bar;

int bar = __builtin_offsetof(struct foo, foo);

when compiled with pcc -c, fails with a syntax error

test.c, line 8: syntax error

(I don't know if this is related to PCC-264, maybe :)

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson made changes - 03/Sep/11 10:07 AM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson added a comment - 03/Sep/11 10:08 AM
Fixed now. member names without context causes extra checks in scan.l to avoid errors.

Anders Magnusson made changes - 03/Sep/11 10:08 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]