From: H. P. A. <hp...@zy...> - 2016-10-14 22:03:19
|
On 10/14/16 02:21, Daniel Lundqvist wrote: >> >> __has_attribute() sounds promising... do we have a presence test for that? > > Yes, if __has_attribute is defined. Same mechanism for __has_feature. > See http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute and http://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension for > typical usage. > Looks like gcc has this feature too in gcc 5+, so for newer attributes it would totally be the thing to use. I have checked in a patch to that effect. -hpa |