<< Back to previous view

[PCC-377] __builtin_offset finds a syntax error with a field named same as a typedef Created: 01/Sep/11  Updated: 03/Sep/11

Status: Resolved
Project: pcc
Component/s: Common code, pcc backend
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Iain Hibbert Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: NetBSD/i386

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 :)

Comment by Anders Magnusson [ 03/Sep/11 10:08 AM ]
Fixed now. member names without context causes extra checks in scan.l to avoid errors.
Generated at Tue Oct 17 16:58:59 CEST 2017 using JIRA Enterprise Edition, Version: 3.13.1-#333.