This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: No warning when breaking strict-aliasing rules despite -Wstrict-aliasing
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Anders Torger <torger at ludd dot luth dot se>
- Cc: gcc-bugs at gcc dot gnu dot org, Andreas Schwab <schwab at suse dot de>
- Date: Tue, 9 Nov 2004 14:27:20 -0500
- Subject: Re: No warning when breaking strict-aliasing rules despite -Wstrict-aliasing
- References: <200411092023.46209.torger@ludd.luth.se>
On Nov 9, 2004, at 2:23 PM, Anders Torger wrote:
gcc 2.95 generates correct code.
It just generates code which you expected not the code which
the C standard says it is undefined (oh by the way we could wipe
your HD if you invoke undefined behavior).
Also a DR report says we cannot error out on undefined code
because it might not execute at all.
Thanks,
Andrew Pinski