http://llvm.org/bugs/show_bug.cgi?id=16683
Bug ID: 16683
Summary: Clang doesn't support
__attribute__((__externally_visible__))
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Clang impersonates GCC 4.2.1, but doesn't support
__attribute__((__externally_visible__)). This means the following code
/* __externally_visible__ was introduced in 4.1.0 */
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 401)
__attribute__((__externally_visible__))
#endif
int x;
gets a warning emitted:
x.cpp:3:16: warning: unknown attribute '__externally_visible__' ignored
[-Wattributes]
__attribute__((__externally_visible__))
^
That's unexpected, because the #if is meant to stop passing the attribute to a
compiler that doesn't support it. However, Clang lies and claims it's GCC
4.2.1, which does support this attribute. Of course, there's an obvious
workaround, but still.
Ideally, Clang should support it with proper semantics, i.e. running an
internalize pass should leave __externally_visible__ entities externally
visible.
--
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