bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] Amend AC_CHECK_HEADER_STDBOOL for C++11 and modern dialects


From: Paul Eggert
Subject: Re: [PATCH] Amend AC_CHECK_HEADER_STDBOOL for C++11 and modern dialects
Date: Wed, 1 Jun 2016 11:22:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

On 06/01/2016 01:29 AM, David Seifert wrote:
stdbool.m4 is supposed to merely check that
stdbool.h fulfills C99 requirements. Why does it then necessarily check whether bool is a
defined _macro_?

Because C99 (and C11) require bool to be a macro.

m4/stdbool.m4 now does that check only inside #if __cplusplus < 201103, so I don't see why clang++ would complain now. Is it setting __cplusplus to an older value? Do older versions of the C++ standard require bool to be a macro? (I don't use C++.)

Wouldn't it be better to change the stdbool.m4 macro to instead try and use "bool" in a statement
or as a type

It depends on how strict the compatibility checking should be. Kind of a judgment call, I suppose. That being said, I don't see the harm in the current approach for C. Maybe it needs to be toned down for C++, but I'd like to know why before fiddling with this (it's been this way since at least 2002...).




reply via email to

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