[Top][All Lists]

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

Re: stdbool.h test v. Compaq C on Tru64

From: Steven M. Schweda
Subject: Re: stdbool.h test v. Compaq C on Tru64
Date: Mon, 22 Oct 2007 12:45:10 -0700 (PDT)

Ralf Wildenhues wrote:
> Well, the fact that the compiler failed the AC_HEADER_STDBOOL test is a
> feature not a bug: Autoconf found out that this compiler does not have a
> C99 conforming stdbool.  It might be good enough for your purposes, but
> this macro is a rather all-or-nothing thing, so tries to expose all
> kinds of quirks.
> It would be more interesting to see why gnulib's stdbool.h can't cope.
> Please write to bug-gnulib if it doesn't look like an Autoconf bug
> there.

   I suppose that if your goal is to reveal fairly exotic compiler
quirks rather than to test for a usable stdbool.h, then this "feature"
fills the bill.

   The compiler's complaints about the gnulib stdbool.h look like this:

cc: Error: ../lib/stdbool.h, line 104: Invalid enumerator. (badenum)
enum { false = 0, true = 1 };
cc: Error: ../lib/stdbool.h, line 104: Invalid enumerator. (badenum)
enum { false = 0, true = 1 };

   Naturally, the system stdbool.h uses simple macros for "false" and
"true", which don't trouble the compiler, but do conflict with this

/* For the sake of symbolic names in gdb, we define true and false as
   enum constants, not only as macros.

I assume that this reveals yet another shortcoming of this compiler, but
because it's no more likely to bother any of HP's paying customers than
the original problem, I think that it's safe to assume that it won't be
fixed any time soon.  Of course, the obvious solution would be to use
all or part of the system stdbool.h.  This could be done easily by a
slight relaxation of the autoconf test (as I suggested originally), or
by incorporating it, or parts of it, into the gnulib stdbool.* material.

   Perhaps the autoconf message should be changed from "checking for
stdbool.h that conforms to C99..." to something more like "checking for
stdbool.h and C compiler that conform to even the least significant
parts of C99...".


View this message in context: 
Sent from the Gnu - Autoconf - Bugs mailing list archive at Nabble.com.

reply via email to

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