[Bug c/65892] gcc fails to implement N685 aliasing of union members
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 1 18:38:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892
--- Comment #19 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Tue, 1 Nov 2016, txr at alumni dot caltech.edu wrote:
> Five: The answer to the question is clearly No. The example code
> is very much on point to the "one special guarantee" clause, and
> so the read access p1->m is permitted. As the access is permitted,
I maintain that, as I said in comment#9, the textual history indicates
that the original intent of saying things are permitted here is *only* an
exception to the general implementation-defined nature of type punning,
not to any other reason why things might be undefined (such as aliasing
rules, data races, etc.).
More information about the Gcc-bugs
mailing list