Skip to main content

IAR Embedded Workbench for RISC-V 3.40

MISRAC2012-Rule-21.12_a

In this section:
Synopsis

(Required) The exception-handling features of <fenv.h> should not be used.

Enabled by default

Yes

Severity/Certainty

Low/High

lowhigh.png
Full description

The exception-handling features of <fenv.h> are used.

Coding standards
MISRA C:2012 Rule-21.12

(Required) The exception handling features of <fenv.h> should not be used

Code examples

The following code example fails the check and will give a warning:

#include <fenv.h>
void f ()
{
  feclearexcept ( FE_DIVBYZERO );
}

The following code example passes the check and will not give a warning about this issue:

#include <fenv.h>
void f ()
{
  /* ... */
}