Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Example at 11.1 and 11.2
#1
In example codes in Rule 11.1 and Rule 11.2

#include /* to obtain macro NULL */

in example codes in 11.9

#include

A freestanding environment needs stdarg.h not sodlib.h.
So I prefer to obtain macro NULL,
#include // to obtain macro NULL

Is it reasonable?

ps. in 11.9
/* Could also be stdio.h, stdlib.h and others */

I prefer
/* A free standing environment needs stddef.h */
/* Could also be stdio.h, stdlib.h and others in host environments */

Best Regards.
<t>Dr. OGAWA Kioshi<br/>
@kaizen_nagoya</t>
Reply
#2
Thank you for your point. We will modify the examples to use stddef.h in a future update.

Note: A more correct statement in the original question would be "A freestanding environment needs stddef.h not stdlib.h.", since stdarg.h does not contain a definition of NULL.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)