diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-09-06 19:03:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-09-06 19:03:35 (GMT) |
commit | 79c8e26fa7d8bb3e3ab59e5a69ea37cc385748c0 (patch) | |
tree | 729ee4eda8d45ce2df3021fc4dbd057feddbf3f5 /src | |
parent | 2cb03fedded432eaebd7829fbb8c7c7a5f403508 (diff) | |
download | hdf5-79c8e26fa7d8bb3e3ab59e5a69ea37cc385748c0.zip hdf5-79c8e26fa7d8bb3e3ab59e5a69ea37cc385748c0.tar.gz hdf5-79c8e26fa7d8bb3e3ab59e5a69ea37cc385748c0.tar.bz2 |
[svn-r24111] Description:
Restrict GCC diagnostic pragmas to only gcc 4.6+
Tested on:
Mac OSX/64 10.8.4 (amazon) w/gcc 4.8
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) |