This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [gcc-4.3-20080125] Bootstrap failure on i386-unknown-openbsd4.2: missing sentinel in function call
"Andrew Pinski" <pinskia@gmail.com> writes:
> On Jan 30, 2008 7:38 PM, Dongsheng Song <dongsheng.song@gmail.com> wrote:
>> See: http://www.linuxonly.nl/docs/2/0_Page_1.html
>
> It says:
> This is because NULL is not of the right type: it is defined as
> integer 0 instead of a pointer with the value 0.
>
> Except that is wrong from what the C99 standard says about the NULL macro:
> The macros are
> NULL
> which expands to an implementation-defined null pointer constant
And 0 is a valid null pointer constant.
> So no casting is needed as it is already a pointer type if we follow
> the C99 standard (I think C90 says the same thing except I don't have
> C90 in front of me).
A null pointer constant is _not_ a pointer. It is only becomes a
pointer when explicitly or implicitly converted to one. Neither is the
case here.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."