From fa545023ada3f2a5f79cab1ff628fd18434c7c2e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 23 Mar 2013 21:55:27 +0100 Subject: Introduce HAVE_GCC_PRAGMA_DIAGNOSTIC_{MODIFY,SCOPE} ...replacing hard-coded GCC version checks. Those checks that guard #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" appear relevant only for GCC itself, not Clang (which used to fail the old guards because it typically announces itself with a rather low __GNUC__/__GNUC_MINOR__ version), see 6e67c03dc0225fc66343546b14e902b9d238b1a3 "Enable -Wnon-virtual-dtor for GCC 4.6" Change-Id: I6bfa4d5caa6192e7a203ce829682bf6bb8d61a1b --- ucb/source/ucp/webdav-neon/NeonUri.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'ucb') diff --git a/ucb/source/ucp/webdav-neon/NeonUri.cxx b/ucb/source/ucp/webdav-neon/NeonUri.cxx index 5886429d2089..e578ccfc4691 100644 --- a/ucb/source/ucp/webdav-neon/NeonUri.cxx +++ b/ucb/source/ucp/webdav-neon/NeonUri.cxx @@ -26,6 +26,7 @@ * ************************************************************************/ +#include "sal/config.h" #include #include @@ -45,15 +46,9 @@ using namespace webdav_ucp; # pragma disable_warn # endif -#if defined __GNUC__ -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) -/* Diagnostics pragma was introduced with gcc-4.2.1 */ -#if GCC_VERSION >= 40201 +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic ignored "-Wwrite-strings" #endif -#endif namespace { -- cgit v1.2.3