You copied the Doc URL to your clipboard.

-fno-exceptions

Suppresses the generation of code needed to support C++ exceptions.

Usage

The -fno-exceptions option can be used with the C++ Standard Library libc++, with caution:

  • ARM® Compiler 6 does not contain variants of libc++ that are built with -fno-exceptions. Therefore, exceptions might be thrown from pre-built libc++ objects.
  • The parts of libc++ that are implemented in header files might be compiled with -fno-exceptions. When -fno-exceptions is used, libc++ calls the assert macro instead of throwing an exception.

    Note

    If the macro NDEBUG is defined these assert macros are removed.

Use of try, catch, or throw results in an error message. If a C++ exception from another object propagates into code built with -fno-exceptions, then the program terminates.

Rogue Wave C++ Libraries

armclang and Rogue Wave C++ libraries use different and incompatible exceptions support schemes. As such, you must specify -fno-exceptions when using -stdlib=legacy_cpplib.

Related reference

Was this page helpful? Yes No