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

2016-08-17 Thread Paul Eggert
David Seifert wrote: attached the patch. I believe this patch in fact increases strictness even for C code, as it relies on the proper functioning of the "bool" macro. I have tested it with multiple C and C++ compilers on OS X and Linux: Thanks, and sorry about the late reply. I installed the

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

2016-06-17 Thread Paul Eggert
David Seifert wrote: any updates on merging the patch I sent in? Sorry, not yet. Perhaps ping again in August

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

2016-06-17 Thread David Seifert
On Do, 2016-06-02 at 15:01 -0700, Paul Eggert wrote: > On 06/02/2016 02:26 PM, David Seifert wrote: > > > > We could relax the whole thing a bit, and maybe just make a plain > > __cplusplus check, without a version number. This keeps the C side > > as > > it always has been, but allows C++'s prope

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

2016-06-03 Thread David Seifert
On Do, 2016-06-02 at 15:01 -0700, Paul Eggert wrote: > On 06/02/2016 02:26 PM, David Seifert wrote: > > > > We could relax the whole thing a bit, and maybe just make a plain > > __cplusplus check, without a version number. This keeps the C side > > as > > it always has been, but allows C++'s prope

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

2016-06-02 Thread Paul Eggert
On 06/02/2016 02:26 PM, David Seifert wrote: We could relax the whole thing a bit, and maybe just make a plain __cplusplus check, without a version number. This keeps the C side as it always has been, but allows C++'s proper literals to kick in. In addition, _Bool is also a major obstacle, as it

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

2016-06-02 Thread David Seifert
On Mi, 2016-06-01 at 11:22 -0700, Paul Eggert wrote: > 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) re

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

2016-06-01 Thread Paul Eggert
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

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

2016-06-01 Thread David Seifert
On 31 May 2016, at 18:07, Paul Eggert wrote:On 05/31/2016 12:33 AM, David Seifert wrote:configure.ac:AC_INITAC_PROG_CXXm4_include([stdbool.m4])AC_LANG_PUSH([C++])AC_CHECK_HEADER_STDBOOLThanks for the example. I installed your patch into gnulib. But I don't see how it can work without __bool_true_f

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

2016-05-31 Thread Paul Eggert
On 05/31/2016 12:33 AM, David Seifert wrote: configure.ac: AC_INIT AC_PROG_CXX m4_include([stdbool.m4]) AC_LANG_PUSH([C++]) AC_CHECK_HEADER_STDBOOL Thanks for the example. I installed your patch into gnulib. But I don't see how it can work without __bool_true_false_are_defined being defined,

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

2016-05-30 Thread Paul Eggert
David Seifert wrote: AC_CHECK_HEADER_STDBOOL needs a fix, now that GCC 6 defaults to a C++11 dialect, which breaks the assumption that stdbool.h is allowed to unconditionally define "false" as a macro. I don't see the problem. Can you give a self-contained test case that illustrates it?

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

2016-05-30 Thread David Seifert
p 17 00:00:00 2001 From: David Seifert Date: Mon, 30 May 2016 22:54:32 +0200 Subject: [PATCH] Amend AC_CHECK_HEADER_STDBOOL for C++11 and modern dialects --- m4/stdbool.m4 | 39 +-- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/m4/stdbo