Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
bug 822717 - remove checks for old gcc r=glandium
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Saunders committed Dec 18, 2012
1 parent 353995d commit 2bca45e
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 36 deletions.
3 changes: 1 addition & 2 deletions dom/base/nsDOMClassInfoID.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ class EventTarget;
* but it does the job adequately for our purposes.
*/

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || \
_MSC_FULL_VER >= 140050215
#if defined(__GNUC__) || _MSC_FULL_VER >= 140050215

/* Use a compiler intrinsic if one is available. */

Expand Down
2 changes: 1 addition & 1 deletion dom/plugins/ipc/PluginMessageUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ inline bool IsDrawingModelAsync(int16_t aModel) {

#if defined(_MSC_VER)
#define FULLFUNCTION __FUNCSIG__
#elif (__GNUC__ >= 4)
#elif defined(__GNUC__)
#define FULLFUNCTION __PRETTY_FUNCTION__
#else
#define FULLFUNCTION __FUNCTION__
Expand Down
2 changes: 1 addition & 1 deletion js/src/jsdhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "jstypes.h"
#include "jsutil.h"

#if defined(__GNUC__) && defined(__i386__) && (__GNUC__ >= 3) && !defined(XP_OS2)
#if defined(__GNUC__) && defined(__i386__) && !defined(XP_OS2)
#define JS_DHASH_FASTCALL __attribute__ ((regparm (3),stdcall))
#elif defined(XP_WIN)
#define JS_DHASH_FASTCALL __fastcall
Expand Down
2 changes: 1 addition & 1 deletion js/src/jslibmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/* The right copysign function is not always named the same thing. */
#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#ifdef __GNUC__
#define js_copysign __builtin_copysign
#elif defined _WIN32
#define js_copysign _copysign
Expand Down
5 changes: 2 additions & 3 deletions js/src/jstypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@

#if defined(_MSC_VER) && defined(_M_IX86)
#define JS_FASTCALL __fastcall
#elif defined(__GNUC__) && defined(__i386__) && \
((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#elif defined(__GNUC__) && defined(__i386__)
#define JS_FASTCALL __attribute__((fastcall))
#else
#define JS_FASTCALL
Expand Down Expand Up @@ -209,7 +208,7 @@ typedef int JSBool;
** }
**
***********************************************************************/
#if defined(__GNUC__) && (__GNUC__ > 2)
#ifdef __GNUC__

# define JS_LIKELY(x) (__builtin_expect((x), 1))
# define JS_UNLIKELY(x) (__builtin_expect((x), 0))
Expand Down
2 changes: 1 addition & 1 deletion memory/mozalloc/mozalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
extern "C" size_t malloc_usable_size(const void *ptr);
#endif

#if defined(__GNUC__) && (__GNUC__ > 2)
#ifdef __GNUC__
#define LIKELY(x) (__builtin_expect(!!(x), 1))
#define UNLIKELY(x) (__builtin_expect(!!(x), 0))
#else
Expand Down
3 changes: 1 addition & 2 deletions mfbt/Assertions.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), reason)
# endif
# elif defined(__GNUC__)
# if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) && \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
# define MOZ_STATIC_ASSERT(cond, reason) static_assert((cond), reason)
# endif
# elif defined(_MSC_VER)
Expand Down
4 changes: 1 addition & 3 deletions mfbt/Attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@
# define MOZ_HAVE_CXX11_OVERRIDE
# define MOZ_HAVE_CXX11_FINAL final
# endif
# if __GNUC_MINOR__ >= 4
# define MOZ_HAVE_CXX11_DELETE
# endif
# define MOZ_HAVE_CXX11_DELETE
# if __GNUC_MINOR__ >= 5
# define MOZ_HAVE_CXX11_ENUM_TYPE
# define MOZ_HAVE_CXX11_STRONG_ENUMS
Expand Down
2 changes: 1 addition & 1 deletion mfbt/Likely.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef mozilla_Likely_h_
#define mozilla_Likely_h_

