[Libreoffice-commits] core.git: 4 commits - bridges/source config_host/config_global.h.in configure.ac connectivity/source extensions/workben external/boost external/clucene idlc/source include/cppuhelper include/osl include/sal l10ntools/source rsc/source sal/osl sal/qa sdext/source sw/source ucb/source vcl/osx vcl/unx

Michael Stahl mstahl at redhat.com
Thu Oct 2 11:06:50 PDT 2014


 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx     |    4 -
 config_host/config_global.h.in                           |    2 
 configure.ac                                             |   27 ------
 connectivity/source/drivers/mozab/post_include_mozilla.h |    3 
 connectivity/source/drivers/mozab/pre_include_mozilla.h  |    3 
 connectivity/source/parse/sqlbison.y                     |    2 
 extensions/workben/testframecontrol.cxx                  |    5 -
 external/boost/boost.wdeprecated-auto_ptr.patch.0        |   59 ++++++---------
 external/boost/boost_1_44_0-clang-warnings.patch         |   21 ++---
 external/clucene/patches/clucene-warnings.patch          |   20 ++---
 idlc/source/scanner.l                                    |    2 
 include/cppuhelper/propertysetmixin.hxx                  |    6 -
 include/osl/diagnose.h                                   |    6 -
 include/sal/types.h                                      |    2 
 l10ntools/source/cfglex.l                                |    4 -
 l10ntools/source/srclex.l                                |    4 -
 l10ntools/source/xrmlex.l                                |    4 -
 rsc/source/parser/rscyacc.y                              |    2 
 sal/osl/unx/signal.c                                     |    4 -
 sal/qa/rtl/strings/test_ostring_concat.cxx               |    2 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx    |    4 -
 sw/source/uibase/app/docshini.cxx                        |    1 
 ucb/source/ucp/gio/gio_mount.cxx                         |    4 -
 ucb/source/ucp/webdav-neon/NeonTypes.hxx                 |    4 -
 ucb/source/ucp/webdav-neon/NeonUri.cxx                   |    2 
 vcl/osx/printaccessoryview.mm                            |    2 
 vcl/unx/gtk/window/gloactiongroup.cxx                    |    8 +-
 vcl/unx/gtk/window/glomenu.cxx                           |    4 -
 28 files changed, 73 insertions(+), 138 deletions(-)

New commits:
commit 72a7450c027dd816ff6eaf231f58de7b5ad9c0a8
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 2 18:46:05 2014 +0200

    MWERKS etc. are not supported toolchains
    
    Change-Id: I449fe34be396114529357388c87162aaf8976292

diff --git a/extensions/workben/testframecontrol.cxx b/extensions/workben/testframecontrol.cxx
index 7e67490..bb22d17 100644
--- a/extensions/workben/testframecontrol.cxx
+++ b/extensions/workben/testframecontrol.cxx
@@ -208,11 +208,6 @@ private:
 
 FrameControlApplication g_App;
 
-#ifdef __MWERKS__
-Application* pApp = &g_App;
-#endif
-
-
 
 void FrameControlApplication::init()
 {
diff --git a/include/osl/diagnose.h b/include/osl/diagnose.h
index fdae8cc..31b036d 100644
--- a/include/osl/diagnose.h
+++ b/include/osl/diagnose.h
@@ -121,14 +121,10 @@
  * Distributed under the Boost Software License, Version 1.0. (See
  * accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt) */
-#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600))
-#define OSL_THIS_FUNC __PRETTY_FUNCTION__
-#elif defined(__DMC__) && (__DMC__ >= 0x810)
+#if defined(__GNUC__)
 #define OSL_THIS_FUNC __PRETTY_FUNCTION__
 #elif defined(__FUNCSIG__)
 #define OSL_THIS_FUNC __FUNCSIG__
-#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
-#define OSL_THIS_FUNC __FUNCTION__
 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
 #define OSL_THIS_FUNC __func__
 #else
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 04013c7..3f978cf 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -512,7 +512,6 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
             case SFX_CREATE_MODE_INTERNAL:
             case SFX_CREATE_MODE_EMBEDDED:
                 {
-                    // for MWERKS (Mac-Compiler): can't cast autonomously
                     SwTransferable::InitOle( this, *mpDoc );
                 }
                 // suppress SfxProgress, when we are Embedded
commit 9086a4bbd38b9a5320525392affe495e7772796a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 2 18:42:07 2014 +0200

    remove checks of __GCC_MINOR__ that are always true in GCC 4.6 or later
    
    Change-Id: I4412a0c1e4dee94cd717f24b8df5e257d895f721

diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l
index 0fe951c..663070a 100644
--- a/l10ntools/source/cfglex.l
+++ b/l10ntools/source/cfglex.l
@@ -47,9 +47,7 @@
 #if __GNUC__
 #pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-label"
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
 #elif defined _MSC_VER
 #pragma warning(push, 1)
 #endif
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 0985b43..979df75 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -48,9 +48,7 @@
 #ifdef __GNUC__
 #pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-label"
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
 #elif defined _MSC_VER
 #pragma warning(push, 1)
 #endif
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index ec00468..0d4bb4d 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -46,9 +46,7 @@
 #ifdef __GNUC__
 #pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-label"
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
 #elif defined _MSC_VER
 #pragma warning(push, 1)
 #endif
diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c
index d8d2190..ba4a325 100644
--- a/sal/osl/unx/signal.c
+++ b/sal/osl/unx/signal.c
@@ -893,14 +893,14 @@ static void DUMPCURRENTALLOCS(void)
 {
     VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" );
 
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+#ifdef __GNUC__
 #   pragma GCC diagnostic push
 #   pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 #endif
 
     VALGRIND_DO_LEAK_CHECK;
 
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+#ifdef __GNUC__
 #   pragma GCC diagnostic pop
 #endif
 
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx
index 9c5cbd9..7988a3b 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -83,7 +83,7 @@ void test::ostring::StringConcat::checkConcat()
     TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char* > )), typeid( OString( "foo" ) + d3 ));
     CPPUNIT_ASSERT_EQUAL( OString( "fooabc" ), OString( OString( "foo" ) + d4 ));
     TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, char* > )), typeid( OString( "foo" ) + d4 ));
