On 2014/03/28 11:46:04, Sven Panne wrote:

https://codereview.chromium.org/213943002/diff/20001/src/arm64/simulator-arm64.h
File src/arm64/simulator-arm64.h (right):


https://codereview.chromium.org/213943002/diff/20001/src/arm64/simulator-arm64.h#newcode179
src/arm64/simulator-arm64.h:179: } reg = { new_value };
On 2014/03/27 19:58:33, Fritz wrote:
> I'm specifically trying to type-alias here in a safe way. [...]

I don't think that such a thing is possible: IIRC, the only defined way of
using
a union is accessing its fields consistently, i.e. read only out of the field
you have last written into, everything else is totally undefined (at least
this
was the definition for C). Or in other words: The only safe way to use a union
is to save space, not to do some funny casting/conversion tricks.

Has this changed in C++? If yes, could somebody point me to the right section
of
the spec? It would be good to know, because I'm quite sure we already had
trouble in this area.

The best way I can read it is that it is not defined. Here is a GCC doc calling it out explicitly as legal. But I'm sure that's just one of many compilers that
need to be supported.

http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Optimize-Options.html under
-fstrict-aliasing

Is there a minimum c++ spec that v8 adheres to?

https://codereview.chromium.org/213943002/

--
--
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/d/optout.

Reply via email to