Revision: 14659
Author:   [email protected]
Date:     Tue May 14 05:04:04 2013
Log:      Don't use anonymous types declared in an anonymous union.

They are a non-standard extension (probably in C1X, IIRC), but clang is unhappy
with them when -Wnested-anon-types is enabled, which seems to be implied by
-pedantic.

With this change and the previous fix for clang, we are now -Werror clean, even
on clang 3.3.

[email protected]

Review URL: https://codereview.chromium.org/14850016
http://code.google.com/p/v8/source/detail?r=14659

Modified:
 /branches/bleeding_edge/include/v8.h

=======================================
--- /branches/bleeding_edge/include/v8.h        Mon May 13 07:18:05 2013
+++ /branches/bleeding_edge/include/v8.h        Tue May 14 05:04:04 2013
@@ -3841,25 +3841,29 @@
   // CODE_ADD_LINE_POS_INFO and CODE_END_LINE_INFO_RECORDING events.
   void* user_data;

+  struct name_t {
+ // Name of the object associated with the code, note that the string is not
+    // zero-terminated.
+    const char* str;
+    // Number of chars in str.
+    size_t len;
+  };
+
+  struct line_info_t {
+    // PC offset
+    size_t offset;
+    // Code postion
+    size_t pos;
+    // The position type.
+    PositionType position_type;
+  };
+
   union {
     // Only valid for CODE_ADDED.
-    struct {
- // Name of the object associated with the code, note that the string is
-      // not zero-terminated.
-      const char* str;
-      // Number of chars in str.
-      size_t len;
-    } name;
+    struct name_t name;

     // Only valid for CODE_ADD_LINE_POS_INFO
-    struct {
-      // PC offset
-      size_t offset;
-      // Code postion
-      size_t pos;
-      // The position type.
-      PositionType position_type;
-    } line_info;
+    struct line_info_t line_info;

     // New location of instructions. Only valid for CODE_MOVED.
     void* new_code_start;

--
--
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