What about keywords?

6.20 Standard Libraries

Moderators: misra-c, david ward

Gavin McCall
Posts: 72
Joined: Mon Sep 13, 2004 9:24 am

What about keywords?

Post by Gavin McCall » Fri Sep 09, 2005 2:04 pm


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.
Gavin McCall
Personal view only.


Return to “6.20 Standard Libraries”