This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48394] New: ObjC exceptions cannot be caught in ObjC++
- From: "js-gcc at webkeks dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 31 Mar 2011 18:44:18 +0000
- Subject: [Bug c++/48394] New: ObjC exceptions cannot be caught in ObjC++
- Auto-submitted: auto-generated
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.