This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11376] [3.3/3.4 regression] mozilla-1.4 miscompiled


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]