This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34803] wrong code for dereferencing type-punned pointer
- From: "gin at mo dot msk dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2008 00:49:34 -0000
- Subject: [Bug c/34803] wrong code for dereferencing type-punned pointer
- References: <bug-34803-455@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from gin at mo dot msk dot ru 2008-01-16 00:49 -------
Subject: Re: wrong code for dereferencing type-punned pointer
> obviously violating c aliasing rules here.
Certainly. Was quite explicit about that:
That is,
`-fno-strict-aliasing' no longer disables optimizations that require
strict aliasing rules in code.
To reproduce compiler (still) doing such an optimizations (and
breaking code), one has to violate aliasing rules.
Also confirming that one may factor these separate issues in the report.
. Compiler ignores `-fno-strict-aliasing'. Expecting that can violate
aliasing rules, and tell compiler to allow that, by passing this
option. The expectation is based on both option documentation and
earlier gcc versions actually doing so.
. Warning not issued, even when compiler does optimizations that
require code to conform to c strictest aliasing rules.
On request will confine this bug database entry to one of them, and
post another issue as separate bug database entry.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34803