15-11-2011, 08:37 PM
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.
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