[Top][All Lists]

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

Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++

From: Mojca Miklavec
Subject: Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
Date: Tue, 28 Aug 2012 21:34:19 +0200

On Tue, Aug 28, 2012 at 9:01 PM, Paul Eggert wrote:
> On 08/28/2012 11:47 AM, Mojca Miklavec wrote:
>> What exactly is "the real problem" here?
> The real problem is that we're testing whether
> stdbool.h works in C, and using that test to configure
> both C and C++.  We should use a C++-specific test to test
> whether stdbool.h works in C++.

OK, I see. There might be exotic situations when users could decide to
use completely different C and C++ compilers. But even before that
change is made, if developers decide to make it (it requires some
overhaul), I would find it very very useful to take care of a much
more common scenario:
- HAVE_STDBOOL_H is false for C compiler (no C99-compliant stdbool.h)
- _Bool is defined in C (HAVE__BOOL is true)
- _Bool is not defined in C++

A serious question: is there any C++ compiler out there which defines
_Bool by default (without including stdbool.h) or where "#define _Bool
bool" would fail to work?


reply via email to

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