Paul Eggert wrote:
> > Maybe we should override NULL on this platform (where it is defined as 0)?
> 
> I wouldn't mess with NULL, as too much oddball stuff depends on it.

I would mess with it only when a configure test detects that it expands to a
non-pointer. That is, when a conditional expression
    (foo ? "x" : NULL)
sollicits a compilation error. This catches exactly the AIX case.

> Why not use nullptr instead? It's the modern replacement.

In the other thread, that started yesterday, Alejandro pointed to the
history of 'nullptr' in C [1]. Also, my evaluation from last year [2]
still stands: The general habit in the community is to use NULL. I have
only seen 1 C package that consistently uses nullptr.

Bruno

[1] https://software.codidact.com/posts/292718/292759#answer-292759
[2] https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00031.html




Reply via email to