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

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

 



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?

Mojca

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux