[Bug c/65892] gcc fails to implement N685 aliasing of union members

aph at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Apr 29 11:52:00 GMT 2018


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

--- Comment #40 from Andrew Haley <aph at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #29)

> Note I repeatedly said this part of the standard is just stupid.  It makes
> most if not all type-based alias analysis useless.

I don't think so.  It does mean that we'd have to feed all declared
union types (or, at least the ones containing structs with common
initial sequences) into the alias oracle.  While unpleasant, in that
simply declaring a type without even declaring an object of that type
changes code generation, it doesn't render all type-based alias
analysis useless.

> Which means I'll refuse any patches implementing it in a way that affects
> default behavior.

Maybe --pedantic or even --pedantic-aliasing?


More information about the Gcc-bugs mailing list