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 69097 - G_STRLOC causes warning under gcc 3.x
G_STRLOC causes warning under gcc 3.x
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: general
1.3.x
Other other
: Normal normal
: ---
Assigned To: Matthias Clasen
Matthias Clasen
Depends on:
Blocks:
 
 
Reported: 2002-01-19 08:06 UTC by Darin Adler
Modified: 2011-02-18 15:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Darin Adler 2002-01-19 08:06:29 UTC
The warning is: concatenation of string literals with __FUNCTION__
is deprecated. This feature will be removed in future.

Clearly, this is due to the use of __PRETTY_FUNCTION__. But sadly, this
means that the very concept of including the function name in a single
string literal like the one made by G_STRLOC isn't supported by the gcc
team.

As a -Werror devotee, this hits me sooner than others, but it will hit
everyone when the gcc team actually removes the feature.
Comment 1 Darin Adler 2002-01-19 08:10:22 UTC
(Side note: I'd like to know if there's a way to disable this warning
while leaving others on. If someone happens to find out while looking
into this, please let me know.)
Comment 2 Owen Taylor 2002-01-19 15:30:57 UTC
Yep, familiar with this problem. I'm trying to decide whether
it is worth raising a stink with the GCC maintainers about
it, or just treat gcc-3.x like non-gcc for G_STRLOC. 
(Which makes G_STRLOC a lot less useful, but then again,
it's already not so useful unless you have gcc.)

I've been told that the reason for this incompatible change
in gcc was that the old behavior was causing problems because
string concatenation is supposed to happen _before_ the
compiler decides where the functions are.


Comment 3 Owen Taylor 2002-01-28 23:01:56 UTC
OK, basically fixed in HEAD. Moving to the 1.2.11 milestone.

Mon Jan 28 17:56:10 2002  Owen Taylor  <otaylor@redhat.com>

        * glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for
        G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ <
        3, since in 3.0.3 the semantics of these functions were changed in
        an incompatible way. (#69097)
Comment 4 Matthias Clasen 2004-02-25 00:18:48 UTC
1.2.11 won't happen.
Comment 5 Owen Taylor 2004-02-29 19:35:33 UTC
Closing 1.2.11 bugs