From 294f9a2dbeb086df28e10a41faa2628249660f15 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 10 Apr 2011 07:59:23 +0000 Subject: [PATCH] *Core: Fixes to compile with GCC 4.6 (RM #52) git-svn-id: svn://ultimatepp.org/upp/trunk@3331 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Convert.h | 2 +- uppsrc/Core/Core.h | 1 + uppsrc/Core/config.h | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/uppsrc/Core/Convert.h b/uppsrc/Core/Convert.h index e03524009..d64996b03 100644 --- a/uppsrc/Core/Convert.h +++ b/uppsrc/Core/Convert.h @@ -28,7 +28,7 @@ public: Convert(); virtual ~Convert(); #else - #ifdef __clang__ + #if defined(__clang__) || GCC_VERSION >= 40600 Convert(){}; #endif virtual ~Convert() {} diff --git a/uppsrc/Core/Core.h b/uppsrc/Core/Core.h index ae4c0a57d..230ef888c 100644 --- a/uppsrc/Core/Core.h +++ b/uppsrc/Core/Core.h @@ -37,6 +37,7 @@ #include "config.h" #include +#include #include #include #include diff --git a/uppsrc/Core/config.h b/uppsrc/Core/config.h index 7e7938b20..0b5b6691b 100644 --- a/uppsrc/Core/config.h +++ b/uppsrc/Core/config.h @@ -1,6 +1,10 @@ #if __GNUC__ #define COMPILER_GCC 1 + + #define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) #if __WIN32 #define COMPILER_MINGW