From 626aadf02f487726d1a636f4f8952dc9cac09a44 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Aug 2014 15:32:13 +0000 Subject: [PATCH] Use #pragma diagnostic for clang too, not just g++ 4.6+. Clang seems to support this #pragma just fine and it's useful for disabling deprecation warnings in wxOSX code. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 96d0ab2a79..2dd1815270 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -658,13 +658,13 @@ typedef short int WXTYPE; inline bool wxIsSameDouble(double x, double y) { return x == y; } wxGCC_WARNING_RESTORE(float-equal) */ -#if wxCHECK_GCC_VERSION(4, 6) +#if defined(__clang__) || wxCHECK_GCC_VERSION(4, 6) # define wxGCC_WARNING_SUPPRESS(x) \ _Pragma (wxSTRINGIZE(GCC diagnostic push)) \ _Pragma (wxSTRINGIZE(GCC diagnostic ignored wxSTRINGIZE(wxCONCAT(-W,x)))) # define wxGCC_WARNING_RESTORE(x) \ _Pragma (wxSTRINGIZE(GCC diagnostic pop)) -#else /* gcc < 4.6 or not gcc at all */ +#else /* gcc < 4.6 or not gcc and not clang at all */ # define wxGCC_WARNING_SUPPRESS(x) # define wxGCC_WARNING_RESTORE(x) #endif