1.19 -fexceptions, -fno-exceptions

Enables or disables the generation of code needed to support C++ exceptions.


The default is -fexceptions for C++ sources. The default is -fno-exceptions for C sources.


Compiling with -fno-exceptions disables exceptions support and uses the variant of C++ libraries without exceptions. Use of try, catch, or throw results in an error message.

Linking objects that have been compiled with -fno-exceptions automatically selects the libraries without exceptions. You can use the linker option --no_exceptions to diagnose whether the objects being linked contain exceptions.


If an exception propagates into a function that has been compiled without exceptions support, then the program terminates.

Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.