------- Comment #4 from pinskia at gcc dot gnu dot org  2005-11-29 17:47 -------
(In reply to comment #3)
> I know it breaks aliasing rules, but this problem was not present in gcc-3.3.

So ...

GCC 4.1 includes more optimization than 3.3 did which takes advantage of the
aliasing rules.

Note this is only undefined behavior.  There are lots of undefined behavior
which we don't warn about.  An example is signed overflow, if we warned about
that it would show up in the simple i++ or i = a + b example.

The warning was a bug which was filed a long time ago and was just only fixed.

Also I should note different targets would show up aliasing violating
differently.  PPC will show more than x86 since the scheduler uses the
information and PPC relies more and than the shceduler than x86 does.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25152

Reply via email to