Is using a union through more than one member legal in D?

div0 div0 at users.sourceforge.net
Tue May 4 12:40:00 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ali Çehreli wrote:
> It is unspecified behavior in C++ to access any member of a union other
> than the one that was used last to store a value in it.
> 
> Is that the case with D as well?
> 
> Ali

yes, union in D is the same as C/C++

- --
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFL4HgQT9LetA9XoXwRAoxsAJ0fEZh5YDsZQVhMDl3XPmeQZ9UF3ACbBtZK
uRZz5TBP/j87bNcxxpDxMUg=
=xa2v
-----END PGP SIGNATURE-----


More information about the Digitalmars-d-learn mailing list