summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-10-18 20:03:47 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-10-18 20:03:47 (GMT)
commit9729a518b49a2217307c3c7ce9b33b064fc83147 (patch)
tree28b22bf7d1972b4a537bcec377778147c976420c /src/H5private.h
parent1bc858b1b889ae2d0eeca463646592d195db8c94 (diff)
downloadhdf5-9729a518b49a2217307c3c7ce9b33b064fc83147.zip
hdf5-9729a518b49a2217307c3c7ce9b33b064fc83147.tar.gz
hdf5-9729a518b49a2217307c3c7ce9b33b064fc83147.tar.bz2
[svn-r24332] Bring revision #24330 from revise_chunks. h5committested.
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 74b918f..2bfcb70 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -2378,6 +2378,25 @@ func_init_failed: \
#define HDcompile_assert(e) do { typedef struct { unsigned int b: (e); } x; } while(0)
*/
+/* Macros for enabling/disabling particular GCC warnings */
+/* (see the following web-sites for more info:
+ * http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
+ * http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas
+ */
+/* 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)
+
+ #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)
+#endif
+
/* Private functions, not part of the publicly documented API */
H5_DLL herr_t H5_init_library(void);
H5_DLL void H5_term_library(void);