25-09-2012, 08:45 AM
Yes, the rule applies to preprocessing expressions in exactly the same way as it would to other expressions.
Since the defined operator is a unary operator, it will need parentheses, in much the same way as a function call would require parentheses in a non-preprocessing expression. So, the example would need to be written:
Since the defined operator is a unary operator, it will need parentheses, in much the same way as a function call would require parentheses in a non-preprocessing expression. So, the example would need to be written:
Code:
#if (!defined(__cplusplus)) || (defined(__STDC_LIMIT_MACROS))
Posted by and on behalf of the MISRA C Working Group