After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761843 - gmacros.h is testing attributes with __has_feature (when compiling with clang)
gmacros.h is testing attributes with __has_feature (when compiling with clang)
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-02-10 22:08 UTC by Paolo Bonzini
Modified: 2016-02-10 22:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paolo Bonzini 2016-02-10 22:08:33 UTC
The right pseudo-macro to use to test availability of GCC-style attribute is __has_attribute.

https://mail.gnome.org/archives/commits-list/2015-March/msg08059.html changed this to __has_feature, but the right fix would have been to add

#ifndef __has_attribute
#define __has_attribute(x) 0
#endif

before the first usage.
Comment 1 Emmanuele Bassi (:ebassi) 2016-02-10 22:40:12 UTC
Thanks, fixed in master with commit 1964a8726b06237f751b2aa8b2a3fcd2ce555c44