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

           Summary: Doesn't allow incomplete type in member access
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Clang does not conform to the C Standard, it appears (GCC doesn't either):

struct A {
  int a;
  int x : (sizeof ((struct A*)0)->a * 8);
};

C doesn't forbid the left operand to be a pointer to incomplete type. The only
requirement it has is that it's a pointer to a structure type, and that the
right operand shall name a member of that structure. Both conditions are
satisfied (C99: 6.5.2.3p2 and 6.2.1p7).

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to