I was reading the clang documentation on reference counting, which says that “ By default in Objective-C, ARC is not exception-safe”. It proceeds to say:
A program may be compiled with the option
-fobjc-arc-exceptions
in order to enable these, or with the option-fno-objc-arc-exceptions
to explicitly disable them, with the last such argument “winning”. In Objective-C++,-fobjc-arc-exceptions
is enabled by default.
I was intrigued. Are there any other compiler options whose default change between Objective-C and Objective-C++?
Complementary question: what is difference between compiling purely Objective-C code with clang in Objective-C++ mode (*.mm
files) rather than in Objective-C mode only (*.m
)?