From c764e1a41d52ee427ee492c6bf882a86f8dc9532 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 27 Feb 2011 13:05:09 +0100 Subject: include: [c.h]: typeof to __typeof__ fix Signed-off-by: Sami Kerola --- include/c.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/c.h') 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 -- cgit v1.2.3-55-g7522