[LLVMbugs] [Bug 15853] New: __has_attribute does not parse C++11 namespaced attributes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 26 08:59:47 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15853
Bug ID: 15853
Summary: __has_attribute does not parse C++11 namespaced
attributes
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: arcata at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Testing for a namespaced attribute with __has_attribute gives a parse error:
////
#if __has_attribute(clang::fallthrough)
#warning "clang::fallthrough supported"
#endif
////
----
foo.cpp:1:5: error: builtin feature check macro requires a parenthesized
identifier
#if __has_attribute(clang::fallthrough)
^
foo.cpp:1:26: error: invalid token at start of a preprocessor expression
#if __has_attribute(clang::fallthrough)
----
Testing with the un-namespaced name works:
////
#if __has_attribute(fallthrough)
#warning "fallthrough supported...somewhere"
#endif
////
----
#if __has_attribute(fallthrough)
#warning "fallthrough supported...somewhere"
#endif
----
--
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/20130426/ebe421f5/attachment.html>
More information about the llvm-bugs
mailing list