JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++


LANG.STRUCT.DECL.RESERVED : Declaration of Reserved Name

Summary

An identifier in a declaration:

See also: Macro Definition of Reserved Name, Macro Undefinition of Reserved Name.

Properties

Class Name Declaration of Reserved Name
Significance style
Mnemonic LANG.STRUCT.DECL.RESERVED
Categories
MisraC2025 MisraC2025:5.10 A reserved identifier or reserved macro name shall not be declared
MisraC2023 MisraC2023:21.2 A reserved identifier or reserved macro name shall not be declared
Misra2012 Misra2012:21.2 A reserved identifier or reserved macro name shall not be declared
Misra2004 Misra2004:20.2 The names of standard library macros, objects and functions shall not be reused
AUTOSARC++14 AUTOSARC++14:M17-0-2 The names of standard library macros and objects shall not be reused.
  AUTOSARC++14:M17-0-3 The names of standard library functions shall not be overridden.
MisraC++2008 MisraC++2008:17-0-2 The names of standard library macros and objects shall not be reused.
  MisraC++2008:17-0-3 The names of standard library functions shall not be overridden.
CWE CWE:1076 Insufficient Adherence to Expected Conventions
CERT-C CERT-C:DCL37-C Do not declare or define a reserved identifier
CERT-CPP CERT-CPP:DCL51-CPP Do not declare or define a reserved identifier
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="Declaration of Reserved Name"

Example

int NULL;                         /* 'Declaration of Reserved Name' warning issued here */

void _fname( void ){              /* 'Declaration of Reserved Name' warning issued here */
    int _y = 0;                   /* 'Declaration of Reserved Name' warning issued here */
    char *printf = "hello world"; /* 'Declaration of Reserved Name' warning issued here */

  /* ... */
}

Relevant Configuration File Parameters

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

 

To report problems with this documentation, please visit https://support.codesecure.com/.