diff --git a/build/docs/supported-configurations.rst b/build/docs/supported-configurations.rst index cc2c1ea728..eaa18172c6 100644 --- a/build/docs/supported-configurations.rst +++ b/build/docs/supported-configurations.rst @@ -52,4 +52,4 @@ packages for popular Linux distributions. ``configure`` will typically detect missing dependencies and inform you how to disable features to work around unsatisfied dependencies. -Clang 3.3 or GCC 4.4 is required to build the tree. +Clang 3.3 or GCC 4.7 is required to build the tree. diff --git a/dom/bindings/ErrorResult.h b/dom/bindings/ErrorResult.h index 26f64ae3db..5b2e73f440 100644 --- a/dom/bindings/ErrorResult.h +++ b/dom/bindings/ErrorResult.h @@ -41,10 +41,6 @@ public: mResult = NS_OK; #ifdef DEBUG - // ErrorResult is extremely performance-sensitive code, where literally - // every machine instruction matters. Initialize mMessage only to suppress - // a debug-only warning from gcc 4.6. - mMessage = nullptr; mMightHaveUnreportedJSException = false; #endif } diff --git a/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h b/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h index 171ab01c2a..8061860aad 100644 --- a/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h +++ b/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h @@ -13,7 +13,7 @@ #include "mozilla/ipc/BluetoothDaemonConnection.h" #include "nsThreadUtils.h" -#if MOZ_IS_GCC && MOZ_GCC_VERSION_AT_LEAST(4, 7, 0) +#if MOZ_IS_GCC /* use designated array initializers if supported */ #define INIT_ARRAY_AT(in_, out_) \ [in_] = out_ diff --git a/dom/bluetooth/bluedroid/BluetoothHALHelpers.h b/dom/bluetooth/bluedroid/BluetoothHALHelpers.h index 6e963463ad..34d89b8839 100644 --- a/dom/bluetooth/bluedroid/BluetoothHALHelpers.h +++ b/dom/bluetooth/bluedroid/BluetoothHALHelpers.h @@ -19,7 +19,7 @@ #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "nsThreadUtils.h" -#if MOZ_IS_GCC && MOZ_GCC_VERSION_AT_LEAST(4, 7, 0) +#if MOZ_IS_GCC /* use designated array initializers if supported */ #define CONVERT(in_, out_) \ [in_] = out_ diff --git a/dom/bluetooth2/BluetoothCommon.h b/dom/bluetooth2/BluetoothCommon.h index b3e722e22b..79cf6640f1 100644 --- a/dom/bluetooth2/BluetoothCommon.h +++ b/dom/bluetooth2/BluetoothCommon.h @@ -16,7 +16,7 @@ extern bool gBluetoothDebugFlag; #define SWITCH_BT_DEBUG(V) (gBluetoothDebugFlag = V) -#if MOZ_IS_GCC && MOZ_GCC_VERSION_AT_LEAST(4, 7, 0) +#if MOZ_IS_GCC /* use designated array initializers if supported */ #define INIT_ARRAY_AT(in_, out_) \ [in_] = out_ diff --git a/dom/plugins/base/npfunctions.h b/dom/plugins/base/npfunctions.h index 05ce852209..9927258ec5 100644 --- a/dom/plugins/base/npfunctions.h +++ b/dom/plugins/base/npfunctions.h @@ -215,8 +215,7 @@ typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32); #endif #if defined(XP_UNIX) -/* GCC 3.3 and later support the visibility attribute. */ -#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) +#if defined(__GNUC__) #define NP_VISIBILITY_DEFAULT __attribute__((visibility("default"))) #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) #define NP_VISIBILITY_DEFAULT __global diff --git a/js/src/jsapi-tests/tests.h b/js/src/jsapi-tests/tests.h index 483c6646d2..a85e45d90e 100644 --- a/js/src/jsapi-tests/tests.h +++ b/js/src/jsapi-tests/tests.h @@ -142,9 +142,6 @@ class JSAPITest return JSAPITestString(JS_VersionToString(v)); } - // Note that in some still-supported GCC versions (we think anything before - // GCC 4.6), this template does not work when the second argument is - // nullptr. It infers type U = long int. Use CHECK_NULL instead. template bool checkEqual(const T& actual, const U& expected, const char* actualExpr, const char* expectedExpr, diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 2592fed133..b5876ada14 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -918,8 +918,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext, kidReflowState.emplace(aPresContext, aReflowState, kidFrame, LogicalSize(kidFrame->GetWritingMode(), kidAvailSize), - // Cast needed for gcc 4.4. - uint32_t(nsHTMLReflowState::CALLER_WILL_INIT)); + nsHTMLReflowState::CALLER_WILL_INIT); InitChildReflowState(*aPresContext, kidAvailSize, borderCollapse, *kidReflowState); diff --git a/mfbt/tests/TestMaybe.cpp b/mfbt/tests/TestMaybe.cpp index f1b098e99e..603b39967b 100644 --- a/mfbt/tests/TestMaybe.cpp +++ b/mfbt/tests/TestMaybe.cpp @@ -26,16 +26,6 @@ using mozilla::UniquePtr; #if MOZ_IS_MSVC template struct Identity { typedef T type; }; # define DECLTYPE(EXPR) Identity::type -#elif MOZ_IS_GCC -// Work around a bug in GCC < 4.7 that prevents expressions of -// the form |decltype(foo)::type| from working. See here: -// http://stackoverflow.com/questions/14330768/c11-compiler-error-when-using-decltypevar-followed-by-internal-type-of-var -# if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0) -# define DECLTYPE(EXPR) decltype(EXPR) -# else - template struct Identity { typedef T type; }; -# define DECLTYPE(EXPR) Identity::type -# endif #else # define DECLTYPE(EXPR) decltype(EXPR) #endif diff --git a/mozglue/build/SSE.cpp b/mozglue/build/SSE.cpp index f125d527d7..1a087c70c8 100644 --- a/mozglue/build/SSE.cpp +++ b/mozglue/build/SSE.cpp @@ -16,7 +16,6 @@ namespace { #ifdef HAVE_CPUID_H -// cpuid.h is available on gcc 4.3 and higher on i386 and x86_64 #include enum CPUIDRegister { eax = 0, ebx = 1, ecx = 2, edx = 3 }; diff --git a/mozglue/build/SSE.h b/mozglue/build/SSE.h index 1d10cc5bab..7bb8702deb 100644 --- a/mozglue/build/SSE.h +++ b/mozglue/build/SSE.h @@ -40,11 +40,6 @@ * ... * } * - * Note that these functions depend on cpuid intrinsics only available in gcc - * 4.3 or later and MSVC 8.0 (Visual C++ 2005) or later, so they return false - * in older compilers. (This could be fixed by replacing the code with inline - * assembly.) - * * * USING INTRINSICS * ================ diff --git a/netwerk/sctp/src/user_atomic.h b/netwerk/sctp/src/user_atomic.h index 33659cd226..ef8869a27c 100755 --- a/netwerk/sctp/src/user_atomic.h +++ b/netwerk/sctp/src/user_atomic.h @@ -84,10 +84,8 @@ static inline void atomic_init() {} /* empty when we are not using atomic_mtx */ #endif #else -/* Using gcc built-in functions for atomic memory operations +/* To use gcc built-in functions for atomic memory operations compile with -march=i486 Reference: http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html - Requires gcc version 4.1.0 - compile with -march=i486 */ /*Atomically add V to *P.*/ diff --git a/nsprpub/pr/include/md/_linux.h b/nsprpub/pr/include/md/_linux.h index 2a2ad53da0..1b20186df6 100644 --- a/nsprpub/pr/include/md/_linux.h +++ b/nsprpub/pr/include/md/_linux.h @@ -151,8 +151,7 @@ extern PRInt32 _PR_ppc_AtomicSet(PRInt32 *val, PRInt32 newval); #endif #if defined(__powerpc64__) -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) -/* Use GCC built-in functions */ +#if (__GNUC__) #define _PR_HAVE_ATOMIC_OPS #define _MD_INIT_ATOMIC() #define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1) diff --git a/nsprpub/pr/include/prtypes.h b/nsprpub/pr/include/prtypes.h index 52b3ab0b19..2e410d5923 100644 --- a/nsprpub/pr/include/prtypes.h +++ b/nsprpub/pr/include/prtypes.h @@ -119,9 +119,7 @@ #else /* Unix */ -/* GCC 3.3 and later support the visibility attribute. */ -#if (__GNUC__ >= 4) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) +#if (__GNUC__) #define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) #else #define PR_VISIBILITY_DEFAULT diff --git a/nsprpub/pr/src/misc/prdtoa.c b/nsprpub/pr/src/misc/prdtoa.c index 2276926136..e06eeaa1a3 100644 --- a/nsprpub/pr/src/misc/prdtoa.c +++ b/nsprpub/pr/src/misc/prdtoa.c @@ -9,7 +9,7 @@ * The author of dtoa.c was not willing to add the parentheses suggested by * GCC, so we suppress these warnings. */ -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) +#if (__GNUC__) #pragma GCC diagnostic ignored "-Wparentheses" #endif diff --git a/xpcom/ds/nsAtomTable.cpp b/xpcom/ds/nsAtomTable.cpp index 80d69156c1..b2e508dd1a 100644 --- a/xpcom/ds/nsAtomTable.cpp +++ b/xpcom/ds/nsAtomTable.cpp @@ -26,12 +26,8 @@ using namespace mozilla; -#if defined(__clang__) +#if defined(__clang__) || defined(__GNUC__) # 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 /** diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h index 59bcafe3bf..d4988fa426 100644 --- a/xpcom/glue/nsISupportsImpl.h +++ b/xpcom/glue/nsISupportsImpl.h @@ -156,14 +156,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. diff --git a/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_openbsd.cpp b/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_openbsd.cpp index f63d0c1e28..49bbd8a45c 100644 --- a/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_openbsd.cpp +++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_openbsd.cpp @@ -9,15 +9,9 @@ #include "xptiprivate.h" #ifdef __GNUC__ -/* This tells gcc3.4+ not to optimize away symbols. - * @see http://gcc.gnu.org/gcc-3.4/changes.html +/* This tells GCC not to optimize away symbols. */ #define DONT_DROP_OR_WARN __attribute__((used)) -#else -/* This tells older gccs not to warn about unused vairables. - * @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html - */ -#define DONT_DROP_OR_WARN __attribute__((unused)) #endif /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */