allow turning off GCC_DIAG_ON/OFF

This commit is contained in:
Guenter Obiltschnig
2015-03-27 16:54:37 +01:00
parent 35a7b47138
commit c0228c5ff8

View File

@@ -44,25 +44,13 @@
#endif #endif
#ifdef __GNUC__
#ifndef __THROW
#ifndef __GNUC_PREREQ
#define __GNUC_PREREQ(maj, min) (0)
#endif
#if defined __cplusplus && __GNUC_PREREQ (2,8)
#define __THROW throw ()
#else
#define __THROW
#endif
#endif
// //
// GCC diagnostics enable/disable by Patrick Horgan, see // GCC diagnostics enable/disable by Patrick Horgan, see
// http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html // http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
// use example: GCC_DIAG_OFF(unused-variable) // use example: GCC_DIAG_OFF(unused-variable)
// //
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) #ifdef __GNUC__
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) && !defined(POCO_NO_GCC_DIAG)
#ifdef GCC_DIAG_OFF #ifdef GCC_DIAG_OFF
#undef GCC_DIAG_OFF #undef GCC_DIAG_OFF
#endif #endif
@@ -85,7 +73,6 @@
#define GCC_DIAG_OFF(x) #define GCC_DIAG_OFF(x)
#define GCC_DIAG_ON(x) #define GCC_DIAG_ON(x)
#endif #endif
#endif // __GNUC__ #endif // __GNUC__