diff options
-rw-r--r-- | bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx | 4 | ||||
-rw-r--r-- | config_host/config_global.h.in | 1 | ||||
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | connectivity/source/drivers/mozab/post_include_mozilla.h | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mozab/pre_include_mozilla.h | 2 | ||||
-rw-r--r-- | connectivity/source/parse/sqlbison.y | 2 | ||||
-rw-r--r-- | idlc/source/scanner.l | 2 | ||||
-rw-r--r-- | include/cppuhelper/propertysetmixin.hxx | 4 | ||||
-rw-r--r-- | include/sal/types.h | 2 | ||||
-rw-r--r-- | l10ntools/source/cfglex.l | 2 | ||||
-rw-r--r-- | l10ntools/source/srclex.l | 2 | ||||
-rw-r--r-- | l10ntools/source/xrmlex.l | 2 | ||||
-rw-r--r-- | rsc/source/parser/rscyacc.y | 2 | ||||
-rw-r--r-- | ucb/source/ucp/gio/gio_mount.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/NeonUri.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/printaccessoryview.mm | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gloactiongroup.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/gtk/window/glomenu.cxx | 4 |
18 files changed, 23 insertions, 37 deletions
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx index f224c22b57cf..50a973f49b03 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx @@ -94,14 +94,14 @@ std::type_info * createFake_si_class_type_info( } -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" #endif void dummy_can_throw_anything( char const * ) { } -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic pop #endif diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in index 929e5a0b5b8c..197f2c0fd9d3 100644 --- a/config_host/config_global.h.in +++ b/config_host/config_global.h.in @@ -17,7 +17,6 @@ Any change in this header will cause a rebuild of almost everything. #define HAVE_CXX11_FINAL 0 #define HAVE_CXX11_PERFECT_FORWARDING 0 #define HAVE_GCC_BUILTIN_ATOMIC 0 -#define HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY 0 #define HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE 0 /* _Pragma */ #define HAVE_GCC_PRAGMA_OPERATOR 0 diff --git a/configure.ac b/configure.ac index 4b1f554ba86a..44ee065d2a58 100644 --- a/configure.ac +++ b/configure.ac @@ -5789,19 +5789,6 @@ if test "$GCC" = "yes"; then AC_MSG_RESULT([no]) fi - AC_MSG_CHECKING( - [whether $CC supports pragma GCC diagnostic error/ignored/warning]) - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wunknown-pragmas -Wunused-parameter" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #pragma GCC diagnostic ignored "-Wunused-parameter" - void dummy(int n) {} - ])], [ - AC_DEFINE([HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY],[1]) - AC_MSG_RESULT([yes]) - ], [AC_MSG_RESULT([no])]) - CFLAGS=$save_CFLAGS - AC_MSG_CHECKING([whether $CC supports pragma GCC diagnostic push/pop]) save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror -Wunknown-pragmas -Wunused-parameter" diff --git a/connectivity/source/drivers/mozab/post_include_mozilla.h b/connectivity/source/drivers/mozab/post_include_mozilla.h index 9bb7b6513313..c9abc5ed8d31 100644 --- a/connectivity/source/drivers/mozab/post_include_mozilla.h +++ b/connectivity/source/drivers/mozab/post_include_mozilla.h @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ && !defined __clang__ #pragma GCC diagnostic pop #elif defined _MSC_VER diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h index 2168ce02b82e..1adce6e6d984 100644 --- a/connectivity/source/drivers/mozab/pre_include_mozilla.h +++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h @@ -48,7 +48,7 @@ #endif #endif -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ && !defined __clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 89b524c924d3..e63bfe10c696 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -51,7 +51,7 @@ #pragma warning(disable:4273 4701) #endif -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#ifdef __GNUC__ # pragma GCC diagnostic ignored "-Wwrite-strings" # pragma GCC diagnostic ignored "-Wunused-function" #endif diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l index aa306a98d03a..5f9b7a222029 100644 --- a/idlc/source/scanner.l +++ b/idlc/source/scanner.l @@ -238,7 +238,7 @@ static void parseLineAndFile(sal_Char* pBuf) } // Suppress any warnings from generated code: -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" #elif defined _MSC_VER diff --git a/include/cppuhelper/propertysetmixin.hxx b/include/cppuhelper/propertysetmixin.hxx index 0a88945727b0..446ae22a911e 100644 --- a/include/cppuhelper/propertysetmixin.hxx +++ b/include/cppuhelper/propertysetmixin.hxx @@ -80,7 +80,7 @@ template< typename T > class PropertySetMixin; @since UDK 3.2.1 */ -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ && !defined __clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" @@ -478,7 +478,7 @@ private: PropertySetMixin( const PropertySetMixin&); // not defined void operator=( const PropertySetMixin&); // not defined }; -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \ && !defined __clang__ #pragma GCC diagnostic pop #endif diff --git a/include/sal/types.h b/include/sal/types.h index af98c876127d..56d6e15bd5b2 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -497,7 +497,7 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { SAL_WNODEPRECATED_DECLARATIONS_POP */ -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_OPERATOR +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_OPERATOR #define SAL_WNODEPRECATED_DECLARATIONS_PUSH \ _Pragma(SAL_STRINGIFY_ARG(GCC diagnostic push)) \ _Pragma(SAL_STRINGIFY_ARG(GCC diagnostic ignored "-Wdeprecated-declarations")) diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l index f87baf41813d..0fe951c0ff37 100644 --- a/l10ntools/source/cfglex.l +++ b/l10ntools/source/cfglex.l @@ -44,7 +44,7 @@ #include "cfglex.hxx" -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l index b484881d0232..0985b431f04c 100644 --- a/l10ntools/source/srclex.l +++ b/l10ntools/source/srclex.l @@ -45,7 +45,7 @@ #include "srclex.hxx" -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l index c29406e030f4..ec00468de4d9 100644 --- a/l10ntools/source/xrmlex.l +++ b/l10ntools/source/xrmlex.l @@ -43,7 +43,7 @@ #include "sal/main.h" -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y index 7325b6d0d25c..3900b67fd22d 100644 --- a/rsc/source/parser/rscyacc.y +++ b/rsc/source/parser/rscyacc.y @@ -257,7 +257,7 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop ) #pragma warning(push, 1) #pragma warning(disable:4129 4273 4701 4702) #endif -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wwrite-strings" #endif %} diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx index 6d7bc63a45e9..c04cd24eab0b 100644 --- a/ucb/source/ucp/gio/gio_mount.cxx +++ b/ucb/source/ucp/gio/gio_mount.cxx @@ -22,12 +22,12 @@ #include <stdio.h> #include <string.h> -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" #endif G_DEFINE_TYPE (OOoMountOperation, ooo_mount_operation, G_TYPE_MOUNT_OPERATION); -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic pop #endif diff --git a/ucb/source/ucp/webdav-neon/NeonUri.cxx b/ucb/source/ucp/webdav-neon/NeonUri.cxx index 31327d3e86d4..d378cfb46ddf 100644 --- a/ucb/source/ucp/webdav-neon/NeonUri.cxx +++ b/ucb/source/ucp/webdav-neon/NeonUri.cxx @@ -43,7 +43,7 @@ using namespace webdav_ucp; // FIXME: not sure whether initializing a ne_uri statically is supposed to work // the string fields of ne_uri are char*, not const char* -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wwrite-strings" #endif diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm index 56f6ab022f06..e2db4c3fe443 100644 --- a/vcl/osx/printaccessoryview.mm +++ b/vcl/osx/printaccessoryview.mm @@ -1084,7 +1084,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO // Make deprecation warnings just warnings in a -Werror compilation. -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#ifdef __GNUC__ // #pragma GCC diagnostic push #pragma GCC diagnostic warning "-Wdeprecated-declarations" #endif diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx index 60f46cd7f45f..faffe197c88d 100644 --- a/vcl/unx/gtk/window/gloactiongroup.cxx +++ b/vcl/unx/gtk/window/gloactiongroup.cxx @@ -39,12 +39,12 @@ struct _GLOAction typedef GObjectClass GLOActionClass; typedef struct _GLOAction GLOAction; -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" #endif G_DEFINE_TYPE (GLOAction, g_lo_action, G_TYPE_OBJECT); -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic pop #endif @@ -106,7 +106,7 @@ struct _GLOActionGroupPrivate static void g_lo_action_group_iface_init (GActionGroupInterface *); -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" #endif @@ -114,7 +114,7 @@ G_DEFINE_TYPE_WITH_CODE (GLOActionGroup, g_lo_action_group, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP, g_lo_action_group_iface_init)); -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic pop #endif diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx index 76c617bead13..46bf91bbc763 100644 --- a/vcl/unx/gtk/window/glomenu.cxx +++ b/vcl/unx/gtk/window/glomenu.cxx @@ -25,12 +25,12 @@ struct _GLOMenu typedef GMenuModelClass GLOMenuClass; -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" #endif G_DEFINE_TYPE (GLOMenu, g_lo_menu, G_TYPE_MENU_MODEL); -#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic pop #endif |