[Top][All Lists]

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

Re: i guess we're frozen & stuff

From: Greg Troxel
Subject: Re: i guess we're frozen & stuff
Date: Tue, 11 Aug 2009 17:58:30 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (berkeley-unix)

address@hidden (Ludovic Courtès) writes:

> Ken Raeburn <address@hidden> writes:
>> However, they're testing for a POSIX 2008 requirement that C99 and
>> POSIX 2004 implementations need not meet, namely that NULL be of type
>> "void *" instead of any null pointer constant (e.g., "0").  I think
>> requiring POSIX 2008 support for Guile and anything that builds on it
>> seems like a bad idea.  I haven't looked at the libunistring code to
>> see why it might be relevant, but it seems like a pretty gratuitous
>> imposition to me.  The only benefit of it I can see is that a variadic
>> function can then take NULL as an argument without casting to char*;
>> is that worth refusing to support other systems?
> I didn't know it was a POSIX 2008 requirement.  Then indeed, we should
> discuss this with the libunistring folks.

gnulib upstream claims that while they are testing for POSIX 2008, it's
only to behave right if it isn't met.  But the test code fails when NULL
is '(void *)0'.  As I read a reply on a netbsd list, C99 says that NULL
is a constant with value 0 or that vast to void *, and "(void *)0" seems
to meet that requirement quite nicely.

I wonder if it's a gcc bug that 'sizeof (void *) 0' fails.

Regardless, guile aims to be far more portable than POSIX 2008 (which I
had not even heard of until today, and at work I'm one of the chief
ranters making people read posix instead of assuming the way their linux
box behaves is the spec).

Attachment: pgpCLlg7Uj6yv.pgp
Description: PGP signature

reply via email to

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