Skip to main content

IAR Embedded Workbench for RISC-V 3.40

MISRAC++2023-21.10.3

In this section:
Synopsis

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

Enabled by default

Yes

Severity/Certainty

Low/Medium

lowmedium.png
Full description

Uses of <csignal> were found. This check is identical to MISRAC++2008-18-7-1, MISRAC2004-20.8, MISRAC2012-Rule-21.5.

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++ 2008 18-7-1

(Required) The signal handling facilities of <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) {
}