[Top][All Lists]

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

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

From: Alejandro Colomar
Subject: Re: [PATCH v3] NULL.3const: Add documentation for NULL
Date: Sat, 6 Aug 2022 17:42:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0

Hi Doug,

On 7/27/22 15:23, Douglas McIlroy wrote:
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?

Even if I disagree with you on this, I think we both agree that adding a third way to define a null pointer constant would be detrimental for all of us.

ISO C2x has accepted a proposal to add C++'s nullptr to C:
And 2 days ago it went into the (possibly final) draft for C23:

See a discussion going on right now between me and several committee members here:

Maybe you want to jump in and rant a little bit :)

The email to reply is:
LLVM Discussion Forums <>

The latest message ID is:

And the subject is:
Re: ISO C3X proposal: nonnull qualifier



reply via email to

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