bug-gnulib
[Top][All Lists]
Advanced

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

Re: AC_HEADER_STDBOOL rejects valid C99 implementation


From: Paul Eggert
Subject: Re: AC_HEADER_STDBOOL rejects valid C99 implementation
Date: Wed, 10 May 2006 10:59:10 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

> ISO C 99, section 6.2.5 paragraph 17, defines the term "integer types":
>
>     The type char, the signed and unsigned integer types, and the enumerated
>     types are collectively called integer types.
>
> So, _Bool and bool are _not_ integer types.

No, because ISO C99 section 6.2.5 paragraph 6 says:

  The type _Bool and the unsigned integer types that correspond to the
  standard signed integer types are the _standard unsigned integer types_.

Hence paragraph 17 as quoted above defines bool to be an integer type,
indirectly via the phrase "the signed and unsigned integer types".

Autoconf checks stdbool implementations fairly strictly for bugs, so I
expect we should leave the Autoconf code alone.  You're correct that
gnulib's stdbool.h also fails Autoconf's strict test (both in this and
in other respects), but I don't see the harm in using gnulib stdbool.h
with Sun C 5.9, for code that is intended to be used with gnulib
stdbool.h, as such code can't rely on ((bool) -0.5) anyway.  This is
the same argument we use for the other strict tests, e.g., converting
a pointer to a boolean.

Sun C 5.9 alpha is buggy here.  Sun's web page about this compiler
<http://developers.sun.com/prodtech/cc/documentation/linux_ea/readme.html>
is funny: it says "It is our top most priority to hear what you have
to say" but it gives no procedures for filing bug reports.  I've tried
to file a bug report by posting in their forum at
<http://forum.sun.com/jive/thread.jspa?threadID=96202>; I hope this
induces them to fix the bug.




reply via email to

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