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++/48394] New: ObjC exceptions cannot be caught in ObjC++


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.


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