summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/c.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/c.h b/include/c.h
index 0db8b2b59..f725fc7eb 100644
--- a/include/c.h
+++ b/include/c.h
@@ -32,10 +32,10 @@
/* &a[0] degrades to a pointer: a different type from an array */
# define __must_be_array(a) \
- BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
+ BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0])))
# define ignore_result(x) ({ \
- typeof(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \
+ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \
})
#else /* !__GNUC__ */
@@ -89,16 +89,16 @@
#ifndef min
# define min(x, y) ({ \
- typeof(x) _min1 = (x); \
- typeof(y) _min2 = (y); \
+ __typeof__(x) _min1 = (x); \
+ __typeof__(y) _min2 = (y); \
(void) (&_min1 == &_min2); \
_min1 < _min2 ? _min1 : _min2; })
#endif
#ifndef max
# define max(x, y) ({ \
- typeof(x) _max1 = (x); \
- typeof(y) _max2 = (y); \
+ __typeof__(x) _max1 = (x); \
+ __typeof__(y) _max2 = (y); \
(void) (&_max1 == &_max2); \
_max1 > _max2 ? _max1 : _max2; })
#endif