From 8ff57504f75ddd35c3f585cf2224c6fcc3863ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 21 Aug 2021 21:38:46 +0100 Subject: [PATCH] WaE: protect clang diagnostic push/pop with if defined __clang__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8360aa96097a13b6bad1283edddc7c2fd1ed510d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120832 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx index a22ac393b5f7..001384e005fc 100644 --- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx @@ -187,11 +187,15 @@ static void MapReturn(sal_uInt32 r0, sal_uInt32 r1, typelib_TypeDescriptionRefer #if !defined(__ARM_PCS_VFP) && (defined(__ARM_EABI__) || defined(__SOFTFP__)) pRegisterReturn[0] = r0; #else +#if defined __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wuninitialized" +#endif register float fret asm("s0"); *reinterpret_cast(pRegisterReturn) = fret; +#if defined __clang__ #pragma clang diagnostic pop +#endif #endif break; case typelib_TypeClass_DOUBLE: @@ -199,11 +203,15 @@ static void MapReturn(sal_uInt32 r0, sal_uInt32 r1, typelib_TypeDescriptionRefer pRegisterReturn[1] = r1; pRegisterReturn[0] = r0; #else +#if defined __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wuninitialized" +#endif register double dret asm("d0"); *reinterpret_cast(pRegisterReturn) = dret; +#if defined __clang__ #pragma clang diagnostic pop +#endif #endif break; case typelib_TypeClass_STRUCT: