From c05c05962d6011156376f93d2eabe49eabfc5cc2 Mon Sep 17 00:00:00 2001 From: beegee1 Date: Wed, 24 Oct 2012 15:29:54 +0000 Subject: [PATCH] * Fixed bug #1142 (GCC 4.7.0 and 4.7.1 aren't supported) --- Global.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Global.h b/Global.h index c403225cc..8fa1c9898 100644 --- a/Global.h +++ b/Global.h @@ -99,7 +99,11 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte) #endif #ifdef __GNUC__ -#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__ ) +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__) +#endif + +#if defined(__GNUC__) && (GCC_VERSION == 470 || GCC_VERSION == 471) +#error This GCC version has buggy std::array::at version and should not be used. Please update to 4.7.2 or use 4.6.x. #endif // Import + Export macro declarations @@ -140,17 +144,17 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte) //defining available c++11 features //initialization lists - only gcc-4.4 or later -#if defined(__clang__) || (defined(__GNUC__) && (GCC_VERSION >= 404)) +#if defined(__clang__) || (defined(__GNUC__) && (GCC_VERSION >= 440)) #define CPP11_USE_INITIALIZERS_LIST #endif //nullptr - only msvc and gcc-4.6 or later, othervice define it as NULL -#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 406)) +#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 460)) #define nullptr NULL #endif //override keyword - only msvc and gcc-4.7 or later. -#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 407)) +#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 470)) #define override #endif