Skip to main content

IAR Embedded Workbench for RH850 3.20.x

MISRAC2012-Rule-21.2

In this section:
Synopsis

(Required) A reserved identifier or macro name shall not be declared

Enabled by default

Yes

Severity/Certainty

Low/Medium

lowmedium.png
Full description

One or more library functions are being overridden. This check is identical to MISRAC++2008-17-0-3, MISRAC2004-20.2, CERT-DCL37-C_a.

Coding standards
CERT DCL37-C

Do not declare or define a reserved identifier

MISRA C:2004 20.2

(Required) The names of Standard Library macros, objects, and functions shall not be reused.

MISRA C:2012 Rule-21.2

(Required) A reserved identifier or macro name shall not be declared

MISRA C++ 2008 17-0-3

(Required) The names of standard library functions shall not be overridden.

Code examples

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

extern "C" void strcpy(void);
void strcpy(void) {}

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

extern "C" void bar(void);
void foo(void) {}