Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 2.1
#2
C statements and assembler statements should not co-exist in a function unless the assembler is encapsulated in a macro.

The following example violates this rule.

Code:
static void foo ( void )
{
   asm { \"CLI\" };
   foobar();
   asm { \"SEI\" };
}
Posted by and on behalf of the MISRA C Working Group


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)