MISRA C:2012 Rule 20.3
The #include directive shall be followed by either a <filename> or "filename" sequence
説明
ルール定義
The #include directive shall be followed by either a <filename> or "filename" sequence 1 .
根拠
このルールはマクロの置換後にのみ適用されます。
The behavior is undefined if an #include directive does not use one of the following forms:
#include <filename>#include "filename"
Polyspace 実装
#include 命令の後に < または file>" が指定されていない場合、Polyspace® はこのルールの違反を報告します。ここで:filename"
<は、有効なヘッダー ファイルです。file>"は、ファイルの名前またはファイルのパスです。filename"
トラブルシューティング
ルール違反を想定していてもその違反が表示されない場合、コーディング規約違反が想定どおりに表示されない理由の診断を参照します。
例
チェック情報
| グループ: プリプロセッサ命令 |
| カテゴリ: 必要 |
| AGC カテゴリ: 必要 |
1 All MISRA coding rules and directives are © Copyright The MISRA Consortium Limited 2021.
The MISRA coding standards referenced in the Polyspace Bug Finder™ documentation are from the following MISRA standards:
MISRA C:2004
MISRA C:2012
MISRA C:2023
MISRA C++:2008
MISRA C++:2023
MISRA and MISRA C are registered trademarks of The MISRA Consortium Limited 2021.