Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 19.7 - Function-like macro
#2
Rule 19.7 is only intended to apply in situations where a function call would be permitted.

As an example, a function call is not permitted in a constant-expression. Therefore Rule 19.7 does not apply to the initialisers for objects that have static storage duration, e.g.

Code:
static int32 myVariable = CONV(0.25);   /* Rule 19.7 compliant - function not permitted here */
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)