Re: execl() sentinel - Mailing list pgsql-patches

From Tom Lane
Subject Re: execl() sentinel
Date
Msg-id 17954.1184768161@sss.pgh.pa.us
Whole thread Raw
In response to Re: execl() sentinel  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: execl() sentinel
List pgsql-patches
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> It's too bad that gcc doesn't have a
>> -Wno-snarkiness-about-system-headers-thank-you switch.

> It does have a switch to *add* snarkiness about system headers, but does
> not do it by default.

> The problem in this case is that an uncast null pointer constant is not
> always a sufficient sentinel for variadic functions, as explained here:
> <http://c-faq.com/null/null2.html>.

Sure, but on a machine where it actually matters (ie one where int and
pointer are of different sizes), I'd expect NULL to be #define'd as
"((void *) 0)" not just "0".  You should *not* have to inform the
machine that NULL is a pointer.

            regards, tom lane

pgsql-patches by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: HOT latest patch - version 8
Next
From: Peter Eisentraut
Date:
Subject: Re: execl() sentinel