https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892

--- Comment #48 from James Kuyper Jr. <jameskuyper at alumni dot caltech.edu> 
---
(In reply to Davin McCall from comment #44)
> > Well, perhaps not, but this is the language specification.
> 
> The "one special guarantee" clause appears in the section describing union
> member access via the "." or "->" operators, implying that it only applies
> to the access of union members via the union. ...

I find nothing objectionable about that statement - it is indeed impossible to
create code which relies upon the special guarantee in 6.5.2.3p6 without
accessing the union members via the '.' or '->' operators. However, I believe
that you mean something more restricted than what you're actually saying,
because the code given in the original bug report does in fact access the union
members via '.' operator, in the expressions &u.s1 and &u.s2, to create a
situation where, as I understand it, that special guarantee is fully
applicable.
Could you expand on your description of what you think is required, to make it
clear why it doesn't apply in this case?

Reply via email to