Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Definition of "declare" for Rule 21.2
#2
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.

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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)