Reviewers: rossberg,
Message:
Note that I've used two redudant "struct"s, keeping the "true C spirit". ;-)
Description:
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.
Please review this at https://codereview.chromium.org/14850016/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M include/v8.h
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
0cb9df7896ade609b06553738e5b981f378521b3..c3ef3c0a4dece87f411cf38f026a8460e6e7a17b
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3841,25 +3841,29 @@ struct JitCodeEvent {
// 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.