MISRA C++:2008 Rule 8-4-1
Functions shall not be defined using the ellipsis notation
説明
Functions shall not be defined using the ellipsis notation. 1
根拠
省略表記を使用して、可変個の引数を受け入れる関数を定義することができます。ただし、コンパイラはコンパイル時に引数の型と数をチェックしません。そのため、引数の数や型が想定とは異なる場合、未定義の動作につながる可能性があります。
Polyspace 実装
コードでの関数定義に省略表記が使用されている場合、Polyspace® はこのルールに対する違反を報告します。
トラブルシューティング
ルール違反が想定されるものの、Polyspace から報告されない場合は、コーディング規約違反が想定どおりに表示されない理由の診断を参照してください。
例
チェック情報
| グループ: Declarators |
| カテゴリ: 必要 |
バージョン履歴
R2013b で導入
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.