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

            Bug ID: 15511
           Summary: alignof(function type) should be 1, as per gcc
                    extension
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Currently clang implements alignof(function type) to be 4. 
(ASTContext.cpp:1328)

Unfortunately, this differs from the actual gcc behavior.

$ cat /tmp/zz.cc
static_assert(alignof(void(void)) == 1, "alignof(function type) should be 1");
$ g++ -fsyntax-only -std=c++11 /tmp/zz.cc
$

How do we fix this?  The obvious fix is trivial, but consequences could be
subtle, so I filed a bug.

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