|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Studio 12.3: C++ User's Guide Oracle Solaris Studio 12.3 Information Library|
If you know that exceptions are not used in a program, you can use the compiler option features=no%except to suppress generation of code that supports exception handling. The use of the option results in slightly smaller code size and faster code execution. However, when files compiled with exceptions disabled are linked to files using exceptions, some local objects in the files compiled with exceptions disabled are not destroyed when exceptions occur. By default, the compiler generates code to support exception handling. Unless the time and space overhead is significant, leaving exceptions enabled is usually better.
Note - Because the C++ standard library, dynamic_cast, and the default operator new require exceptions, you should not turn off exceptions when you compile in standard mode (the default mode).