chart2/source/inc/DataSeries.hxx                              |    2 -
 chart2/source/inc/Diagram.hxx                                 |    2 -
 include/cppcanvas/canvas.hxx                                  |    2 -
 o3tl/qa/test-string_view.cxx                                  |    4 --
 sal/qa/rtl/strings/test_ostring_concat.cxx                    |   14 ----------
 sal/qa/rtl/strings/test_oustring_concat.cxx                   |    7 -----
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |    2 -
 sw/inc/calbck.hxx                                             |    4 +-
 sw/source/core/txtnode/modeltoviewhelper.cxx                  |    4 +-
 vcl/source/filter/png/PngImageReader.cxx                      |    7 -----
 vcl/unx/generic/fontmanager/fontconfig.cxx                    |    7 -----
 11 files changed, 5 insertions(+), 50 deletions(-)

New commits:
commit 72da78be20ebe1cd62ba7a5ac6e29b9d40f00f15
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Sun Sep 24 11:57:35 2023 +0300
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Sun Sep 24 17:31:16 2023 +0200

    Drop some newly obsolete __GNUC__ version checks
    
    ...after 6ef2d358ac053ce0f6de9cf0f8f25e8bae66d441 "Adapt Clang and GCC 
minimum
    version checks"
    
    Change-Id: I5f3bcda2ce8e0e093af3bdd9d2cca741a5b95306
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157202
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/chart2/source/inc/DataSeries.hxx b/chart2/source/inc/DataSeries.hxx
index 932fcd836b9a..e643486d5992 100644
--- a/chart2/source/inc/DataSeries.hxx
+++ b/chart2/source/inc/DataSeries.hxx
@@ -61,9 +61,7 @@ typedef ::cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS DataSeries
-#if !defined __GNUC__ || __GNUC__ >= 12 || defined __clang__
     final
-#endif
     : public impl::DataSeries_Base
     , public ::property::OPropertySet
 {
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
index 65532a9a512d..1d3e8bd78901 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -73,9 +73,7 @@ typedef ::cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS Diagram
-#if !defined __GNUC__ || __GNUC__ >= 12 || defined __clang__
     final
-#endif
     : public impl::Diagram_Base
     , public ::property::OPropertySet
 {
diff --git a/include/cppcanvas/canvas.hxx b/include/cppcanvas/canvas.hxx
index 97562ede24fb..2fce102824dd 100644
--- a/include/cppcanvas/canvas.hxx
+++ b/include/cppcanvas/canvas.hxx
@@ -68,9 +68,7 @@ namespace cppcanvas
         Canvas(Canvas const &) = default;
         Canvas(Canvas &&) = default;
         Canvas & operator =(Canvas const &) = default;
-#if !(defined __GNUC__ && !defined __clang__ && __GNUC__ == 8) // bogus 
-Werror=virtual-move-assign
         Canvas & operator =(Canvas &&) = default;
-#endif
 
         virtual ~Canvas() {}
 
diff --git a/o3tl/qa/test-string_view.cxx b/o3tl/qa/test-string_view.cxx
index bbe5cbf0eddc..c534adbd945f 100644
--- a/o3tl/qa/test-string_view.cxx
+++ b/o3tl/qa/test-string_view.cxx
@@ -20,9 +20,6 @@
 #include <rtl/string.hxx>
 #include <rtl/ustring.hxx>
 
-// gcc 11.2.0 triggers a spurious -Werror=stringop-overread
-#if !(defined __GNUC__ && __GNUC__ == 11 && __GNUC_MINOR__ == 2)
-
 template <>
 inline std::string
 CppUnit::assertion_traits<std::u16string_view>::toString(std::u16string_view 
const& x)
@@ -752,6 +749,5 @@ private:
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 }
-#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx 
b/sal/qa/rtl/strings/test_ostring_concat.cxx
index 11bf8ebf80af..f7bc41e3cf95 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -64,23 +64,9 @@ void test::ostring::StringConcat::checkConcat()
     CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringBuffer( "foo" ) 
+ "bar" ));
     CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, const char[ 4 
] > )), typeid( OStringBuffer( "foo" ) + "bar" ));
     CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" 
) + "bar" ));
-#if defined __GNUC__ && __GNUC__ <= 11 && !defined __clang__
-    CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char[ 4 ] > )), typeid( OStringLiteral<4>( "foo" ) + "bar" ));
-        // the explicit OStringLiteral<4> template argument in the unevaluated 
typeid context
-        // is needed by some GCC versions, see 
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878>
-        // "Failed class template argument deduction in unevaluated, 
parenthesized context"
-#else
     CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char[ 4 ] > )), typeid( OStringLiteral( "foo" ) + "bar" ));
