3.3.2 C99-compatible functions for controlling the ARM floating-point environment

The compiler supports all functions defined in the C99 standard, and functions that are not C99-standard.

Note:

The following functionality requires you to select a floating-point model that supports exceptions, such as --fpmode=ieee_full or --fpmode=ieee_fixed.

The C99-compatible functions are the only interface that enables you to install custom exception trap handlers with the ability to define your own return value. All the function prototypes, data types, and macros for this functionality are defined in fenv.h.

C99 defines two data types, fenv_t and fexcept_t. The C99 standard does not give information about these types, so for portable code you must treat them as opaque. The compiler defines them to be structure types.

The type fenv_t is defined to hold all the information about the current floating-point environment. This comprises:

  • The rounding mode.
  • The exception sticky flags.
  • Whether each exception is masked.
  • What handlers are installed, if any.

The type fexcept_t is defined to hold all the information relevant to a given set of exceptions.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.