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-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 531BA1F8C8 for ; Mon, 27 Sep 2021 13:49:53 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8D45F3858419 for ; Mon, 27 Sep 2021 13:49:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D45F3858419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632750592; bh=xWe3AoFYaMYszK82xmdoI8+UCeGqR+NPJ5lCrFVOhms=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=seJpXcOBB0cYmfmSUpkYaFw2RBBsdaeAvXsbeor37Ew5TQLCXXLjXuM5zUDGsIWBg OS9TgeEHFW27ishYlDspLOw0j99Q08P3N7fnK6ggZXTEKpJuY0ehBPrdKNkjKrrpV1 k/j8glUWluCAPJqHNNWJM/pGIFEVSBgzhwV03B2k= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id B64733858439 for ; Mon, 27 Sep 2021 13:49:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B64733858439 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-351-FDmGIi53O46L72IIxTApbQ-1; Mon, 27 Sep 2021 09:48:59 -0400 X-MC-Unique: FDmGIi53O46L72IIxTApbQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2795518125C0; Mon, 27 Sep 2021 13:48:58 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.176]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7BEF11972D; Mon, 27 Sep 2021 13:48:57 +0000 (UTC) To: Martin Sebor via Libc-alpha Subject: Re: avoid -Waddress in vfprintf-internal.c References: <14db3354-56a5-86cc-b840-010c9ba7fc83@gmail.com> Date: Mon, 27 Sep 2021 15:48:55 +0200 In-Reply-To: <14db3354-56a5-86cc-b840-010c9ba7fc83@gmail.com> (Martin Sebor via Libc-alpha's message of "Tue, 21 Sep 2021 18:31:18 -0600") Message-ID: <87ilymgmd4.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" * Martin Sebor via Libc-alpha: > Building Glibc with a GCC 12 enhanced to detect more instances > of comparing addresses to null that are guaranteed to evaluate > to a constanst triggers a large number of such instancesl. > The warnings, all isolated to the same file, are valid and > intended but the Glibc code is safe. They show up because > the comparison is in a macro to which either null or a constant > address of an array element are alternately passed as an argument. > > The attached patch avoids these warnings by introducing local > variables for the address being compared (an array element) > as well as for the null pointer. > > Tested by building Glibc on x86_64, verifying the warnings > are gone, and by running the testsuite and checking for new > failures. I believe the issue addressed in this patch no longer exists in current Git. Would you please verify? Thanks, Florian