Comment #20 on issue 463 by saurik: Can't build due to violations of
strict-aliasing rules
http://code.google.com/p/v8/issues/detail?id=463
Rather than activating -fno-strict-aliasing, we can also just modify the
code to not experience this issue. ;P (Personally, I'm a fan of having less
specialized command line arguments and more portable code.)
I've attached a diff that removes the special casing for
-fno-strict-aliasing and also modifies BitCast to special case casting from
a pointer. The new behavior involves casting first to a uintptr_t using
reinterpret_cast<> before casting to the target pointer type.
In so doing I also cleaned up the existing usages of BitCast to be
consistent (using a single template argument rather than over-specifying
the source of the cast). (I had to change a couple of the usages, so I
figured it made more sense to do them all at once.)
(If it matters, I think I have a copyright assignment on file. If nothing
else, I'm already listed under AUTHORS.)
Attachments:
aliasing.diff 6.3 KB
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev