bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Jim Meyering <jim@meyering.net>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: "bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>,
	Bruno Haible <bruno@clisp.org>
Subject: Re: vasnprintf.c vs GCC11's -Wanalyzer-null-argument (and glibc-2.31)
Date: Sat, 2 Jan 2021 23:11:34 -0800	[thread overview]
Message-ID: <CA+8g5KE74W_vKsh41DdKbV9j3ysr6hDeKGFALQ5KjqpofEufow@mail.gmail.com> (raw)
In-Reply-To: <9391b43b-e6e1-9aee-833c-be719a3083fd@cs.ucla.edu>

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.


      parent reply	other threads:[~2021-01-03  7:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03  1:11 vasnprintf.c vs GCC11's -Wanalyzer-null-argument (and glibc-2.31) Jim Meyering
2021-01-03  1:49 ` Bruno Haible
2021-01-03  1:54   ` Bruno Haible
2021-01-03  3:21   ` Paul Eggert
2021-01-03  4:04     ` Bruno Haible
2021-01-03  7:11     ` Jim Meyering [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+8g5KE74W_vKsh41DdKbV9j3ysr6hDeKGFALQ5KjqpofEufow@mail.gmail.com \
    --to=jim@meyering.net \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).