C and C++


LANG.ASM : インラインアセンブラコードの使用

要旨

プロシージャがインラインアセンブラコードを含んでいます。 このワーニングクラスはMixed Assembly and Codeの上位集合となります。

プロパティ

クラス名 Inline Assembly Code
日本語クラス名 インラインアセンブラコードの使用
クラス分類 セキュリティ (security)
ニーモニック LANG.ASM
カテゴリー
MisraC2023 MisraC2023:D.4.3 Assembly language shall be encapsulated and isolated
Misra2012 Misra2012:D.4.3 Assembly language shall be encapsulated and isolated
Misra2004 Misra2004:2.1 Assembly language shall be encapsulated and isolated
AUTOSARC++14 AUTOSARC++14:A7-4-1 The asm declaration shall not be used.
  AUTOSARC++14:M7-4-3 Assembly language shall be encapsulated and isolated.
MisraC++2008 MisraC++2008:7-4-3 Assembly language shall be encapsulated and isolated.
MisraC++2023 MisraC++2023:10.4.1 The asm declaration shall not be used
対応言語 C のみ利用可能です。 C++ は利用できません。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Inline Assembly Code"

void do_something(void);

void use_asm(void){   
    asm("CLI");        /* 'Inline Assembly Code' warning issued here (covers both occurrences) */
                                   /* ('Mixed Assembly and Code' warning also issued) */
    do_something();
    asm("STI");
}

void only_asm(){
    asm("CLI");        /* 'Inline Assembly Code' warning issued here */
                                   /* (procedure contains no source, so no 'Mixed Assembly and Code' warning) */
    asm("STI");
}

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

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