http://llvm.org/bugs/show_bug.cgi?id=17540
Bug ID: 17540
Summary: Language linkage bleeding to between proper overloads
when using long type
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Keywords: compile-fail
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Clang erroneously associates extern "C++" to a function previously declared
extern "C".
file.cpp:
extern "C" long _InterlockedIncrement(long volatile *_Addend);
extern "C++" unsigned long _InterlockedIncrement(unsigned long volatile
*Addend);
extern "C" long _InterlockedIncrement(long volatile *_Addend);
Should not issue any diagnostics but gives the following instead:
file.cpp:3:17: error: declaration of '_InterlockedIncrement' has a different
language linkage
extern "C" long _InterlockedIncrement(long volatile *_Addend);
^
file.cpp:1:17: note: previous declaration is here
extern "C" long _InterlockedIncrement(long volatile *_Addend);
Clearly the diagnostic is misleading at best. It appears that the extern "C++"
line is actually stomping the linkage of the previous extern "C" line, despite
the "C++" line being a proper overload.
I believe the bug is specific to "long"/"unsigned long" and does not occur with
other tested types(int, short, __int64).
--
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