MISRA Discussion Forums

Full Version: Clarification of 20.1 - Intrepretation of \"not to be d
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Question 2: Interpretation of \"not be defined, redefined\"

a) Does it mean that \"#define\" is not allowed?

b) Is it not allowed to define as an object or a function, either?

Answer: MISRA C Steering Team clarification 7/9/2005

(a) YES - To define an object or a function with the name of a reserved identifier is prohibited under rule 20.2.

(b) YES - To #define macros with the name of a reserved identifier is prohibited.