]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix compilation with g++ 4.7 (prerelease).
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Aug 2011 08:33:19 +0000 (08:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Aug 2011 08:33:19 +0000 (08:33 +0000)
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

include/wx/wxcrt.h

index 2c5dd24b505fa97de4d0ef04330c7453c9b4f91a..2dc22cd2a25cf6443029fbd9daa47f6a1448f446 100644 (file)
@@ -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.
 // 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
 
     #define wxNEEDS_DECL_BEFORE_TEMPLATE
 #endif