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 141281 - glib 1.2 doesn't build on GCC 3.4: incorrect usage of __PRETTY_FUNCTION__
glib 1.2 doesn't build on GCC 3.4: incorrect usage of __PRETTY_FUNCTION__
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: general
1.2.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2004-04-28 10:10 UTC by Karl Vogel
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Karl Vogel 2004-04-28 10:10:38 UTC
Glib 1.2 uses __PRETTY_FUNCTION__ from gcc in a way that is not compatible with
GCC 3.4

>     g_warning (G_GNUC_PRETTY_FUNCTION
>               "(): unable to handle positional parameters (%%n$)");


glib.h :

> #ifdef __GNUC__
> #define G_GNUC_FUNCTION         __FUNCTION__
> #define G_GNUC_PRETTY_FUNCTION  __PRETTY_FUNCTION__
> #else   /* !__GNUC__ */
> #define G_GNUC_FUNCTION         ""
> #define G_GNUC_PRETTY_FUNCTION  ""
> #endif  /* !__GNUC__ */

The info pages of GCC 3.4 state:

"
   These identifiers are not preprocessor macros.  In GCC 3.3 and
earlier, in C only, `__FUNCTION__' and `__PRETTY_FUNCTION__' were
treated as string literals; they could be used to initialize `char'
arrays, and they could be concatenated with other string literals.  GCC
3.4 and later treat them as variables, like `__func__'.  In C++,
`__FUNCTION__' and `__PRETTY_FUNCTION__' have always been variables.

"


see http://cvs.openpkg.org/chngview?cn=16208 for a possible fix.
Comment 1 Owen Taylor 2004-04-29 16:04:32 UTC
No further releases of GLib-1.2 are planned; I think you might find
a patch for glib-1,2 for this in the Red Hat RPM.