https://llvm.org/bugs/show_bug.cgi?id=29142
Bug ID: 29142
Summary: clang-cl treats different extern "C" declarations as
redeclarations
Product: clang
Version: 3.9
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
The code
namespace acommon {
struct ErrorInfo;
extern "C" __declspec(dllexport) const ErrorInfo * const aerror_other;
}
extern "C" {
struct AspellErrorInfo {
const struct AspellErrorInfo * isa;
const char * mesg;
unsigned int num_parms;
const char * parms[3];
};
typedef struct AspellErrorInfo AspellErrorInfo;
extern const struct AspellErrorInfo * const aerror_other;
}
int main()
{
return 0;
}
compiles with cl.exe, but fails with clang-cl.exe:
tst.cpp(25,45): error: redeclaration of 'aerror_other' with a different type:
'const struct AspellErrorInfo *const' vs 'const acommon::ErrorInfo *const'
extern const struct AspellErrorInfo * const aerror_other;
^
tst.cpp(6,59): note: previous declaration is here
extern "C" __declspec(dllexport) const ErrorInfo * const aerror_other;
^
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs