Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is Rule 20.1 applicable to \"defined\"?
#1
Question: Is Rule 20.1 applicable to \"defined\"?

(a) We presume that \"#define defined (10)\" will be in violation of Rule 20.1.

(b) If our presumption is correct, then which of \"reserved identifier\", \" macro\" or \"function\" will \"defined\" be?
We could not find the answer in ISO/IEC 9899:1990. Is it described somewhere in COR1, COR2 or AMD1?

Answer: MISRA C Steering Team 7/9/2005

(a) YES - defined is included in the text under the rule.

(b) defined is listed under 6.8.8 Predefined Macro Names.
It is also listed in Appendix G: Undefined Behaviour 54.


Forum Jump:


Users browsing this thread: 1 Guest(s)