Reviewers: Benedikt Meurer,

Message:
PTAL.

The SEMI_STATIC_JOIN fix using __attribute__((unused)) is what boost does too.

I've tested this CL on Gentoo with GCC 4.8.1 and on Ubuntu Precise with GCC
4.6.3.

Description:
Fix compilation with GCC 4.8

BUG=v8:2767,v8:2149

Please review this at https://codereview.chromium.org/69413002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -4 lines):
  M include/v8.h
  M src/checks.h
  M test/cctest/test-macro-assembler-x64.cc


Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 1f8cbfd83b0e0986336b9b0bcef6985d0659a4ef..d3471c55914b3c74aa0cf7cf53618f60b7292359 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5819,7 +5819,6 @@ void ReturnValue<T>::Set(int32_t i) {
 template<typename T>
 void ReturnValue<T>::Set(uint32_t i) {
   TYPE_CHECK(T, Integer);
-  typedef internal::Internals I;
   // Can't simply use INT32_MAX here for whatever reason.
   bool fits_into_int32_t = (i & (1U << 31)) == 0;
   if (V8_LIKELY(fits_into_int32_t)) {
Index: src/checks.h
diff --git a/src/checks.h b/src/checks.h
index 9d2db28d8f3106f1e781c2d69820089d7b82f0ad..a6df48e9147ff6ec5509b35cf9a04ee054e450dc 100644
--- a/src/checks.h
+++ b/src/checks.h
@@ -268,7 +268,8 @@ template <int> class StaticAssertionHelper { };
#define STATIC_CHECK(test) \ typedef \ StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>((test))>)> \
-    SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
+ SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) \
+    __attribute__((unused))  // Silence GCC-4.8's warnings.
 #endif


Index: test/cctest/test-macro-assembler-x64.cc
diff --git a/test/cctest/test-macro-assembler-x64.cc b/test/cctest/test-macro-assembler-x64.cc index 3d28fc0a03335dd0f08d28a1eb9bd59237fc2156..a85d8e0468154c3e447914283289cc1396e6a492 100644
--- a/test/cctest/test-macro-assembler-x64.cc
+++ b/test/cctest/test-macro-assembler-x64.cc
@@ -2327,8 +2327,8 @@ TEST(PositiveSmiTimesPowerOfTwoToInteger64) {

 TEST(OperandOffset) {
   i::V8::Initialize(NULL);
-  int data[256];
-  for (int i = 0; i < 256; i++) { data[i] = i * 0x01010101; }
+  uint32_t data[256];
+  for (uint32_t i = 0; i < 256; i++) { data[i] = i * 0x01010101; }

   // Allocate an executable page of memory.
   size_t actual_size;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to