[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Diffutils 2.8 is available
From: |
Paul Eggert |
Subject: |
Re: GNU Diffutils 2.8 is available |
Date: |
Tue, 26 Mar 2002 17:29:43 -0800 (PST) |
> From: Albert Chin <address@hidden>
> User-Agent: Mutt/1.2.5i
>
> Is _Bool specific to C99?
It's required by C99, and is available on some pre-C99 compilers.
> > Perhaps the correct fix is to modify "configure" so that
> > HAVE_STDBOOL_H is not defined on your platform.
>
> Agreed.
OK, I'll do that in the next release.
Here's the test program that I plan to use. Can you please verify
that the it compiles only in environments where stdbool.h actually
works?
#include <stdbool.h>
#ifndef bool
"error: bool is not defined"
#endif
#ifndef false
"error: false is not defined"
#endif
#ifndef true
"error: false is not defined"
#endif
#ifndef __bool_true_false_are_defined
"error: __bool_true_false_are_defined is not defined"
#endif
struct s { _Bool s: 1; _Bool t; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) -0.5 == true ? 1 : -1];
char e[(bool) &s == true ? 1 : -1];
char f[(_Bool) -0.0 == false ? 1 : -1];
char g[true];
char h[sizeof (_Bool)];
char i[sizeof s.t];
int
main ()
{
return !a + !b + !c + !d + !e + !f + !g + !h + !i;
;
return 0;
}