-#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ > 1 )
+#ifdef __GNUC__
     CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringBuffer( "foo" ) + OString( "bar" )));
     TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, OString > )), typeid( OStringBuffer( "foo" ) + OString( "bar" )));
 #endif
commit 3b59dbbffdb73e48f9e2398bb1eecc24e3d95e13
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 2 18:15:41 2014 +0200

    remove HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE check and macro
    
    This is supported in GCC 4.6.0 already:
    https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html
    
    Change-Id: I2f67e588eea3a323a2e9c81e39e56ab2e715a817

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 50a973f..56f9bac 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
+#ifdef __GNUC__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wunused-function"
 #endif
 void dummy_can_throw_anything( char const * )
 {
 }
-#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
+#ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
 
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 197f2c0..ee05142 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_SCOPE 0
 /* _Pragma */
 #define HAVE_GCC_PRAGMA_OPERATOR 0
 #define HAVE_GCC_DEPRECATED_MESSAGE 0
diff --git a/configure.ac b/configure.ac
index 44ee065..f14180a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5789,20 +5789,6 @@ if test "$GCC" = "yes"; then
         AC_MSG_RESULT([no])
     fi
 
-    AC_MSG_CHECKING([whether $CC supports pragma GCC diagnostic push/pop])
-    save_CFLAGS=$CFLAGS
-    CFLAGS="$CFLAGS -Werror -Wunknown-pragmas -Wunused-parameter"
-    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-            #pragma GCC diagnostic push
-            #pragma GCC diagnostic ignored "-Wunused-parameter"
-            void dummy(int n) {}
-            #pragma GCC diagnostic pop
-        ])], [
-            AC_DEFINE([HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE],[1])
-            AC_MSG_RESULT([yes])
-        ], [AC_MSG_RESULT([no])])
-    CFLAGS=$save_CFLAGS
-
     AC_MSG_CHECKING([whether $CC supports __attribute__((deprecated(message)))])
     save_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror"
diff --git a/connectivity/source/drivers/mozab/post_include_mozilla.h b/connectivity/source/drivers/mozab/post_include_mozilla.h
index c9abc5e..1570b01 100644
--- a/connectivity/source/drivers/mozab/post_include_mozilla.h
+++ b/connectivity/source/drivers/mozab/post_include_mozilla.h
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \
-    && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic pop
 #elif defined _MSC_VER
 #pragma warning(pop)
diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h
index 1adce6e..50afe57 100644
--- a/connectivity/source/drivers/mozab/pre_include_mozilla.h
+++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h
@@ -48,8 +48,7 @@
     #endif
 #endif
 
-#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \
-    && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
     #pragma GCC diagnostic push
     #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
 #elif defined _MSC_VER
diff --git a/external/boost/boost.wdeprecated-auto_ptr.patch.0 b/external/boost/boost.wdeprecated-auto_ptr.patch.0
index 959cb13..9be0eea 100644
--- a/external/boost/boost.wdeprecated-auto_ptr.patch.0
+++ b/external/boost/boost.wdeprecated-auto_ptr.patch.0
@@ -1,11 +1,10 @@
 --- boost/ptr_container/ptr_map.hpp
 +++ boost/ptr_container/ptr_map.hpp
-@@ -16,6 +16,12 @@
+@@ -16,6 +16,11 @@
  # pragma once
  #endif
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -17,19 +16,18 @@
  
  }
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif
 --- boost/ptr_container/ptr_map_adapter.hpp
 +++ boost/ptr_container/ptr_map_adapter.hpp
