Skip to main content

IAR Embedded Workbench for RX 5.20

MISRAC++2008-18-7-1

In this section:
Synopsis

(Required) The signal handling facilities of csignal shall not be used.

Enabled by default

Yes

Severity/Certainty

Low/Medium

lowmedium.png
Full description

Uses of signal.h were found. This check is identical to MISRAC2004-20.8, MISRAC2012-Rule-21.5, MISRAC++2023-21.10.3.

Coding standards
MISRA C:2004 20.8

(Required) The signal handling facilities of signal.h shall not be used.

MISRA C:2012 Rule-21.5

(Required) The standard header file <signal.h> shall not be used

MISRA C++ 2023 21.10.3

(Required) The facilities provided by the standard header file <csignal> shall not be used

Code examples

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

#include <signal.h>
#include <stddef.h>

void example(void) {
  signal(SIGFPE, NULL);
}

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

void example(void) {
}