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

            Bug ID: 19999
           Summary: fail to respect __attribute__((aligned)) on typedef
                    used as type of field
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

typedef __attribute__((aligned(32))) char &cr;
  struct S { char a; cr q; };
  static_assert(alignof(cr) == 1, "");
  static_assert(alignof(S::q) == 1, "");
  static_assert(sizeof(S) == 64, "");

All of those static_asserts should pass, but currently the last one fails. We
apparently don't pick up 'aligned' attributes on typedefs when performing
record layout.

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