[Top][All Lists]

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

bool and C23

From: Paul Eggert
Subject: bool and C23
Date: Sat, 13 Aug 2022 20:12:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

I installed the attached patch into Gnulib, reflecting a patch I recently installed into Autoconf <>.

I think we need a new Autoconf macro that obsoletes AC_HEADER_STDBOOL and AC_CHECK_HEADER_STDBOOL. This new macro should arrange for 'bool', 'true' and 'false' to work, without programs having to include stdbool.h. For C23 and C++ the new macro should do nothing. For C99 through C17 it should include <stdbool.h> in config.h. For pre-C99 it should #define bool, true, and false in config.h.

Eventually Gnulib and other code can stop using AC_*HEADER_CHECKBOOL and stop including <stdbool.h>.

I'm thinking of calling the new macro AC_C_BOOL. Gnulib can have a new c-bool module that implements AC_C_BOOL for platforms running older Autoconf.


Attachment: 0001-stdbool-port-to-C23.patch
Description: Text Data

reply via email to

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