This rule is part of MISRA C++:2023.
Usage of this content is governed by Sonar’s terms and conditions. Redistribution is
prohibited.
Rule 10.4.1 - The asm declaration shall not be used
[dcl.asm] Implementation 1
Category: Required
Analysis: Decidable,Single Translation Unit
Rationale
The asm declaration is conditionally-supported, with the use of any assembly language insert resulting in
implementation-defined behaviour.
Many modern development environments provide better means (such as intrinsic functions) for achieving what has traditionally been done by the use
of assembly language.
Encapsulation of assembly language should be considered if this rule is subject to deviation, as this aids portability.
Note: the use of any assembly language that does not use the asm declaration is a language extension, and is
restricted by M23_019: MISRA C++ 2023 Rule 4.1.1.
Copyright The MISRA Consortium Limited © 2023