#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 2))
#if defined(__clang__) || defined(__GNUC__)
# define MOZ_LIKELY(x) (__builtin_expect(!!(x), 1))
# define MOZ_UNLIKELY(x) (__builtin_expect(!!(x), 0))
#else
Expand Down
5 changes: 2 additions & 3 deletions xpcom/base/nscore.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ typedef size_t(*nsMallocSizeOfFun)(const void *p);
* NS_HIDDEN_(int) NS_FASTCALL func2(char *foo);
*/

#if defined(__i386__) && defined(__GNUC__) && \
(__GNUC__ >= 3) && !defined(XP_OS2)
#if defined(__i386__) && defined(__GNUC__) && !defined(XP_OS2)
#define NS_FASTCALL __attribute__ ((regparm (3), stdcall))
#define NS_CONSTRUCTOR_FASTCALL __attribute__ ((regparm (3), stdcall))
#elif defined(XP_WIN) && !defined(_WIN64)
Expand Down Expand Up @@ -212,7 +211,7 @@ typedef size_t(*nsMallocSizeOfFun)(const void *p);
/**
* Deprecated declarations.
*/
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
#ifdef __GNUC__
# define MOZ_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
# define MOZ_DEPRECATED __declspec(deprecated)
Expand Down
2 changes: 1 addition & 1 deletion xpcom/ds/nsMathUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ inline NS_HIDDEN_(int32_t) NS_lroundf(float x)
*/
inline NS_HIDDEN_(double) NS_hypot(double x, double y)
{
#if __GNUC__ >= 4
#ifdef __GNUC__
return __builtin_hypot(x, y);
#elif defined _WIN32
return _hypot(x, y);
Expand Down
13 changes: 1 addition & 12 deletions xpcom/glue/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,17 @@
# endif


# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
# ifdef __GNUC__
# define MOZILLA_MAY_SUPPORT_EDSP 1
# endif

# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# if defined(HAVE_ARM_SIMD)
# define MOZILLA_MAY_SUPPORT_ARMV6 1
# endif
# endif

// Technically 4.2.x only works in the CodeSourcery releases, but I don't
// know how to detect those separately from mainline gcc (which got support
// in 4.3). The Maemo version 5 SDK shipped with the CodeSourcery 4.2.1
// release, which we need to work.
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
# if defined(HAVE_ARM_NEON)
# define MOZILLA_MAY_SUPPORT_NEON 1
# endif
# endif

// ARMv7 support was merged in gcc 4.3.
# if __GNUC__> 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
# if defined(HAVE_ARM_SIMD)
# define MOZILLA_MAY_SUPPORT_ARMV7 1
# endif
Expand Down
2 changes: 1 addition & 1 deletion xpcom/glue/nsCOMPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#undef NSCAP_FEATURE_TEST_DONTQUERY_CASES
#endif

#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
#ifdef __GNUC__
// Our use of nsCOMPtr_base::mRawPtr violates the C++ standard's aliasing
// rules. Mark it with the may_alias attribute so that gcc 3.3 and higher
// don't reorder instructions based on aliasing assumptions for
Expand Down
2 changes: 1 addition & 1 deletion xpcom/glue/pldhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
extern "C" {
#endif

#if defined(__GNUC__) && defined(__i386__) && (__GNUC__ >= 3) && !defined(XP_OS2)
#if defined(__GNUC__) && defined(__i386__) && !defined(XP_OS2)
#define PL_DHASH_FASTCALL __attribute__ ((regparm (3),stdcall))
#elif defined(XP_WIN)
#define PL_DHASH_FASTCALL __fastcall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
*
*/

#if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 8))
#ifdef __GNUC__
__asm__ __volatile__(
"ldr r1, [%1, #12] \n\t" /* prepare to call invoke_count_words */
"ldr ip, [%1, #16] \n\t" /* r0=paramCount, r1=params */
Expand Down
2 changes: 1 addition & 1 deletion xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
#endif

#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
#ifdef __GNUC__
/* This tells gcc3.4+ not to optimize away symbols.
* @see http://gcc.gnu.org/gcc-3.4/changes.html
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "xptcprivate.h"
#include "xptiprivate.h"

#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
#ifdef __GNUC__
/* This tells gcc3.4+ not to optimize away symbols.
* @see http://gcc.gnu.org/gcc-3.4/changes.html
*/
Expand Down

0 comments on commit 2bca45e

Please sign in to comment.