]> granicus.if.org Git - gc/commitdiff
Eliminate 'language extension used' Clang warning in gc.h
authorIvan Maidanski <ivmai@mail.ru>
Sat, 30 Jun 2018 19:31:13 +0000 (22:31 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 17 Jul 2018 06:05:30 +0000 (09:05 +0300)
* include/gc.h [GC_DEBUG && __GNUC__] (GC_PTR_ADD, GC_PRE_INCR,
GC_POST_INCR, GC_POST_DECR): Replace typeof to __typeof__.

include/gc.h

index 72fc04486ce5950ab399de741bdabe865e253501..8eedc7720def9d5570cd8c66441846fc6acdacda 100644 (file)
@@ -1427,10 +1427,10 @@ GC_API void GC_CALL GC_dump(void);
         ((type_of_result)GC_pre_incr((void **)(&(x)), (n)*sizeof(*x)))
 # define GC_POST_INCR3(x, n, type_of_result) \
         ((type_of_result)GC_post_incr((void **)(&(x)), (n)*sizeof(*x)))
-# define GC_PTR_ADD(x, n) GC_PTR_ADD3(x, n, typeof(x))
-# define GC_PRE_INCR(x, n) GC_PRE_INCR3(x, n, typeof(x))
-# define GC_POST_INCR(x) GC_POST_INCR3(x, 1, typeof(x))
-# define GC_POST_DECR(x) GC_POST_INCR3(x, -1, typeof(x))
+# define GC_PTR_ADD(x, n) GC_PTR_ADD3(x, n, __typeof__(x))
+# define GC_PRE_INCR(x, n) GC_PRE_INCR3(x, n, __typeof__(x))
+# define GC_POST_INCR(x) GC_POST_INCR3(x, 1, __typeof__(x))
+# define GC_POST_DECR(x) GC_POST_INCR3(x, -1, __typeof__(x))
 #else /* !GC_DEBUG || !__GNUC__ */
   /* We can't do this right without typeof, which ANSI decided was not    */
   /* sufficiently useful.  Without it we resort to the non-debug version. */