diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5private.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/H5private.h b/src/H5private.h index c376789..984f7da 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -2359,20 +2359,15 @@ func_init_failed: \ * http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html * http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas */ -/* These pragmas are only implemented in gcc 4.2+ */ -#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 +/* These pragmas are only implemented usefully in gcc 4.6+ */ +#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 #define GCC_DIAG_STR(s) #s #define GCC_DIAG_JOINSTR(x,y) GCC_DIAG_STR(x ## y) #define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) #define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x) - /* These pragmas are only implemented in gcc 4.6+ */ - #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 - #define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x)) - #define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop) - #else - #define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x)) - #define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning GCC_DIAG_JOINSTR(-W,x)) - #endif + + #define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x)) + #define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop) #else #define GCC_DIAG_OFF(x) #define GCC_DIAG_ON(x) |