[cfe-dev] __has_attribute in system headers
Tijl Coosemans
tijl at freebsd.org
Wed Feb 22 02:49:21 PST 2012
Hi,
Currently only __has_attribute(attr) seems to work but not
__has_attribute(__attr__), which means it cannot safely be used in
system headers because applications may define attr. The same goes for
things like __has_extension(attribute_deprecated_with_message).
Should support for these alternative spellings be added?
PS: I also noticed __has_attribute(const) produces an error:
test.c:3:5: error: builtin feature check macro requires a parenthesized identifier
#if __has_attribute(const)
^
test.c:3:26: error: expected end of line in preprocessor expression
#if __has_attribute(const)
^
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120222/73f9d3a8/attachment.sig>
More information about the cfe-dev
mailing list