On Wed, Mar 6, 2013 at 11:46 AM, N.M. Maclaren <n...@cam.ac.uk> wrote: > On Mar 6 2013, Andrew Pinski wrote: >> >> >> Except GCC implements C's unions as allowing to do type punning as an >> extension and as far as GCC is concerned that is not going to change >> any time soon. >> This is a documented exception to the aliasing/type punning rules. > > > The problem is that this is worse than type punning, because it also > allows the preservation of data. Does the extension guarantee that, > or would it need a change to at least the documentation?
The documentation is not clear on whether data is preserved. I believe that as a matter of fact the data is preserved, but I don't think we need to guarantee it. Ian