diff options
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mozab/post_include_mozilla.h | 3 | ||||
-rw-r--r-- | connectivity/source/drivers/mozab/pre_include_mozilla.h | 5 | ||||
-rw-r--r-- | connectivity/source/parse/sqlflex.l | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/connectivity/source/drivers/mozab/post_include_mozilla.h b/connectivity/source/drivers/mozab/post_include_mozilla.h index 9534b03680a6..20753f4a0e5b 100644 --- a/connectivity/source/drivers/mozab/post_include_mozilla.h +++ b/connectivity/source/drivers/mozab/post_include_mozilla.h @@ -17,7 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ + && !defined __clang__ #pragma GCC diagnostic pop #elif defined __SUNPRO_CC #pragma enable_warn diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h index b59974e6010a..14a7ad6c8038 100644 --- a/connectivity/source/drivers/mozab/pre_include_mozilla.h +++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + #ifndef MINIMAL_PROFILEDISCOVER // Turn off DEBUG Assertions #ifdef _DEBUG @@ -46,7 +48,8 @@ #endif #endif -#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ + && !defined __clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" #elif defined __SUNPRO_CC diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l index d17128ec64a9..44484fe760ed 100644 --- a/connectivity/source/parse/sqlflex.l +++ b/connectivity/source/parse/sqlflex.l @@ -18,6 +18,8 @@ // the License at http://www.apache.org/licenses/LICENSE-2.0 . // +#include "sal/config.h" + #define YY_EXIT 1 // YY_FATAL will not halt the application #ifndef _CSTDARG_ @@ -44,11 +46,9 @@ #include <rtl/strbuf.hxx> #include <connectivity/sqlparse.hxx> -#if defined __GNUC__ -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY # pragma GCC diagnostic ignored "-Wwrite-strings" # pragma GCC diagnostic ignored "-Wunused-function" -#endif #elif defined __SUNPRO_CC #pragma disable_warn #elif defined _MSC_VER |