Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Paul J. Lucas
On Jun 8, 2024, at 2:46 PM, Paul J. Lucas wrote: > # if defined __clang__ || __cplusplus /* ||, not && */ That should have read: # if defined __clang__ || defined __cplusplus - Paul

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Paul J. Lucas
On Jun 8, 2024, at 12:38 PM, Paul Eggert wrote: > (Moving this from to > because it's Gnulib, not Autoconf.] Wait a minute: at the top of the generated config.h (which is where _GL_ATTRIBUTE_NODISCARD is defined), it says:

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Paul J. Lucas
On Jun 8, 2024, at 2:23 PM, Bruno Haible wrote: > Adding to what Paul Eggert wrote: >> It looks like -Wc23-extensions is the problem. If you stop using it (or >> if you also use -std=gnu23), you shouldn't get those warnings. At least, >> that's the behavior I see with clang 18.1.6 (a bit later

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Paul J. Lucas
On Jun 8, 2024, at 12:38 PM, Paul Eggert wrote: > (Moving this from to > because it's Gnulib, not Autoconf.] Sorry. >> Recently, I started getting warnings like: >> ./slist.h:170:1: warning: [[]] attributes are a C23 extens

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Bruno Haible
Paul J. Lucas wrote: > IMHO, the code generated for config.h should not use [[ anywhere unless it > knows for certain (via #if’s or other means) that the compiler supports [[ > without warnings under any circumstances. The compiler does not give us this information. The compiler only gives us th

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Bruno Haible
Adding to what Paul Eggert wrote: > It looks like -Wc23-extensions is the problem. If you stop using it (or > if you also use -std=gnu23), you shouldn't get those warnings. At least, > that's the behavior I see with clang 18.1.6 (a bit later than your > clang) on Fedora. > > -Wc23-extensions is

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Paul Eggert
On 2024-06-08 13:31, Paul J. Lucas wrote: It looks like -Wc23-extensions is the problem. If you stop using it (or if you also use -std=gnu23), you shouldn't get those warnings. At least, that's the behavior I see with clang 18.1.6 (a bit later than your clang) on Fedora. I’m not using that opt

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Paul Eggert
On 2024-06-08 13:36, Paul J. Lucas wrote: at the top of the generated config.h (which is where _GL_ATTRIBUTE_NODISCARD is defined), it says: /* src/config.h. Generated from config.h.in by configure. */ /* src/config.h.in. Generated from configure.ac by autoheader. */ And autoheader is part

Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang

2024-06-08 Thread Paul Eggert
(Moving this from to because it's Gnulib, not Autoconf.] Recently, I started getting warnings like: ./slist.h:170:1: warning: [[]] attributes are a C23 extension [-Wc23-extensions] 170 | NODISCARD | ^ ../lib/attr

c32isblank tests: Avoid test failure on NetBSD 10.0

2024-06-08 Thread Bruno Haible
In a testdir of module 'c32isblank' without module 'uchar-c23', I see a failure: FAIL: test-c32isblank.sh test-c32isblank.c:107: assertion 'is == 0' failed [1] Abort trap (core dumped) LC_ALL=${LOCALE_FR_UTF8} ${CHECKER} ./test-c32... FAIL test-c32isblank.sh (exit statu

Re: usleep: Document Cygwin bug

2024-06-08 Thread Bruno Haible
> In a CI run of libunistring (on GitHub), I see a test failure: > > ../../tests/test-usleep.c:35: assertion 'start < time (NULL)' failed > FAIL test-usleep.exe (exit status: 134) I'm seeing this test failure again. It's time to disable the test on Cygwin. 2024-06-08 Bruno Haible

Re: test-framework-sh: Don't leave temporary directories on NetBSD.

2024-06-08 Thread Bruno Haible
Collin Funk wrote: > Originally I thought that this was due to GNU getopt rearranging options > or something, since I don't think NetBSD does that. The cause appears to be that for GNU mktemp, the -t option does not take an argument [1]; likewise for OpenBSD mktemp [2] and Solaris mktemp [3]. Whe

test-framework-sh: Don't leave temporary directories on NetBSD.

2024-06-08 Thread Collin Funk
Hi Paul, Jim, A few years ago Paul removed '-t' from mktemp to accommodate NetBSD [1]. The change was then reverted since Jim preferred the directory name created with -t. The issue arrives again because although it "works" it silently litters /tmp with empty directories. Here is an example on Ne