https://llvm.org/bugs/show_bug.cgi?id=27066
Bug ID: 27066 Summary: [ms] __declspec(dllexport) causes redefinition with same mangled name as another definition Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: andrey.kules...@intel.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified !- This problem is related to dllexport. MSVC compiles sample described below. Note that even if clang's behavior is correct, compiler's diagnostic is not usable: error: definition with same mangled name as another definition class A {}; (why class A is redefined?) note: previous definition is here: <no line> (where is the line with the previous definition?) -! ==========Small Reproducer============== typedef struct _GUID { int i; } ID; template <const ID* piid> class A {}; struct __declspec(uuid("{00000000-0000-0000-c000-000000000046}")) S1 {}; struct __declspec(uuid("{00000000-0000-0000-c000-000000000046}")) S2 {}; struct __declspec(dllexport) C1 : public A <&__uuidof(S1)> {}; struct __declspec(dllexport) C2 : public A<&__uuidof(S2)> {}; ==============Error===================== >>>clang: test.cpp(4,7) : error: definition with same mangled name as another definition class A {}; ^ test.cpp(4,7) : note: previous definition is here 1 error generated. >>>MSVC: Creating library test.lib and object test.exp Andrey Kuleshov ====== Software Engineer Intel Compiler Team -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs