20-05-2014, 11:53 AM
Rule 21.1 restricts the use of #define and #undef on certain names.
Rule 21.2 restricts the declarations of certain names.
As you found, we have incorrectly put an example in the incorrect rule.
Thank you for pointing this out to us.
Rule 21.2 restricts the declarations of certain names.
As you found, we have incorrectly put an example in the incorrect rule.
Code:
#define _BUILTIN_sqrt(x) (x) /* Non-compliant with Rule 21.1, but compliant with Rule 21.2 */
int _BUILTIN_sqrt; /* Non-compliant with Rule 21.2 */
Thank you for pointing this out to us.
Posted by and on behalf of the MISRA C Working Group