Paul Eggert wrote:
> I reproduced 
> the problem on Fedora 43 with G++ 15.2.1 (where <stdbit.h> does nothing 
> when __cplusplus <= 202302L), and installed the attached which works for 
> me.

It works for me too, on Ubuntu 24.04 with gcc 15.2.0. Thanks.

> Perhaps at some point we'll need to complicate things by splitting 
> @HAVE_STDBIT_H@ into @HAVE_CXX_STDBIT_H@ and @HAVE_C_STDBIT_@, as we 
> already do for @HAVE_STDCKDINT_H@, but I hope we don't have to do that.

I agree. If we can avoid running configure tests with the C++ compiler,
it's better.

> It is curious that a C++ compiler would silently ignore an "#include 
> <stdbit.h>" that works fine in the corresponding C compiler. Wouldn't it 
> be better to diagnose the directive? Is there a C++ tradition to ignore 
> "#include <X>" directives when <X> is taken from a future C++ standard?

Good questions. I have no idea why the libstdc++ people coded it this way.

Bruno




Reply via email to