diff options
author | Sami Kerola | 2011-02-27 13:05:09 +0100 |
---|---|---|
committer | Karel Zak | 2011-03-08 13:08:48 +0100 |
commit | c764e1a41d52ee427ee492c6bf882a86f8dc9532 (patch) | |
tree | 8074336e11d503b70fc18b1ec45d721fca4cc2a5 /include/c.h | |
parent | docs: update TODO (diff) | |
download | kernel-qcow2-util-linux-c764e1a41d52ee427ee492c6bf882a86f8dc9532.tar.gz kernel-qcow2-util-linux-c764e1a41d52ee427ee492c6bf882a86f8dc9532.tar.xz kernel-qcow2-util-linux-c764e1a41d52ee427ee492c6bf882a86f8dc9532.zip |
include: [c.h]: typeof to __typeof__ fix
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include/c.h')
-rw-r--r-- | include/c.h | 12 |
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 |