bug-gnulib
[Top][All Lists]
Advanced

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

Re: NULL with xlc


From: Paul Eggert
Subject: Re: NULL with xlc
Date: Thu, 14 Nov 2024 14:16:38 -0700
User-agent: Mozilla Thunderbird

On 11/14/24 11:51, Bruno Haible wrote:
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.

I don't see how it catches the AIX xlc case. That's a compiler bug, and it doesn't matter whether NULL expands to 0 or to ((void *) 0), the compiler bug will be present either way. In contrast, the fix you installed works around the compiler bug, so let's stick with that.


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

I wasn't following the other thread. In that case I withdraw my suggestion to use nullptr.




reply via email to

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