[llvm-bugs] [Bug 29142] New: clang-cl treats different extern "C" declarations as redeclarations
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 25 12:26:17 PDT 2016
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: unassignedclangbugs at nondot.org
Reporter: 6yearold at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160825/243a183a/attachment.html>
More information about the llvm-bugs
mailing list