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 131899 - gmacros.h - G_STMT_START should have __extension__ on GCC
gmacros.h - G_STMT_START should have __extension__ on GCC
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.2.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2004-01-19 09:00 UTC by olivier.biot
Modified: 2011-02-18 16:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2



Description olivier.biot 2004-01-19 09:00:47 UTC
When compiling a Glib application with -pedantic, code using the g_assert
() macro and the like generates lots of noise (braces within expressions).

I propose to get rid of this noise by adding __extension__ (or the GLIB 
alias for it) to the G_STMT_START macro in gmacros.h when using a GCC 
version supporting __extension__.
Comment 1 Owen Taylor 2004-01-31 14:38:44 UTC
I see no reason why this change can't go in for 2.4.0 -- we already
use __extension__ in a similar case for _G_BOOLEAN_EXPR()
Comment 2 Owen Taylor 2004-03-14 04:36:10 UTC
Sat Mar 13 23:30:53 2004  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gmacros.h (G_STMT_START): Add __extension__
        to G_STMT_START to quite gcc -pedantic. (#131899,
        Olivier Biot)