This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Wrong RTL instruction deleted
* Robert Dewar:
> Right, the above code would be invalid. At least that's my
> understanding. It would be interesting to try the identical
> code in Ada. There for *sure* I know that the first example
> would be valid and the second example invalid :-)
I think the original C++ code is a well-formed program. It does
however result in unspecified behavior.
(Keep in mind that C++ as specified doesn't share C's aliasing rules.)