This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14024] g++ isn't reporting aliasing warnings
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Dec 2005 16:38:27 -0000
- Subject: [Bug c++/14024] g++ isn't reporting aliasing warnings
- References: <bug-14024-7845@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from pinskia at gcc dot gnu dot org 2005-12-07 16:38 -------
(In reply to comment #8)
> that comparison isn't quite fair. strict aliasing is an optimisation that
> breaks code when compiled with a newer version of gcc, and there is lots of
> code to fix because of that.
Actually it is. Since GCC now uses the fact that signed types overflow is
undefined more than before.
I know since I was the one who made GCC use that fact more. (there are even
more going in for 4.2).
Aliasing is not that much different as every one who writes C or C++ should
know the rules about aliasing and signed overflow but most don't. Though
aliasing violations is the most reported bug, we still get bugs about signed
overflow. Both have a way to turn off the optimization that uses the facts
that the standard provides. Though both make the code really invalid C++.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14024