Re: is_dotdot confusion in Gnulib fts's fts_safe_changedir?

2019-03-17 Thread Jim Meyering
On Sun, Mar 17, 2019 at 4:16 PM Paul Eggert wrote: > I installed the attached patch into Gnulib to remove an unnecessary > assignment in fts_safe_changedir. > > Jim, could you please check this? My patch does not change behavior, but > I worry that there's a bug in fts_safe_changedir that the unne

is_dotdot confusion in Gnulib fts's fts_safe_changedir?

2019-03-17 Thread Paul Eggert
I installed the attached patch into Gnulib to remove an unnecessary assignment in fts_safe_changedir. Jim, could you please check this? My patch does not change behavior, but I worry that there's a bug in fts_safe_changedir that the unnecessary assignment was a symptom of. This is code you wrote m

Re: Including verify.h in C++ with C linkage

2019-03-17 Thread Bruno Haible
Hi, > > the preferred way to include .h files in C++ is like > > #include "verify.h" > > Right, my issue was that the file I need to include has to be wrapped in > an extern "C" because I need to have C linkage with the definitions > provided, but that file in turn includes verify.h. The right

Re: undefined behaviour findings in bitset

2019-03-17 Thread Bruno Haible
Hi Akim, > But GCC 4.7 does not support [[noreturn]] yet, even in gnu++11 mode. > > I need something like the following changes. > -# if 201103 <= (defined __cplusplus ? __cplusplus : 0) > +# if (201103 <= (defined __cplusplus ? __cplusplus : 0) \ > + && 4 < __GNUC__ + (8 <= __GNUC_MINOR__)

Re: Including verify.h in C++ with C linkage

2019-03-17 Thread Alex
Bruno Haible writes: > Hi Alex, > >> > Hello, I'm trying to use C++ in a project that uses Gnulib, and I need >> > to use C linkage around a statement that eventually includes verify.h. >> > However, this leads to the following error message: >> > >> > ./lib/verify.h:178:1: error: template with

Re: undefined behaviour findings in bitset

2019-03-17 Thread Paul Eggert
Akim Demaille wrote: Wouldn't it be useful to have a file that defines macros such as GL_GCC_VERSION libc-config.h defines __GNUC_PREREQ, which is the most common spelling for such a macro. It's in the libc-config module. This was originally designed for code shared with glibc but can be used

Re: Including verify.h in C++ with C linkage

2019-03-17 Thread Bruno Haible
Hi Alex, > > Hello, I'm trying to use C++ in a project that uses Gnulib, and I need > > to use C linkage around a statement that eventually includes verify.h. > > However, this leads to the following error message: > > > > ./lib/verify.h:178:1: error: template with C linkage > >template Yo

Re: undefined behaviour findings in bitset

2019-03-17 Thread Akim Demaille
Le 17 mars 2019 à 08:39, Akim Demaille a écrit : > > commit 4d9813bf6bbf6489c1de4ad9d48943b961976bce > Author: Akim Demaille > Date: Sun Mar 17 08:34:22 2019 +0100 > >bitset, timevar: Depend on c99 > >Reported by Bruno Haible. >* modules/bitset, modules/timevar (Depends-on): Add

Re: Colored output

2019-03-17 Thread Jim Meyering
On Sun, Mar 17, 2019 at 9:30 AM Bruno Haible wrote: > Hi Jim, > > You wrote in > : > > > I too would start with coreutils, noting that one must be careful to > > handle signals, so that the terminal is not left in a bad state whe

Re: Including verify.h in C++ with C linkage

2019-03-17 Thread Alex
Alex writes: > Hello, I'm trying to use C++ in a project that uses Gnulib, and I need > to use C linkage around a statement that eventually includes verify.h. > However, this leads to the following error message: > > ./lib/verify.h:178:1: error: template with C linkage >template > > Any wa

Including verify.h in C++ with C linkage

2019-03-17 Thread Alex
Hello, I'm trying to use C++ in a project that uses Gnulib, and I need to use C linkage around a statement that eventually includes verify.h. However, this leads to the following error message: ./lib/verify.h:178:1: error: template with C linkage template Any way to successfully include thi

Re: Colored output

2019-03-17 Thread Bruno Haible
Hi Jim, You wrote in : > I too would start with coreutils, noting that one must be careful to > handle signals, so that the terminal is not left in a bad state when > output is interrupted between a pair of set/reset escape sequ

Re: undefined behaviour findings in bitset

2019-03-17 Thread Akim Demaille
> Le 16 mars 2019 à 20:53, Bruno Haible a écrit : > > Hi Akim, > > In the first patch: >> + for (bitset_windex windex = bitno / BITSET_WORD_BITS; >> + (windex - woffset) < EBITSET_ELT_WORDS; windex++) > > This is C99 syntax. If you don't add 'c99' as a dependency of yo