bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vasnprintf.c vs GCC11's -Wanalyzer-null-argument (and glibc-2.31)


From: Jim Meyering
Subject: Re: vasnprintf.c vs GCC11's -Wanalyzer-null-argument (and glibc-2.31)
Date: Sat, 2 Jan 2021 23:11:34 -0800

On Sat, Jan 2, 2021 at 7:22 PM Paul Eggert <eggert@cs.ucla.edu> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]