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...).