From: Vadim Zeitlin Date: Mon, 8 Aug 2011 08:33:19 +0000 (+0000) Subject: Fix compilation with g++ 4.7 (prerelease). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8a625e0bb9e7db0eb7e685f15680a6f5997ddcd1 Fix compilation with g++ 4.7 (prerelease). The workaround for a bug in g++ 3.5 breaks compilation with 4.7 which implements two-phase lookup correctly, so disable this workaround for 4.7 and later. We could probably even only enable it for 3.x but this doesn't really matter as previous 4.x releases don't have problems with this anyhow. Closes #13385. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index 2c5dd24b50..2dc22cd2a2 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -467,7 +467,7 @@ WX_STRCMP_FUNC(wxStricmp, wxCRT_StricmpA, wxCRT_StricmpW, wxStricmp_String) // forward-declare the template and implement it below WX_STRCMP_FUNC. OTOH, // this fails to compile with VC6, so don't do it for VC. It also causes // problems with GCC visibility in newer GCC versions. -#if !(defined(__VISUALC__) || wxCHECK_GCC_VERSION(3,5)) || defined(__clang__) +#if !(defined(__VISUALC__) || (wxCHECK_GCC_VERSION(3,5) && !wxCHECK_GCC_VERSION(4,7))) || defined(__clang__) #define wxNEEDS_DECL_BEFORE_TEMPLATE #endif