Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
19.13 and Assembly
#2
The # preprocessing token in this example is not an instance of the # operator (see C90 Section 6.8.3.2) because this is an object-like macro definition, i.e. there are no macro parameters. Therefore, this code complies with Rule 19.13 as well as Rule 2.1 (encapsulation of assembly language). Of course, it would still require a deviation against Rule 1.1 as the asm keyword is a language extension.

If the example had used a function-like macro definition, then the code would not be compliant with Rule 19.13 as the # token would be a # operator.
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)