C and C++


LANG.PREPROC.IFNDEF : Use of #ifndef

要旨

A use of the #ifndef preprocessor directive.

Many coding standards forbid the use of #ifndef because it makes code harder for human readers to understand.

プロパティ

クラス名 Use of #ifndef
日本語クラス名 Use of #ifndef
クラス分類 スタイル (style)
ニーモニック LANG.PREPROC.IFNDEF
カテゴリー
CWE CWE:710 Improper Adherence to Coding Standards
JSF++ JSF++:28 The #ifndef and #endif pre-processor directives will only be used as defined in AV Rule 27 to prevent multiple inclusions of the same header file.
対応言語 C および C++ で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Use of #ifndef"

#ifndef X_DEFINED /* 'Use of #ifndef' warning issued here */
int y;
#endif                   /* ('Use of #endif' warning issued here if enabled) */

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

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