On 2026-03-01 10:49, Bruno Haible wrote:
This warning ought to be ignored by all C programmers.
Yes, it's a bogus warning that attempts to impose a C++ style onto C. However, in this case pacifying Clang saved a byte and made the code a bit clearer by omitting an unnecessary and possibly-confusing terminating null, so it's arguably a win anyway.
Admittedly the patch also meant I didn't have to change the Emacs configure script to add -Wno-string-plus-int to CFLAGS. Perhaps we should change Gnulib's manywarnings module to specify -Wno-string-plus-int automatically when compiling Gnulib code with a clang that supports that option; then these sorts of complaints wouldn't come up as often.