-#endif
     CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringLiteral( "foo" 
) + static_cast<const char*>("bar") ));
-#if defined __GNUC__ && __GNUC__ <= 11 && !defined __clang__
-    CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char* > )), typeid( OStringLiteral<4>( "foo" ) + static_cast<const 
char*>("bar") ));
-        // the explicit OStringLiteral<4> template argument in the unevaluated 
typeid context
-        // is needed by some GCC versions, see 
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878>
-        // "Failed class template argument deduction in unevaluated, 
parenthesized context"
-#else
     CPPUNIT_ASSERT_EQUAL(( typeid( OStringConcat< OStringLiteral<4>, const 
char* > )), typeid( OStringLiteral( "foo" ) + static_cast<const char*>("bar") 
));
-#endif
     const char d1[] = "xyz";
     char d2[] = "abc";
     const char* d3 = d1;
diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx 
b/sal/qa/rtl/strings/test_oustring_concat.cxx
index 7e69db26ed4e..e7c42636830a 100644
--- a/sal/qa/rtl/strings/test_oustring_concat.cxx
+++ b/sal/qa/rtl/strings/test_oustring_concat.cxx
@@ -65,14 +65,7 @@ void test::oustring::StringConcat::checkConcat()
     CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUStringBuffer( 
"foo" ) + "bar" ));
     CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringBuffer, const char[ 
4 ] > )), typeid( OUStringBuffer( "foo" ) + "bar" ));
     CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUStringLiteral( 
u"foo" ) + "bar" ));
-#if defined __GNUC__ && __GNUC__ <= 11 && !defined __clang__
-    CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringLiteral<4>, const 
char[ 4 ] > )), typeid( OUStringLiteral<4>( u"foo" ) + "bar" ));
-        // the explicit OUStringLiteral<4> template argument in the 
unevaluated typeid context
-        // is needed by some GCC versions, see 
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878>
-        // "Failed class template argument deduction in unevaluated, 
parenthesized context"
-#else
     CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUStringLiteral<4>, const 
char[ 4 ] > )), typeid( OUStringLiteral( u"foo" ) + "bar" ));
-#endif
     const char d1[] = "xyz";
     CPPUNIT_ASSERT_EQUAL( OUString( "fooxyz" ), OUString( OUString( "foo" ) + 
d1 ));
     CPPUNIT_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, const char[ 4 ] > 
)), typeid( OUString( "foo" ) + d1 ));
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index dfa8c2380616..c9d644ca08ec 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -467,7 +467,7 @@ public:
         mpSecondArg(std::move( xSecondArg ))
     {
     }
-#if defined(__clang__) || (defined (__GNUC__) && __GNUC__ >= 8)
+#if defined(__clang__) || defined (__GNUC__)
     //GetEquationValueAsDouble calls isFinite on the result
     __attribute__((no_sanitize("float-divide-by-zero")))
 #endif
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 9cbba5d1bd6e..2f0d2d17bcbc 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -292,12 +292,12 @@ namespace sw
                 : m_rRoot(rModify)
             {
                 MoveTo(s_pClientIters);
-#if defined __GNUC__ && __GNUC__ >= 12 && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdangling-pointer"
 #endif
                 s_pClientIters = this;
-#if defined __GNUC__ && __GNUC__ >= 12 && !defined __clang__
+#if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic pop
 #endif
                 m_pCurrent = m_pPosition = m_rRoot.m_pWriterListeners;
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx 
b/sw/source/core/txtnode/modeltoviewhelper.cxx
index 21835e90b14e..4ce9f7309870 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -187,14 +187,14 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode 
&rNode,
                             [](auto const& it) { return it.second; }))
                     {
 // prevent -Werror=maybe-uninitialized under gcc 11.2.0
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 11 && __GNUC__ <= 12
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 12
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
                         // i is still hidden but the Range end is oddly "-1"
                         aHiddenMulti.Select({*oStartHidden, i}, true);
                         oStartHidden.reset();
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 11 && __GNUC__ <= 12
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 12
 #pragma GCC diagnostic pop
 #endif
                     }
diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index 8b6e319a473c..8934c08ccaa9 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -308,10 +308,6 @@ bool fcTLbeforeIDAT(SvStream& rStream)
     return false;
 }
 
-#if defined __GNUC__ && __GNUC__ == 8 && !defined __clang__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wclobbered"
-#endif
 bool reader(SvStream& rStream, Graphic& rGraphic,
             GraphicFilterImportFlags nImportFlags = 
GraphicFilterImportFlags::NONE,
             BitmapScopedWriteAccess* pAccess = nullptr,
@@ -805,9 +801,6 @@ BinaryDataContainer getMsGifChunk(SvStream& rStream)
             return {};
     }
 }
-#if defined __GNUC__ && __GNUC__ == 8 && !defined __clang__
-#pragma GCC diagnostic pop
-#endif
 
 } // anonymous namespace
 
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index eda4405e6658..d793d45cb51d 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -17,13 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 10
-// gcc 10.2.0 gets unhappy about one of the OString inside PrintFont at line 
656 (while at least a
-// recent GCC 12 trunk is happy);
-// I have to turn it off here because the warning actually occurs inside 
rtl::OString
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#endif
-
 #include <sal/config.h>
 
 #include <memory>

Reply via email to