diff --git a/talk/base/common.h b/talk/base/common.h index d557639e2..a76748b39 100644 --- a/talk/base/common.h +++ b/talk/base/common.h @@ -187,6 +187,10 @@ inline bool ImplicitCastToBool(bool result) { return result; } // (because it won't see this pragma). #pragma clang diagnostic ignored "-Wc++11-extensions" #define OVERRIDE override +#elif defined(__GNUC__) && __cplusplus >= 201103 && \ + (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700 +// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled. +#define OVERRIDE override #else #define OVERRIDE #endif