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 515052 - gio:G_GNUC_FUNCTION is better than __FUNCTION__
gio:G_GNUC_FUNCTION is better than __FUNCTION__
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.15.x
Other All
: Normal minor
: ---
Assigned To: Alexander Larsson
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-02-07 19:09 UTC by Kazuki Iwamoto
Modified: 2008-02-10 05:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for replacing __FUNCTION__ (2.16 KB, patch)
2008-02-08 15:11 UTC, Kazuki Iwamoto
accepted-commit_now Details | Review

Description Kazuki Iwamoto 2008-02-07 19:09:01 UTC
Please describe the problem:
> 2008-01-27  Matthias Clasen  <mclasen@redhat.com>
>
>         * gbufferedinputstream.c:
>         * ginputstream.c:
>         * goutputstream.c: Replace uses of G_GNUC_PRETTY_FUNCTION by
>         __FUNCTION__.

G_GNUC_PRETTY_FUNCTION was replaced by __FUNCTION__.
But __FUNCTION__ may not be defined by the old compiler.
If using __FUNCTION__, please use G_GNUC_FUNCTION.
G_GNUC_FUNCTION is defined suitably in gmacros.h.

Steps to reproduce:
1. compile by old compiler.

Actual results:
An error occurs.

Expected results:
Replace __FUNCTION__ by G_GNUC_FUNCTION.

Does this happen every time?
Revision 6389 or later

Other information:
Comment 1 Christian Persch 2008-02-07 20:00:47 UTC
Using G_GNUC_FUNCTION is wrong and deprecated; use G_STRFUNC.
Comment 2 Kazuki Iwamoto 2008-02-08 15:11:21 UTC
Created attachment 104713 [details] [review]
patch for replacing __FUNCTION__

As you say.
I missed that G_GNUC_FUNCTION was deprecated with G_GNUC_PRETTY_FUNCTION.
We should use G_STRFUNC.
This patch is replacing __FUNCTION__ by G_STRFUNC.
Comment 3 Matthias Clasen 2008-02-08 16:32:47 UTC
Thanks, looks fine to commit.
Comment 4 Matthias Clasen 2008-02-10 05:21:58 UTC
This has been fixed.