Re: bool and C23

2022-09-18 Thread Bruno Haible
Paul Eggert wrote on 2022-09-10: > I installed into Gnulib the stdbool patches ... > > After we have more experience with this in Gnulib, we can start thinking > about updating Autoconf. As part of this "gathering experience", I compiled a gnulib testdir with various compilers on various systems

Re: bool and C23

2022-09-18 Thread Paul Eggert
On 9/18/22 10:10, Bruno Haible wrote: #define true (!false) works! It evaluates to 1 and is of the right type. Thanks, that's nicer than the tricky "#define true ((bool) +1)" that I was going to suggest. I did notice one glitch (an unnecessary "#undef true" that is always commented out)

Re: bool and C23

2022-09-18 Thread Bruno Haible
Paul Eggert wrote: > I did notice one glitch (an unnecessary "#undef true" that is always > commented out) and a couple of minor opportunities for simplification, > and installed the attached update. OK. > Use the slightly > more-elegant ‘!true’ instead of ‘true == 1’; this shouldn’t matter > i