MISRA Discussion Forums
What about keywords? - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA-C: 2004 rules (https://forum.misra.org.uk/forumdisplay.php?fid=17)
+---- Forum: 6.20 Standard Libraries (https://forum.misra.org.uk/forumdisplay.php?fid=42)
+---- Thread: What about keywords? (/showthread.php?tid=39)



What about keywords? - Gavin McCall - 09-09-2005

Question:

Is it correct to think that a keyword is out of the scope of Rule 20.1?

For example, \"#define int (10)\" violates Rule 19.4, doesn't it?

Answer: MISRA C Steering Team 7/9/2005

Keywords (as defined in 6.1.1) shall be considered to be in the scope of 20.1.
This is detailed in the supporting text and will be clarified in the Technical Corrigendum.

#define int (10)

This is not a violation of 19.4.

19.4 is concerned with the replacement text of a macro, and not its name.