-@@ -16,6 +16,12 @@
+@@ -16,6 +16,11 @@
  # pragma once
  #endif
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -41,19 +39,18 @@
      
  } // namespace 'boost'  
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif
 --- boost/ptr_container/ptr_set_adapter.hpp
 +++ boost/ptr_container/ptr_set_adapter.hpp
-@@ -16,6 +16,12 @@
+@@ -16,6 +16,11 @@
  # pragma once
  #endif
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -65,19 +62,18 @@
  
  } // namespace 'boost'  
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif
 --- boost/ptr_container/ptr_sequence_adapter.hpp
 +++ boost/ptr_container/ptr_sequence_adapter.hpp
-@@ -16,6 +16,11 @@
+@@ -16,6 +16,10 @@
  # pragma once
  #endif
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -88,19 +84,18 @@
  
  } // namespace 'boost'  
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif
 --- boost/ptr_container/ptr_vector.hpp
 +++ boost/ptr_container/ptr_vector.hpp
-@@ -16,6 +16,12 @@
+@@ -16,6 +16,11 @@
  # pragma once
  #endif
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -112,19 +107,18 @@
      
  }
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif
 --- boost/smart_ptr/detail/shared_count.hpp
 +++ boost/smart_ptr/detail/shared_count.hpp
-@@ -18,6 +18,12 @@
+@@ -18,6 +18,11 @@
  // http://www.boost.org/LICENSE_1_0.txt)
  //
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -136,19 +130,18 @@
  # pragma warn .8027     // Functions containing try are not expanded inline
  #endif
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif  // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED
 --- boost/smart_ptr/scoped_ptr.hpp
 +++ boost/smart_ptr/scoped_ptr.hpp
-@@ -11,6 +11,12 @@
+@@ -11,6 +11,11 @@
  //  http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
  //
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -160,19 +153,18 @@
  
  } // namespace boost
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif // #ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
 --- boost/smart_ptr/shared_ptr.hpp
 +++ boost/smart_ptr/shared_ptr.hpp
-@@ -14,6 +14,12 @@
+@@ -14,6 +14,11 @@
  //  See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.
  //
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 +#endif
@@ -180,12 +172,11 @@
  #include <boost/config.hpp>   // for broken compiler workarounds
  
  #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
-@@ -1036,4 +1036,9 @@
+@@ -1036,4 +1036,8 @@
  
  #endif  // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
diff --git a/external/boost/boost_1_44_0-clang-warnings.patch b/external/boost/boost_1_44_0-clang-warnings.patch
index d5b934b..a71cc2f 100644
--- a/external/boost/boost_1_44_0-clang-warnings.patch
+++ b/external/boost/boost_1_44_0-clang-warnings.patch
@@ -1,11 +1,10 @@
 --- misc/boost_1_44_0/boost/random/lagged_fibonacci.hpp
 +++ misc/build/boost_1_44_0/boost/random/lagged_fibonacci.hpp
-@@ -16,6 +16,12 @@
+@@ -16,6 +16,11 @@
  #ifndef BOOST_RANDOM_LAGGED_FIBONACCI_HPP
  #define BOOST_RANDOM_LAGGED_FIBONACCI_HPP
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
 +#endif
@@ -17,19 +16,18 @@
  
  } // namespace boost
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif // BOOST_RANDOM_LAGGED_FIBONACCI_HPP
 --- misc/boost_1_44_0/boost/random/shuffle_output.hpp
 +++ misc/build/boost_1_44_0/boost/random/shuffle_output.hpp
-@@ -16,6 +16,12 @@
+@@ -16,6 +16,11 @@
  #ifndef BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
  #define BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
 +#endif
@@ -41,19 +39,18 @@
  }
  }
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
  #endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
 --- misc/boost_1_44_0/boost/random/subtract_with_carry.hpp
 +++ misc/build/boost_1_44_0/boost/random/subtract_with_carry.hpp
-@@ -16,6 +16,12 @@
+@@ -16,6 +16,11 @@
  #ifndef BOOST_RANDOM_SUBTRACT_WITH_CARRY_HPP
  #define BOOST_RANDOM_SUBTRACT_WITH_CARRY_HPP
  
-+#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
 +#endif
@@ -65,7 +62,7 @@
  } // namespace random
  } // namespace boost
  
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
 +# pragma GCC diagnostic pop
 +#endif
 +
diff --git a/external/clucene/patches/clucene-warnings.patch b/external/clucene/patches/clucene-warnings.patch
index 5f602c2..dc20d19 100644
--- a/external/clucene/patches/clucene-warnings.patch
+++ b/external/clucene/patches/clucene-warnings.patch
@@ -5,7 +5,7 @@
  #define _lucene_analysis_AnalysisHeader_
  
 +#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Woverloaded-virtual"
 +#endif
