MISRA Discussion Forums

Full Version: Rule 7.1 For Macro Arguments?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Does rule 7.1, "Octal constants (other than zero) and octal escape sequences shall not be used", apply to function-like macro arguments? For example:
Code:
#define MACRO(a)    XYZ_##a

int MACRO(01);

Is the '01' argument to MACRO() a violation of this rule?
No, because the concept of octal, hex etc constants doesn't exist until after pre-processing has been completed.