mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
* Fixed bug #1142 (GCC 4.7.0 and 4.7.1 aren't supported)
This commit is contained in:
12
Global.h
12
Global.h
@@ -99,7 +99,11 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#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
|
#endif
|
||||||
|
|
||||||
// Import + Export macro declarations
|
// Import + Export macro declarations
|
||||||
@@ -140,17 +144,17 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
|
|||||||
//defining available c++11 features
|
//defining available c++11 features
|
||||||
|
|
||||||
//initialization lists - only gcc-4.4 or later
|
//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
|
#define CPP11_USE_INITIALIZERS_LIST
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//nullptr - only msvc and gcc-4.6 or later, othervice define it as NULL
|
//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
|
#define nullptr NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//override keyword - only msvc and gcc-4.7 or later.
|
//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
|
#define override
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user