Re: lib/malloca.c: warning about [-Wsign-compare]

2022-09-18 Thread Bruno Haible
Bjarni, Please use the bug report template from . Bruno

lib/malloca.c: warning about [-Wsign-compare]

2022-09-18 Thread Bjarni Ingi Gislason
Compilation with Debian clang version 14.0.6-2 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Software: groff (git HEAD) CC lib/libgnu_a-malloca.o ../lib/malloca.c:54:38: warning: comparison of integers of different signs: 'unsigned long' and 'idx_t' (aka

Re: bool and C23

2022-09-18 Thread Bruno Haible
Paul Eggert wrote: > > #include "unitypes.h" > > > > +/* Get bool. */ > > +#include > > In examples like these would it make sense to do the following instead? > >#if !@HAVE_C_BOOL@ && !defined __cplusplus > #include >#endif No, this would not work: * @HAVE_C_BOOL@ tests

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 >

Re: lib/malloca.c: error when compiling "groff"

2022-09-18 Thread Paul Eggert
On 9/18/22 09:36, Bjarni Ingi Gislason wrote: The source of the compilation error was the file "src/include/assert.h" in "groff". Removing it fixes the compilation. This makes it sound like the problem was a leftover assert.h from a previous build, which is not a Gnulib bug per se. If

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 Paul Eggert
On 9/18/22 06:33, Bruno Haible wrote: #include "unitypes.h" +/* Get bool. */ +#include In examples like these would it make sense to do the following instead? This would avoid a bit of namespace pollution. #if !@HAVE_C_BOOL@ && !defined __cplusplus #include #endif

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

Re: lib/malloca.c: error when compiling "groff"

2022-09-18 Thread Bjarni Ingi Gislason
The source of the compilation error was the file "src/include/assert.h" in "groff". Removing it fixes the compilation.

Re: bool and C23

2022-09-18 Thread Bruno Haible
Paul Eggert wrote: > I installed into Gnulib the stdbool patches ... The changes to the files lib/unicase.in.h lib/unictype.in.h lib/unigbrk.in.h lib/unistr.in.h are not good, because these files ultimately get installed as public header files: 1. They get copied to libunistring, with

signal: Fix a C++ compilation error due to sched_yield on OpenBSD 6.0

2022-09-18 Thread Bruno Haible
On OpenBSD 6.0, I'm seeing this compilation error: depbase=`echo test-sched-c++.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I../../gltests -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I. -I../../gltests -I.. -I../../gltests/.. -I../gllib