|
From: | Paul Eggert |
Subject: | Re: vasnprintf.c vs GCC11's -Wanalyzer-null-argument (and glibc-2.31) |
Date: | Sat, 2 Jan 2021 19:21:48 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
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.
0001-maint-work-around-GCC-Wreturn-local-addr-bug.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |