Make CHECK_TYPE_NONCONST macro portable

also replace __typeof -> typeof
This commit is contained in:
2014-08-02 18:03:50 +10:00
parent d98b6a289c
commit 88a0d5ebe8
3 changed files with 15 additions and 17 deletions

View File

@@ -163,7 +163,7 @@ static const int NAN_INT = 0x7FC00000;
#ifndef CHECK_TYPE
#ifdef __GNUC__
#define CHECK_TYPE(var, type) { \
__typeof(var) *__tmp; \
typeof(var) *__tmp; \
__tmp = (type *)NULL; \
(void)__tmp; \
} (void)0