Skip to main content

IAR Embedded Workbench for RL78 5.20

MISRAC2012-Rule-21.11

In this section:
Synopsis

(Advisory) The standard header file tgmath.h should not be used

Enabled by default

No

Severity/Certainty

Low/Medium

lowmedium.png
Full description

Use of the standard header file tgmath.h was found.

Coding standards
MISRA C:2012 Rule-21.11

(Advisory) The standard header file <tgmath.h> shall not be used

Code examples

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

#include <tgmath.h>

float f1, f2;

void example(void) {
  f1 = sqrt(f2);
}

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

#include <math.h>

float f1, f2;

void example(void) {
  f1 = sqrt(f2);  
}