From 2fcf8411affe7a24ec3a352c4109a9edea1cf006 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 15 Jun 2014 13:45:23 -0700 Subject: Use __typeof__ instead of typeof in the header This allows us to compile Subsurface with strict C or C++ mode. Signed-off-by: Thiago Macieira Signed-off-by: Dirk Hohndel --- dive.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dive.h') diff --git a/dive.h b/dive.h index c53b0dfd4..a5c760640 100644 --- a/dive.h +++ b/dive.h @@ -11,14 +11,14 @@ /* Windows has no MIN/MAX macros - so let's just roll our own */ #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; }) #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; }) -- cgit v1.2.3-70-g09d2