remove GCC_DIAG_OFF

This commit is contained in:
Guenter Obiltschnig
2015-09-30 12:16:09 +02:00
parent 4894222fe9
commit bcead85c25
18 changed files with 4 additions and 68 deletions

View File

@@ -44,51 +44,6 @@
#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
// http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
// use example: GCC_DIAG_OFF(unused-variable)
//
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
#ifdef GCC_DIAG_OFF
#undef GCC_DIAG_OFF
#endif
#ifdef GCC_DIAG_ON
#undef GCC_DIAG_ON
#endif
#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)
#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
#else
#define GCC_DIAG_OFF(x)
#define GCC_DIAG_ON(x)
#endif
#endif // __GNUC__
//
// No syslog.h on QNX/BB10
//