[LLVMbugs] [Bug 18126] New: [ms-abi] Clang doesn't treat declspec on record declarations correctly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 3 12:51:06 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=18126
Bug ID: 18126
Summary: [ms-abi] Clang doesn't treat declspec on record
declarations correctly
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: whunt at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
cl appears to ignore __declspec(align) on record declarations and clang-cl does
not.
cl allows conflicting __declspec(dllimport/export) attributes on the
declaration and definition with the definition attribute taking precedence.
clang warns on __declspec(dllexport) either place:
warning: 'dllexport' attribute only applies to variables and functions
[-Wignored-attributes]
In my test:
struct S;
struct __declspec(dllimport) S {
static void f() {}
} a;
int main() {
S a;
a.f();
printf("align : %d %d\n", __alignof(S), __alignof(a));
}
dllimport seems to have no impact whatsoever in clang. In cl, dllimport
suppresses export of f.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131203/be8a2b6e/attachment.html>
More information about the llvm-bugs
mailing list