[LLVMbugs] [Bug 6216] New: Parse failure with struct definition in __builtin_offset

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Feb 2 16:47:58 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6216

           Summary: Parse failure with struct definition in __builtin_offset
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dgregor at apple.com
                CC: llvmbugs at cs.uiuc.edu


blackthorn:clang dgregor$ cat t.c
int f() { return __builtin_offsetof(struct { char c; int i; }, i); }
blackthorn:clang dgregor$ gcc -fsyntax-only t.c
blackthorn:clang dgregor$ clang -fsyntax-only t.c
t.c:1:62: error: expected ';' after struct
int f() { return __builtin_offsetof(struct { char c; int i; }, i); }
                                                             ^
                                                             ;
t.c:1:62: error: expected ','
int f() { return __builtin_offsetof(struct { char c; int i; }, i); }
                                                             ^
                                                             ,
t.c:1:62: error: expected expression
t.c:1:65: error: expected expression
int f() { return __builtin_offsetof(struct { char c; int i; }, i); }
                                                                ^
4 diagnostics generated.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list