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 670751 - IceWM build fails due to the G_DEPRECATED_FOR macro
IceWM build fails due to the G_DEPRECATED_FOR macro
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-02-24 15:43 UTC by Shota Akiyama
Modified: 2012-03-03 18:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix this error (776 bytes, patch)
2012-02-24 15:43 UTC, Shota Akiyama
committed Details | Review

Description Shota Akiyama 2012-02-24 15:43:52 UTC
Created attachment 208358 [details] [review]
Patch to fix this error

IceWM build fails due to G_DEPRECATED_FOR macro which used in glib-2.31.0.
Reproduce the failure is easy, just build IceWM using glib-2.31.0.

The reason for this failure is as follows:

Glib defines the G_DEPRECATED_FOR macro which expands " __attribute__((deprecated("Use '" #f "' instead")))", and
IceWM defines a macro "deprecated" which expands to "__attribute__((deprecated))".
So, G_DEPRECATED_FOR macro expands to " __attribute__((__attribute__((deprecated))("Use '" #f "' instead")))".

Attachment is the patch to fix it.
Comment 1 Emmanuele Bassi (:ebassi) 2012-02-24 16:34:18 UTC
Review of attachment 208358 [details] [review]:

no, this is broken. the attribute is: __attribute__((deprecated)). see:

  http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html

IceWM will need to be fixed: GLib is using a namespaced macro, and IceWM ought to do the same, to avoid collisions like these.
Comment 2 Dan Winship 2012-02-24 17:02:12 UTC
from the previous page of the gcc docs: "You may also specify attributes with `__' preceding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, you may use __noreturn__ instead of noreturn."

We're already using __deprecated__ for G_GNUC_DEPRECATED. THere's no reason to not use it for G_GNUC_DEPRECATED_FOR too
Comment 3 Colin Walters 2012-02-24 17:05:11 UTC
While clearly the IceWM people are lame for defining non-namespaced macros, I agree with Dan here; since it's trivial to fix and they gave us a patch, I don't see a reason not to put it in.
Comment 4 Matthias Clasen 2012-02-24 23:39:30 UTC
Review of attachment 208358 [details] [review]:

Emmanuele, any attribute can be encased in __ __, that works just fine. 
And I agree with Colin that there is no harm in taking this patch.
Comment 5 Dan Winship 2012-03-03 18:30:15 UTC
pushed