bug-autoconf
[Top][All Lists]
Advanced

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

Re: [PATCH] stdbool: avoid rejecting clang


From: Ralf Wildenhues
Subject: Re: [PATCH] stdbool: avoid rejecting clang
Date: Wed, 25 Aug 2010 07:22:47 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Paul Eggert wrote on Tue, Aug 24, 2010 at 11:19:18PM CEST:
> On 08/24/2010 01:25 PM, Ralf Wildenhues wrote:
> 
> > configure:3108: checking for stdbool.h that conforms to C99
> > configure:3193: cc -qlanglvl=extc89 -c -g  conftest.c>&5
> > "conftest.c", line 46.16: 1506-196 (W) Initialization between types "_Bool" 
> > and "struct s*" is not allowed.
> > "conftest.c", line 74.23: 1506-221 (S) Initializer must be a valid constant 
> > expression.

> The 2nd diagnostic is valid: xlc is clearly within its rights to
> reject that initializer.  The first one is less clear: the C standard
> says that "&s" is a valid static initializer, but I suppose
> one could argue that there's an implicit conversion to bool that would
> clearly be invalid if one made it explicit and wrote "(bool) &s" there.

Please note that the first diagnostic is a warning only.

> I installed this: does it help?

The patch causes stdbool.h to be accepted with either -qlanglvl=extc89
or extc99 and with or without -q64:

configure:3108: checking for stdbool.h that conforms to C99
configure:3175: cc -qlanglvl=extc89 -c -g  conftest.c >&5
"conftest.c", line 68.16: 1506-196 (W) Initialization between types "_Bool" and 
"struct s*" is not allowed.
configure:3175: $? = 0
configure:3182: result: yes

Thanks,
Ralf



reply via email to

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