[libdispatch-dev] linux + libdispatch + clang + blocks

David Leimbach leimy2k at gmail.com
Tue Jun 8 08:54:29 PDT 2010

On Tue, Jun 8, 2010 at 1:06 AM, Paolo Bonzini <bonzini at gnu.org> wrote:

> On 06/08/2010 04:16 AM, David Leimbach wrote:
>> Oh well time to use a different libc?  I hear FreeBSD has a nice one!
>> :-)
> No, time to fix clang.  See my answer to
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=11157
> Paolo

It seems pretty cut and dry to me.

1. C99 defines that double underscored tokens are reserved identifiers in
the implementation of C99.
2. C99 is defined by both the compiler and the standard C libraries defined
in C99.
3. unistd.h is not part of C99.

Unistd.h is therefore clashing with a C99's totally valid usage of a double
underscored and reserved name.  Yes, unistd.h is shipping with a libc
implementation, but nowhere does it say in C99 that that's an excuse for
utilizing the C99 implementation's reserved namespace.

One could question whether it is a good idea or not to tell the users of
your C99 implementation to have to use extensions to the language via the
use of double underscored names, but it really does say in C99 that these
are there for ANY use by the implementation.  This means that if you see
double underscore'd identifiers in a user's code, that this code is at worst
"not portable to other compiler environments".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/libdispatch-dev/attachments/20100608/094c3042/attachment.html>

More information about the libdispatch-dev mailing list