https://llvm.org/bugs/show_bug.cgi?id=30278
Bug ID: 30278 Summary: fobjc-exceptions does not imply fexceptions Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Driver Assignee: unassignedclangb...@nondot.org Reporter: vr...@gcc.gnu.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified Consider basic.m: ... #import <objc/Object.h> #import <stdio.h> int main (void) { @try { printf ("try\n"); @throw nil; } @catch (...) { printf ("caught\n"); } printf ("done\n"); return 0; } ... with gcc, we have: ... $ gcc basic.m -fobjc-exceptions -lobjc && (./a.out ; echo $? ) try caught done 0 ... However, with clang, we have: ... $ clang basic.m -fobjc-exceptions -lobjc && (./a.out ; echo $? ) try Aborted (core dumped) 134 ... Only when I add -fexceptions to the clang command line, do I get the same: ... try caught done 0 ... With gcc, -fobjc-exceptions implies -fexceptions (gcc/c-family/c-opts.c): ... if (flag_objc_exceptions && !flag_objc_sjlj_exceptions) flag_exceptions = 1; ... -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs