This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/42179] Incorrect optimization (-O2) yields wrong code (regression)
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2009 11:25:14 -0000
- Subject: [Bug c/42179] Incorrect optimization (-O2) yields wrong code (regression)
- References: <bug-42179-6373@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-11-26 11:25 -------
Correct. We can either produce possibly lots of false positives or not warn.
Warning in the cases where we can prove your code is wrong would be pointless
as in that case we'd better take measures to not miscompile it (and we then
can do so as we were able to detect the situation). With 4.4 one alias
warning machinery did exactly this (warn but then not miscompile - but then
it didn't warn in cases where it _did_ miscompile).
It's generally impossible to please all folks here ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42179