C and C++


LANG.PREPROC.INCL.TGMATH_H : Use of <tgmath.h>

Summary

The code includes standard header file <tgmath.h> with #include or #include_next.

Properties

Class Name Use of <tgmath.h>
Significance style
Mnemonic LANG.PREPROC.INCL.TGMATH_H
Categories
MisraC2023 MisraC2023:21.11 The standard header file <tgmath.h> should not be used
Misra2012 Misra2012:21.11 The standard header file <tgmath.h> should not be used
AUTOSARC++14 AUTOSARC++14:A18-0-1 The C library facilities shall only be accessed through C++ library headers.
MisraC++2008 MisraC++2008:18-0-1 The C library shall not be used.
CWE CWE:676 Use of Potentially Dangerous Function
  CWE:758 Reliance on Undefined, Unspecified, or Implementation-Defined Behavior
CERT-C CERT-C:MSC23-C Beware of vendor-specific library and language differences
Availability Available for C and C++.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Use of <tgmath.h>"

Example

/* 'Use of <tgmath.h>' warning issued on following line */
#include <tgmath.h>

/* including with "" is ok: no warning */
#include "tgmath.h"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.