[Bug c++/48394] New: ObjC exceptions cannot be caught in ObjC++
js-gcc at webkeks dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 31 19:18:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48394
Summary: ObjC exceptions cannot be caught in ObjC++
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: js-gcc@webkeks.org
When trying to catch an ObjC exception in ObjC++, the object you get is bogus.
For example, this crashes:
@try {
@throw [[OFObject alloc] init];
} @catch (id e) {
[e release];
}
Trying to printf("%p", …) the exception before the throw and in the catch shows
that the pointer differs, which should not happen. I had this bug in various
GCC versions from 4.2 up to 4.6. I suspect even earlier versions are affected.
It would be nice if even for older versions an update could be released,
because some platforms are still stuck with gcc 4.2 or 4.4.
More information about the Gcc-bugs
mailing list