C and C++


LANG.STRUCT.DECL.RESERVED : 予約名の宣言

要旨

宣言内の識別子名が:

プロパティ

クラス名 Declaration of Reserved Name
日本語クラス名 予約名の宣言
クラス分類 スタイル (style)
ニーモニック LANG.STRUCT.DECL.RESERVED
カテゴリー
MisraC2023 MisraC2023:21.2 A reserved identifier or macro name shall not be declared
Misra2012 Misra2012:21.2 A reserved identifier or 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
対応言語 C および C++ で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Declaration of Reserved Name"

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 */

  /* ... */
}

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。