Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 7.1 For Macro Arguments?
#1
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?
Reply
#2
No, because the concept of octal, hex etc constants doesn't exist until after pre-processing has been completed.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)