On Sat, Jan 2, 2021 at 7:22 PM Paul Eggert <[email protected]> wrote: > On 1/2/21 5:49 PM, Bruno Haible wrote: > > The vast majority of -Wanalyzer* warnings that we have seen so far were > > false > > alarms [1]. > > I've had such bad luck with those warnings that I have not been much > motivated to file GCC bug reports for them. I guess the warnings are > helpful with low-quality code, but I think I've only found one bug with > them in many months of using them on several GNU projects, as compared > to a lot of false alarms. I'm almost tempted to disable them in Gnulib > by default. > > For diffutils I worked around the problem by installing the attached > patch, which disables the warning in Gnulib code. > > Without the attached patch I got the same warning that Jim got, when I > used GCC 10.2.1 20201125 (Red Hat 10.2.1-9) x86-64. I got more warnings > elsewhere in Gnulib when I used gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0 > x86-64, but I'd rather not work around those bugs as we can just ask > people to use --disable-gcc-warnings if their GCC is old.
Thanks to both of you for the quick work/feedback Sorry I must agree it's best to disable -- though I would have been tempted to disable it only for that one file, rather than for all of gnulib that diffutils will ever use. I do admit the difference is minimal, given gnulib's maturity and test coverage.
