unigbrk/u8-grapheme-{next,prev} tests: Fix gcc -Wformat warnings

2023-09-05 Thread Bruno Haible
These gcc warnings unigbrk/test-u16-grapheme-next.c:60:55: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long int' [-Wformat=] unigbrk/test-u16-grapheme-prev.c:62:55: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long int' [

stdint, *printf: Update doc about MSVC

2023-09-05 Thread Bruno Haible
Unlike what the current gnulib documentation says, MSVC 14 - has , - supports %td, %zu, %ju in *printf (verified through the attached program). At least, that's what I see in my older MSVC env from 2017/2018. 2023-09-05 Bruno Haible stdint, *printf: Update doc about MSVC.

tests: Ensure stderr output is displayed before abort()

2023-09-05 Thread Bruno Haible
On some platforms, notably MSVC 14, the contents of the stderr output buffer is lost when abort() is called. But we want to see relevant information in the log files when a test program aborts. 2023-09-05 Bruno Haible tests: Ensure stderr output is displayed before abort(). *

Re: threads-h tests: Fix gcc -Wold-style-declaration warning

2023-09-05 Thread Bruno Haible
I did: > 2023-09-04 Bruno Haible > > threads-h tests: Fix gcc -Wold-style-declaration warning. > * tests/test-thread_local.c (value0, value1, value2, value3): Put the > 'thread_local' storage class specifier before the type. A similar change is also useful in the configure te

Re: Add info about recommended warning options (was: -Wextra ?)

2023-09-05 Thread Bruno Haible
Paul Eggert wrote: > > Is that use of -Wextra an experiment, or do you want to use it always? > > Oh, it was just an experiment. > > > I'm asking because some the warnings that it enables are undesired, IMO, > > Quite right. Glad to hear this. I went through all warnings I could get from GCC 1

Re: nullptr vs NULL

2023-09-05 Thread Bruno Haible
Paul Eggert wrote: > > It's still a bit early to do so, because it can trigger compilation errors > > when people are not super careful > > Doesn't Gnulib's nullptr module fix the problems, whatever they are? Yes, it does. But when - like here - people are using older C++ compilers, or when I am