mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
GCC_DIAG_* definitions are missing for Windows (MinGW) #785
This commit is contained in:
@@ -148,9 +148,7 @@ protected:
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 408) && !defined(POCO_ANDROID)
|
GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings
|
||||||
GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings
|
|
||||||
#endif // POCO_COMPILER_GCC && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 408)
|
|
||||||
|
|
||||||
|
|
||||||
template <bool x>
|
template <bool x>
|
||||||
|
|||||||
@@ -112,12 +112,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef __GNUC__
|
|
||||||
#define GCC_DIAG_OFF(x)
|
|
||||||
#define GCC_DIAG_ON(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Hardware Architecture and Byte Order
|
// Hardware Architecture and Byte Order
|
||||||
//
|
//
|
||||||
@@ -257,6 +251,41 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// GCC diagnostics enable/disable by Patrick Horgan, see
|
||||||
|
// http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
|
||||||
|
// use example: GCC_DIAG_OFF(unused-variable)
|
||||||
|
//
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) && !defined(POCO_NO_GCC_DIAG)
|
||||||
|
#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
|
||||||
|
#else
|
||||||
|
#define GCC_DIAG_OFF(x)
|
||||||
|
#define GCC_DIAG_ON(x)
|
||||||
|
#endif // __GNUC__
|
||||||
|
|
||||||
|
|
||||||
#if !defined(POCO_ARCH)
|
#if !defined(POCO_ARCH)
|
||||||
#error "Unknown Hardware Architecture."
|
#error "Unknown Hardware Architecture."
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -44,38 +44,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// GCC diagnostics enable/disable by Patrick Horgan, see
|
|
||||||
// http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
|
|
||||||
// use example: GCC_DIAG_OFF(unused-variable)
|
|
||||||
//
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) && !defined(POCO_NO_GCC_DIAG)
|
|
||||||
#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
|
// No syslog.h on QNX/BB10
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user