codemaker/source/cppumaker/cpputype.cxx |    6 ++----
 sal/qa/rtl/oustring/rtl_OUString2.cxx   |   15 ---------------
 sal/rtl/ustring.cxx                     |   15 ---------------
 3 files changed, 2 insertions(+), 34 deletions(-)

New commits:
commit 414316a04fe9479dafcb36e3617ee1f5813c6a30
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Sun Sep 24 12:07:26 2023 +0300
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sun Sep 24 17:32:22 2023 +0200

    Drop some newly obsolete __clang_major__ version checks
    
    ...after 6ef2d358ac053ce0f6de9cf0f8f25e8bae66d441 "Adapt Clang and GCC 
minimum
    version checks"
    
    Change-Id: Ib25fbb76211d1bda1d230de771f207960e645421
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157204
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/codemaker/source/cppumaker/cpputype.cxx 
b/codemaker/source/cppumaker/cpputype.cxx
index cb3422de16d0..124f323630bf 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3017,10 +3017,8 @@ void ExceptionType::dumpHdlFile(
     if (name_ == "com.sun.star.uno.Exception")
     {
         // LIBO_INTERNAL_ONLY implies GCC >= 7, which we need for this
-        // Merely checking __has_include is not enough because some systems 
have the header,
-        // but do not have a new enough Clang 9 supporting 
__builtin_FILE/LINE/FUNCTION as used by
-        // that libstdc++ header.
-        includes.addCustom("#if defined LIBO_INTERNAL_ONLY && ((defined 
__GNUC__ && !defined __clang__) || (defined __clang__ && __clang_major__ >= 9)) 
&& __has_include(<experimental/source_location>)");
+        // libstdc++ header.
+        includes.addCustom("#if defined LIBO_INTERNAL_ONLY && (defined 
__GNUC__ || defined __clang__) && 
__has_include(<experimental/source_location>)");
         includes.addCustom("#define LIBO_USE_SOURCE_LOCATION");
         includes.addCustom("#endif");
         includes.addCustom("#if defined LIBO_USE_SOURCE_LOCATION");
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx 
b/sal/qa/rtl/oustring/rtl_OUString2.cxx
index b633af15626c..bff3a0d145f1 100644
--- a/sal/qa/rtl/oustring/rtl_OUString2.cxx
+++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx
@@ -38,23 +38,8 @@ namespace rtl_OUString
 
 namespace {
 
-// Avoid -fsanitize=undefined warning e.g. "runtime error: value 1e+99 is
-// outside the range of representable values of type 'float'" with Clang prior 
to
-// 
<https://github.com/llvm/llvm-project/commit/9e52c43090f8cd980167bbd2719878ae36bcf6b5>
 "Treat the
-// range of representable values of floating-point types as [-inf, +inf] not 
as [-max, +max]"
-// (ENABLE_RUNTIME_OPTIMIZATIONS is an approximation for checking whether 
building is done without
-// -fsanitize=undefined):
 float doubleToFloat(double x) {
-#if !defined __clang__ || __clang_major__ >= 9 || ENABLE_RUNTIME_OPTIMIZATIONS
     return static_cast<float>(x);
-#else
-    return
-        x < -std::numeric_limits<float>::max()
-        ? -std::numeric_limits<float>::infinity()
-        : x > std::numeric_limits<float>::max()
-        ? std::numeric_limits<float>::infinity()
-        : static_cast<float>(x);
-#endif
 }
 
 }
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index ed039c4685da..6bc595b7f3bf 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -97,23 +97,8 @@ sal_Int32 SAL_CALL rtl_ustr_valueOfDouble(sal_Unicode * 
pStr, double d)
 
 namespace {
 
-// Avoid -fsanitize=undefined warning e.g. "runtime error: value 1e+99 is
-// outside the range of representable values of type 'float'" with Clang prior 
to
-// 
<https://github.com/llvm/llvm-project/commit/9e52c43090f8cd980167bbd2719878ae36bcf6b5>
 "Treat the
-// range of representable values of floating-point types as [-inf, +inf] not 
as [-max, +max]"
-// (ENABLE_RUNTIME_OPTIMIZATIONS is an approximation for checking whether 
building is done without
-// -fsanitize=undefined):
 float doubleToFloat(double x) {
-#if !defined __clang__ || __clang_major__ >= 9 || ENABLE_RUNTIME_OPTIMIZATIONS
     return static_cast<float>(x);
-#else
-    return
-        x < -std::numeric_limits<float>::max()
-        ? -std::numeric_limits<float>::infinity()
-        : x > std::numeric_limits<float>::max()
-        ? std::numeric_limits<float>::infinity()
-        : static_cast<float>(x);
-#endif
 }
 
 }

Reply via email to