From 02106526ea6ac52965bce78b1a2a739e154e0c55 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 19 Dec 2011 12:54:32 +0000 Subject: [PATCH] Don't use dummy "inline" in wxDEPRECATED_CONSTRUCTOR definition. Apparently we need this bogus "inline" for g++ < 3.4 but there is no reason to use it for the other compilers and this results in linking errors with e.g. MSVC, so remove it. Closes #13775. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index edd0e9b5a0..ad027be38f 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -529,15 +529,14 @@ typedef short int WXTYPE; #define wxDEPRECATED(x) x #endif -/* - explicitly specifying inline allows gcc < 3.4 to - handle the deprecation attribute even in the constructor. - doesn't seem to work on Apple's gcc 4.0.1 unless using -O0 -*/ -#if wxCHECK_GCC_VERSION(3, 4) || defined( __DARWIN__ ) - #define wxDEPRECATED_CONSTRUCTOR(x) x -#else +#if defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 4) + /* + We need to add dummy "inline" to allow gcc < 3.4 to handle the + deprecation attribute on the constructors. + */ #define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x) +#else + #define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED(x) #endif /* -- 2.45.2