Fix problems with excessive C++ warnings: "ISO C++ forbids nested groups
authorDom Lachowicz <cinamod@hotmail.com>
Thu, 12 Sep 2002 04:03:54 +0000 (04:03 +0000)
committerTim Janik <timj@src.gnome.org>
Thu, 12 Sep 2002 04:03:54 +0000 (04:03 +0000)
Wed Sep 11 16:50:20 2002  Dom Lachowicz <cinamod@hotmail.com>

        * gtype.h: Fix problems with excessive C++ warnings: "ISO C++ forbids nested groups within expressions"

gobject/ChangeLog
gobject/gtype.h

index f854af58bf694b32db6c3793d1442f403487eb66..38380b66066889ebe2956c247a8a6c213d1b08f2 100644 (file)
@@ -1,3 +1,7 @@
+Wed Sep 11 16:50:20 2002  Dom Lachowicz <cinamod@hotmail.com>
+
+       * gtype.h: Fix problems with excessive C++ warnings: "ISO C++ forbids nested groups within expressions"
+       
 Fri Jul 26 15:46:36 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gvaluetransform.c: Fix problems with excess ';'
index c3d23573b2c6cc1ee6d77454971cdb7e414795fa..9c9ea09102bee9c4e2a29d76e44e160984fac1f7 100644 (file)
@@ -352,22 +352,22 @@ G_CONST_RETURN gchar* g_type_name_from_class      (GTypeClass     *g_class);
 #define _G_TYPE_IGC(ip, gt, ct)         ((ct*) (((GTypeInstance*) ip)->g_class))
 #define _G_TYPE_IGI(ip, gt, ct)         ((ct*) g_type_interface_peek (((GTypeInstance*) ip)->g_class, gt))
 #ifdef __GNUC__
-#  define _G_TYPE_CIT(ip, gt)             ({ \
+#  define _G_TYPE_CIT(ip, gt)             (G_GNUC_EXTENSION ({ \
   GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \
   if (__inst && __inst->g_class && __inst->g_class->g_type == __t) \
     __r = TRUE; \
   else \
     __r = g_type_check_instance_is_a (__inst, __t); \
   __r; \
-})
-#  define _G_TYPE_CCT(cp, gt)             ({ \
+}))
+#  define _G_TYPE_CCT(cp, gt)             (G_GNUC_EXTENSION ({ \
   GTypeClass *__class = (GTypeClass*) cp; GType __t = gt; gboolean __r; \
   if (__class && __class->g_type == __t) \
     __r = TRUE; \
   else \
     __r = g_type_check_class_is_a (__class, __t); \
   __r; \
-})
+}))
 #else  /* !__GNUC__ */
 #  define _G_TYPE_CIT(ip, gt)             (g_type_check_instance_is_a ((GTypeInstance*) ip, gt))
 #  define _G_TYPE_CCT(cp, gt)             (g_type_check_class_is_a ((GTypeClass*) cp, gt))