This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11376] [3.3/3.4 regression] mozilla-1.4 miscompiled
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jul 2003 19:19:08 -0000
- Subject: [Bug c++/11376] [3.3/3.4 regression] mozilla-1.4 miscompiled
- References: <20030630081619.11376.sirl@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11376
------- Additional Comments From mark at codesourcery dot com 2003-07-08 19:19 -------
Subject: Re: [3.3/3.4 regression] mozilla-1.4 miscompiled
> Unfortunately, without some form of warning about when the
> optimization is used it is next to impossible to find and fix all
> of the occurrences.
There's no easy way to do that. The C/C++ standards say that casting
"X**" to "Y**" is OK -- the problem is *using* that pointer. And by
that point we've lost track of the fact that it was cast.
I used to be an engineer at CenterLine; our tools
(CodeCenter/ObjectCenter/AcquaProva) could catch these kinds of bugs
dynamically, and give you a sensible "your code isn't right" message
when the program ran. Unfortunately, CenterLine is largely defunct; I'm
not sure if you can still get any of these tools, and, AFAIK, there's no
open-source equivalent -- yet.