From c2fe3cc9ea5f3db3c5e88b2091d991c79f034f5b Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Sun, 17 Apr 2016 17:10:00 -0700 Subject: [PATCH] Bug 1266295 - Remove unnecessary compiler version checks for gcc <= 4.8.0 in xpcom. r=froydnj --- xpcom/ds/nsAtomTable.cpp | 9 --------- xpcom/glue/nsISupportsImpl.h | 17 ++++------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/xpcom/ds/nsAtomTable.cpp b/xpcom/ds/nsAtomTable.cpp index 7b755440c503..eec0450cd23e 100644 --- a/xpcom/ds/nsAtomTable.cpp +++ b/xpcom/ds/nsAtomTable.cpp @@ -6,7 +6,6 @@ #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" -#include "mozilla/Compiler.h" #include "mozilla/HashFunctions.h" #include "mozilla/MemoryReporting.h" #include "mozilla/DebugOnly.h" @@ -38,14 +37,6 @@ using namespace mozilla; -#if defined(__clang__) -# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" -#elif MOZ_IS_GCC -# if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0) -# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" -# endif -#endif - //---------------------------------------------------------------------- class CheckStaticAtomSizes diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h index 91021028640a..166acc6bd5b6 100644 --- a/xpcom/glue/nsISupportsImpl.h +++ b/xpcom/glue/nsISupportsImpl.h @@ -38,14 +38,13 @@ // seem to handle the fallback just fine. # define MOZ_CAN_USE_IS_DESTRUCTIBLE_FALLBACK #elif defined(__GNUC__) - // GCC 4.7 is has buggy std::is_destructible -# if MOZ_USING_LIBSTDCXX && MOZ_GCC_VERSION_AT_LEAST(4, 8, 0) + // GCC 4.7 has buggy std::is_destructible. +# if MOZ_USING_LIBSTDCXX # define MOZ_HAVE_STD_IS_DESTRUCTIBLE +# endif // Some GCC versions have an ICE when using destructors in decltype(). // Works on GCC 4.8 at least. -# elif MOZ_GCC_VERSION_AT_LEAST(4, 8, 0) -# define MOZ_CAN_USE_IS_DESTRUCTIBLE_FALLBACK -# endif +# define MOZ_CAN_USE_IS_DESTRUCTIBLE_FALLBACK #endif #ifdef MOZ_HAVE_STD_IS_DESTRUCTIBLE @@ -140,14 +139,6 @@ private: #define MOZ_ASSERT_CLASSNAME(_type) \ static_assert(mozilla::IsClass<_type>::value, \ "Token '" #_type "' is not a class type.") -// Older versions of gcc can't instantiate local classes in templates. -// GCC 4.7 doesn't have this problem. -#if MOZ_IS_GCC -# if !MOZ_GCC_VERSION_AT_LEAST(4, 7, 0) -# undef MOZ_ASSERT_CLASSNAME -# define MOZ_ASSERT_CLASSNAME(_type) -# endif -#endif // Note that the following constructor/destructor logging macros are redundant // for refcounted objects that log via the NS_LOG_ADDREF/NS_LOG_RELEASE macros.