Fix override being used on gcc 4.3 to 4.6.
This commit is contained in:
@@ -1394,10 +1394,12 @@ make_compiler_cflags() {
|
||||
flags="$flags -Wnon-virtual-dtor"
|
||||
fi
|
||||
|
||||
if [ $cc_version -ge 43 ]; then
|
||||
if [ $cc_version -ge 47 ]; then
|
||||
cxxflags="$cxxflags -std=gnu++11"
|
||||
elif [ $cc_version -ge 43 ]; then
|
||||
# Use gnu++0x mode so static_assert() is available.
|
||||
# Don't use c++0x, it breaks mingw (with gcc 4.4.0).
|
||||
cxxflags="$cxxflags -std=gnu++0x"
|
||||
cxxflags="$cxxflags -std=gnu++0x -DDISABLE_OVERRIDE"
|
||||
fi
|
||||
|
||||
if [ $cc_version -eq 45 ]; then
|
||||
|
@@ -521,7 +521,7 @@ static inline void free(const void *ptr)
|
||||
* Use of the override keyword can prevent various types of problems when the base method signature is changed, but derived overriding methods are not
|
||||
* This is conditional to maintain compatibility with legacy compilers
|
||||
*/
|
||||
#if __cplusplus >= 201103L || defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
|
||||
#if !defined(DISABLE_OVERRIDE) && (__cplusplus >= 201103L || defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__))
|
||||
#define OVERRIDE override
|
||||
#else
|
||||
#define OVERRIDE
|
||||
|
Reference in New Issue
Block a user