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 776562 - Add Intel C Compiler support for G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Add Intel C Compiler support for G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-12-29 02:45 UTC by Nirbheek Chauhan
Modified: 2017-10-11 08:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix deprecations support with ICC (1.12 KB, patch)
2016-12-29 02:45 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2016-12-29 02:45:01 UTC
Created attachment 342563 [details] [review]
Fix deprecations support with ICC

The Intel C Compiler (ICC) defines __GNUC__ and various other macros that would identify it as GCC because it supports a wide variety of GNU extensions (such as __attribute(cleanup), which means ICC supports g_autoptr), but it has its own mechanism for disabling deprecation warnings enabled with __attribute__((__deprecated__)). Use that instead.
Comment 1 Allison Karlitskaya (desrt) 2017-01-27 15:13:21 UTC
Weak -1 from me on account of the rationale in https://wiki.gnome.org/Projects/GLib/SupportedPlatforms.  I want to see less untested cruft from compilers that nobody is using on a regular basis.

Also: if ICC is claiming to be GCC, then it ought to do a better job of acting like it.  This is certainly an ICC bug.
Comment 2 Nirbheek Chauhan 2017-01-27 15:31:19 UTC
ICC has to claim to be GCC for the same reason that Clang does that -- they have no choice if they want to be even remotely usable to ordinary people. Almost every Linux project out there uses GCC-specific features. The only people who can afford not to are those that predate GCC, namely MSVC and Sun Studio.

However, I don't think it is reasonable to expect ICC to add support for every GCC-specific feature out there just like Clang is not expected to, and I think "GCC diagnostic" is one such feature.

This is a quality-of-life change, so it's not a deal-breaking problem if it's not merged, but on the other hand it's the sort of change that doesn't increase maintenance burden too much, so... :)
Comment 3 Philip Withnall 2017-10-06 11:26:12 UTC
Review of attachment 342563 [details] [review]:

If this is the only thing where we need to special-case ICC, I think it’s easy enough to add. The maintenance burden will be low.