05-01-2006, 04:44 PM
ANSWER: MISRA-C Steering Team 5/1/06
The order of macro definitions is not significant, so long as all macros are defined before invocation.
This rule applies to the definition of a macro, and not its invocation.
#define B A
The above is not a permitted form of macro definition under this rule because A is not a constant, braced initializer, parenthesized expression, type qualifier, storage class specifier or do-while-zero construct
#define B (A)
The above is permitted. The replacement list is a parenthesised expression.
The order of macro definitions is not significant, so long as all macros are defined before invocation.
This rule applies to the definition of a macro, and not its invocation.
#define B A
The above is not a permitted form of macro definition under this rule because A is not a constant, braced initializer, parenthesized expression, type qualifier, storage class specifier or do-while-zero construct
#define B (A)
The above is permitted. The replacement list is a parenthesised expression.