@@ -18,7 +18,7 @@
  
  CL_NS_END
 +
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic pop
 +#endif
  #endif
@@ -29,7 +29,7 @@
  #define _lucene_search_Searcher_
  
 +#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Woverloaded-virtual"
 +#endif
@@ -42,7 +42,7 @@
  
  CL_NS_END
 +
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic pop
 +#endif
  #endif
@@ -53,7 +53,7 @@
  #define _lucene_store_IndexInput_
  
 +#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Woverloaded-virtual"
 +#endif
@@ -66,7 +66,7 @@
  	};
  CL_NS_END
 +
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic pop
 +#endif
  #endif
@@ -77,7 +77,7 @@
  #define _lucene_util_Array_
  
 +#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
 +# pragma GCC diagnostic ignored "-Wunused-parameter"
@@ -91,7 +91,7 @@
  
  CL_NS_END
 +
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic pop
 +#endif
  #endif
@@ -102,7 +102,7 @@
  #define _lucene_util_PriorityQueue_
  
 +#include <config_global.h>
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
 +#endif
@@ -115,7 +115,7 @@
  
  CL_NS_END
 +
-+#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
++#if defined(__GNUC__)
 +# pragma GCC diagnostic pop
 +#endif
  #endif
diff --git a/include/cppuhelper/propertysetmixin.hxx b/include/cppuhelper/propertysetmixin.hxx
index 446ae22..73df165 100644
--- a/include/cppuhelper/propertysetmixin.hxx
+++ b/include/cppuhelper/propertysetmixin.hxx
@@ -80,8 +80,7 @@ template< typename T > class PropertySetMixin;
 
    @since UDK 3.2.1
 */
-#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \
-    && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
 #endif
@@ -478,8 +477,7 @@ private:
     PropertySetMixin( const PropertySetMixin&); // not defined
     void operator=( const PropertySetMixin&); // not defined
 };
-#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE \
-    && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic pop
 #endif
 
diff --git a/include/sal/types.h b/include/sal/types.h
index 56d6e15..e77407b 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_SCOPE && HAVE_GCC_PRAGMA_OPERATOR
+#if 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/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index 067a132..a1fe931 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -23,10 +23,8 @@
 #include <sal/types.h>
 
 #if defined __GNUC__
-#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-parameter"
-#endif
 #elif defined _MSC_VER
 #pragma warning(push, 1)
 #endif
@@ -41,9 +39,7 @@
 #include "PDFDoc.h"
 
 #if defined __GNUC__
-#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
 # pragma GCC diagnostic pop
-#endif
 #elif defined _MSC_VER
 #pragma warning(pop)
 #endif
diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx
index c04cd24..ec1cd8c 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
+#ifdef __GNUC__
 #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
+#ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
 
diff --git a/ucb/source/ucp/webdav-neon/NeonTypes.hxx b/ucb/source/ucp/webdav-neon/NeonTypes.hxx
index 514bb96..b1748c3 100644
--- a/ucb/source/ucp/webdav-neon/NeonTypes.hxx
+++ b/ucb/source/ucp/webdav-neon/NeonTypes.hxx
@@ -35,12 +35,12 @@
 #include <ne_basic.h>
 #include <ne_props.h>
 
-#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
+#if defined(__GNUC__)
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wshadow"
 #endif
 #include <ne_locks.h>
-#if defined(__GNUC__) && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE
+#if defined(__GNUC__)
 # pragma GCC diagnostic pop
 #endif
 
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index faffe19..8cbc326 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
+#ifdef __GNUC__
 #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
+#ifdef __GNUC__
 #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
+#ifdef __GNUC__
 #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
+#ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
 
diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx
index 46bf91bb..780b6bf 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
+#ifdef __GNUC__
 #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
+#ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
 
commit 86cd29772e4f0571149c479378164572fbc96034
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 2 17:54:03 2014 +0200

    remove HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY check and macro
    
    This has been supported by GCC and clang for a very long time.
    
    Change-Id: I410a2b39004c932003f8cbefe935aedb109b1163

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 f224c22..50a973f 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 929e5a0..197f2c0 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 4b1f554..44ee065 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 9bb7b65..c9abc5e 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 2168ce0..1adce6e 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 89b524c..e63bfe1 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 aa306a9..5f9b7a2 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 0a88945..446ae22 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 af98c87..56d6e15 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 f87baf4..0fe951c 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 b484881..0985b43 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 c29406e..ec00468 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 7325b6d..3900b67 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 6d7bc63..c04cd24 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 31327d3..d378cfb 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 56f6ab0..e2db4c3 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 60f46cd..faffe19 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 76c617b..46bf91bb 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
 


More information about the Libreoffice-commits mailing list