C and C++


LANG.STRUCT.DECL.IMPFN : 暗黙の関数宣言

要旨

起動された関数が宣言されていません。

プロパティ

クラス名 Implicit Function Declaration
日本語クラス名 暗黙の関数宣言
クラス分類 スタイル (style)
ニーモニック LANG.STRUCT.DECL.IMPFN
カテゴリー
MisraC2023 MisraC2023:17.3 A function shall not be declared implicitly
Misra2012 Misra2012:17.3 A function shall not be declared implicitly
Misra2004 Misra2004:8.1 Functions shall have prototype declarations and the prototype shall be visible at both the function definition and call
AUTOSARC++14 AUTOSARC++14:A1-1-1 All code shall conform to ISO/IEC 14882:2014 - Programming Language C++ and shall not use deprecated features.
MisraC++2023 MisraC++2023:4.1.2 Deprecated features should not be used
CWE CWE:686 Function Call With Incorrect Argument Type
CERT-C CERT-C:MSC23-C Beware of vendor-specific library and language differences
対応言語 C および C++ で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっており、プロジェクトには非正規の C向けAST が必要になります。有効にするにはプロジェクト設定ファイル (configuration file) に以下の WARNING_FILTER ルールと RETAIN_UNNORMALIZED_C_AST 設定を追加してください。
RETAIN_UNNORMALIZED_C_AST = Yes
WARNING_FILTER += allow class="Implicit Function Declaration"
注:非正規化された AST を継続して使用した場合、使用ディスク容量が増加し解析時間が長くなる可能性があります。

int f(double a);   
 
int lang_struct_decl_impfn_before(double a){
    return f(a);                                          /* f() already declared */             
}
 
int lang_struct_decl_impfn_none(double a){
    return g(a);                 /* 'Implicit Function Declaration' warning issued here
                                  * - g() never declared */
}
 
int lang_struct_decl_impfn_after(double a){
  return h(a);                   /* 'Implicit Function Declaration' warning issued here
                                  * - h() declared after invocation */
}

int h(double a);

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

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