From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D97721F4B4 for ; Sun, 3 Jan 2021 07:11:55 +0000 (UTC) Received: from localhost ([::1]:51822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvxYQ-0001DR-E2 for normalperson@yhbt.net; Sun, 03 Jan 2021 02:11:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvxYL-0001Cx-Ov for bug-gnulib@gnu.org; Sun, 03 Jan 2021 02:11:49 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:39814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kvxYK-0002ov-2A for bug-gnulib@gnu.org; Sun, 03 Jan 2021 02:11:49 -0500 Received: by mail-wr1-f53.google.com with SMTP id c5so27720866wrp.6 for ; Sat, 02 Jan 2021 23:11:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a+865fo2De2Ddm7DWwfuzNkiby6ANE40NKEaO2XsWgk=; b=KY1fyysfxl59ssmroNxDl03ndSIuh93JKrTcB/37jkEIRz/XRPopvKgK7BSDhPPz/o aUnc2b5tpz43ZfFxi1Ewd1vhGgbPgEhIIkU4Z7Hj8mjnnQBq7OmldSpaZiGm4HxbMdxl gV/vzXq0dMCLgKWvf80Y5/B0GvBQeQYCxy7An8r+v2t4MZoO+hQRUokQ6iPRiBHwfbzf 2cxxvehTaYbduC1v+cMMvWyABvyDzNIvJ3TmenfgH/hArM0XP1vs9oaJVxiobyNzHbZ6 0FzJZQS8haLKQ9bhAGUUvWsvZGNP6qeOdxkp9kw9K+2TFliyBgI9Zy3IeaKpQVfY+DHJ 7ERw== X-Gm-Message-State: AOAM531LSamHxd5GNG5+Pi7BcvfQtzCF5Uc08/H0eB1CxmSVFVZDqIhq zsI4QCWmQybV4FjgwjZwAoOcSMNdeg7Ui4vskV8= X-Google-Smtp-Source: ABdhPJzEKsKKEyuGoi9cc6eM3PVDYbVESYLjhWC+ccHe904Wkaf8P4bo5ODztQN9K0phvbgL39e40L6JZzsRUbqL6ck= X-Received: by 2002:adf:eb05:: with SMTP id s5mr74332746wrn.333.1609657906314; Sat, 02 Jan 2021 23:11:46 -0800 (PST) MIME-Version: 1.0 References: <2624561.TfKlLiq1dV@omega> <9391b43b-e6e1-9aee-833c-be719a3083fd@cs.ucla.edu> In-Reply-To: <9391b43b-e6e1-9aee-833c-be719a3083fd@cs.ucla.edu> From: Jim Meyering Date: Sat, 2 Jan 2021 23:11:34 -0800 Message-ID: Subject: Re: vasnprintf.c vs GCC11's -Wanalyzer-null-argument (and glibc-2.31) To: Paul Eggert Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.221.53; envelope-from=meyering@gmail.com; helo=mail-wr1-f53.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "bug-gnulib@gnu.org List" , Bruno Haible Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On Sat, Jan 2, 2021 at 7:22 PM Paul Eggert 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.