[Bug c++/11376] [3.3/3.4 regression] mozilla-1.4 miscompiled
mark at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 8 19:19:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list