exception_defines.h #defines try/catch when -fno-exceptions.  This destroys
Objective C code using @try and @catch.  A simple fix is to insteaad in
exception_defines.h do something like (untested):

#ifndef __EXCEPTIONS
// Iff -fno-exceptions, transform error handling code to work without it.
# define __try      if (true)
# define __catch(X) if (false)
# define __throw_exception_again
#else
// Else proceed normally.
# define __try      try
# define __catch(X) catch(X)
# define __throw_exception_again throw
#endif

And then religiously use __try/__catch in libstdc++ instead of try/catch.


-- 
           Summary: exception_defines.h #defines try/catch
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hhinnant at apple dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25191

Reply via email to