From 748627dc7e88a0ec375f4e103906929cf99eb676 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 19 Dec 2017 08:34:37 +0100
Subject: Silence -Wunknown-attributes with Clang <= 3.6

Change-Id: I2d1ec919da5b26b231598e01a52a1508c72ab815
Reviewed-on: https://gerrit.libreoffice.org/46765
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'svx')

diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 9572e7ac491e..4d2e3ffbbcfd 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <config_clang.h>
 #include <svx/EnhancedCustomShape2d.hxx>
 #include <rtl/ustring.hxx>
 #include <osl/diagnose.h>
@@ -462,7 +465,7 @@ public:
         mpSecondArg( rSecondArg )
     {
     }
-#if defined(__clang__) || (defined (__GNUC__) && __GNUC__ >= 8)
+#if (defined(__clang__) && CLANG_VERSION >=30700) || (defined (__GNUC__) && __GNUC__ >= 8)
     //GetEquationValueAsDouble calls isFinite on the result
     __attribute__((no_sanitize("float-divide-by-zero")))
 #endif
-- 
cgit