From: bernie Date: Sat, 22 Jan 2005 04:19:50 +0000 (+0000) Subject: Use non-uglified typeof(). X-Git-Tag: 1.0.0~896 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=03cc360121e2d82317702a73e0c816d4080fc8c5;hp=0192ed944b4b499fc9d003da4281e1d43d6f0c40;p=bertos.git Use non-uglified typeof(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@345 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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; \ })