Blame v8-3.14.5.10-unused-local-typedefs.patch

7131f4d
From 53b4accb6e5747b156be91a2b90f42607e33a7cc Mon Sep 17 00:00:00 2001
7131f4d
From: Timothy J Fontaine <tjfontaine@gmail.com>
7131f4d
Date: Mon, 4 Aug 2014 13:43:50 -0700
7131f4d
Subject: [PATCH] v8: Fix compliation with GCC 4.8
7131f4d
7131f4d
Supresses a very loud warning from GCC 4.8 about unused typedefs
7131f4d
7131f4d
Original url https://codereview.chromium.org/69413002
7131f4d
---
7131f4d
 src/checks.h | 9 ++++++++-
7131f4d
 1 file changed, 8 insertions(+), 1 deletion(-)
7131f4d
7131f4d
diff --git a/src/checks.h b/src/checks.h
7131f4d
index d0a0c2b..4396ada 100644
7131f4d
--- a/src/checks.h
7131f4d
+++ b/src/checks.h
7131f4d
@@ -230,6 +230,13 @@ inline void CheckNonEqualsHelper(const char* file,
7131f4d
 #define CHECK_LE(a, b) CHECK((a) <= (b))
7131f4d
 
7131f4d
 
7131f4d
+#if defined(__clang__) || defined(__GNUC__)
7131f4d
+# define V8_UNUSED __attribute__((unused))                                                                                                                                                                         
7131f4d
+#else                                                                                                                                                                                                              
7131f4d
+# define V8_UNUSED                                                                                                                                                                                                 
7131f4d
+#endif
7131f4d
+
7131f4d
+
7131f4d
 // This is inspired by the static assertion facility in boost.  This
7131f4d
 // is pretty magical.  If it causes you trouble on a platform you may
7131f4d
 // find a fix in the boost code.
7131f4d
@@ -248,7 +255,7 @@ template <int> class StaticAssertionHelper { };
7131f4d
 #define STATIC_CHECK(test)                                                    \
7131f4d
   typedef                                                                     \
7131f4d
     StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>((test))>)> \
7131f4d
-    SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
7131f4d
+    SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) V8_UNUSED
7131f4d
 
7131f4d
 
7131f4d
 extern bool FLAG_enable_slow_asserts;