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

Reply via email to