__extension__ can be put in front of expressions
authorDamien Lespiau <damien.lespiau@intel.com>
Sat, 26 Dec 2009 14:32:20 +0000 (15:32 +0100)
committerJohan Dahlin <johan@gnome.org>
Thu, 31 Dec 2009 14:58:03 +0000 (15:58 +0100)
glib uses __extension__ in macros dealing with 64 bits integer such as
GUINT64_SWAP_LE_BE().

To quote the GCC manual:
  `-pedantic' and other options cause warnings for many GNU C extensions.  You
  can prevent such warnings within one expression by writing `__extension__'
  before the expression.

https://bugzilla.gnome.org/show_bug.cgi?id=605779

giscanner/scannerparser.y

index 7b18f94..b38fb89 100644 (file)
@@ -534,6 +534,7 @@ assignment_operator
 expression
        : assignment_expression
        | expression ',' assignment_expression
+       | EXTENSION expression
          {
                $$ = gi_source_symbol_new (CSYMBOL_TYPE_INVALID);
          }