groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] NULL.3const: Add documentation for NULL


From: Douglas McIlroy
Subject: Re: [PATCH v3] NULL.3const: Add documentation for NULL
Date: Wed, 27 Jul 2022 09:23:02 -0400

I agree with all of Ingo's comments. A man page is a reference, not a
history, not a tutorial, not a style guide, There s nothing to say
about NULL beyond it's being a synonym for the constant 0 converted to
the null pointer. Other facts about the behavior of null pointers will
have been learned however or wherever one learned C.

The remark about segfaults is really about hardware, not about C.
Sometimes the undefined behavior can be made to manifest as a
segfault. But it is not an intrinsic property of null pointers.

Incidentally, I personally don't use NULL. Why, when C provides a
crisp notation, 0, should one want to haul in an extra include file to
activate a shouty version of it?

Doug



reply via email to

[Prev in Thread] Current Thread [Next in Thread]