From 03cc360121e2d82317702a73e0c816d4080fc8c5 Mon Sep 17 00:00:00 2001 From: bernie Date: Sat, 22 Jan 2005 04:19:50 +0000 Subject: [PATCH 1/1] Use non-uglified typeof(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@345 38d2e660-2303-0410-9eaa-f027e97ec537 --- macros.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/macros.h b/macros.h index 6639d99b..7fec0134 100755 --- a/macros.h +++ b/macros.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.10 2005/01/22 04:19:50 bernie + *#* Use non-uglified typeof(). + *#* *#* Revision 1.9 2004/12/08 08:51:34 bernie *#* Add type-generic macros for C++. *#* @@ -75,18 +78,18 @@ #elif (COMPILER_STATEMENT_EXPRESSIONS && COMPILER_TYPEOF) /* Type-generic macros implemented with statement expressions. */ #define ABS(n) ({ \ - __typeof__(n) _n = (n); \ + typeof(n) _n = (n); \ (_n < 0) ? -_n : _n; \ }) #define MIN(a,b) ({ \ - __typeof__(a) _a = (a); \ - __typeof__(b) _b = (b); \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ (void)(&_a == &_b); /* ensure same type */ \ (_a < _b) ? _a : _b; \ }) #define MAX(a,b) ({ \ - __typeof__(a) _a = (a); \ - __typeof__(b) _b = (b); \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ (void)(&_a == &_b); /* ensure same type */ \ (_a > _b) ? _a : _b; \ }) -- 2.25.1