Paul Eggert <[email protected]> writes: > 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.
+1 on adding it to manywarnings. I noticed this warning and the others that Bruno mentioned a while ago, but didn't bother fixing them because they are bogus. I'm confused by the rationale behind many of the warnings that Clang adds, since many seemingly are just to create noise. Another example is -Wno-tautological-constant-out-of-range-compare which just warns you for writing portable code. Collin
