[Bug c++/11376] [3.3/3.4 regression] mozilla-1.4 miscompiled
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Mon Jun 30 13:20: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 giovannibajo at libero dot it 2003-06-30 13:20 -------
The bug cannot be reproduced on i686-pc-cygwin. Anyway, I have some comments on
the code:
- Are the specializations of nsCOMPtr<> and nsGetterAddRefs<> really necessary
to trigger the bug? They look to me just manual replacements of the template
argument. If the are needed, did you try removing the definition of the general
templates?
- Are all the member functions of the templates really used by the program?
- This:
nsDerivedSafe<T>*
get() const
{
return reinterpret_cast< nsDerivedSafe<T>* >(mRawPtr);
}
is not typesafe and generates undefined behaviour if you do anything with the
returned pointer BUT casting it back to its original type (nsISupports*).
More information about the Gcc-bugs
mailing list