http://llvm.org/bugs/show_bug.cgi?id=14564
Bug #: 14564
Summary: alignas of empty base classes gives incorrect
alignment.
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
#include <iostream>
struct alignas(8) foo {
};
struct adena : foo {
};
struct alignas(8) bar {
char a;
};
struct pie : bar {
};
int main() {
std::cout << alignof(foo) << "\n";
std::cout << alignof(adena) << "\n";
std::cout << alignof(bar) << "\n";
std::cout << alignof(pie) << "\n";
}
clang prints:
8
1
8
8
gcc (using __attribute__((aligned(8)))) prints:
8
8
8
8
--
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