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=-5.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, 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 4A0301F8C8 for ; Mon, 27 Sep 2021 23:58:54 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 70F503858439 for ; Mon, 27 Sep 2021 23:58:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70F503858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632787131; bh=YS9ifZwjXplgtq5fkgYggghhUXDGZr0MHsy4ssUtYOQ=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=LBCXOgMBx7qYzfzepMOVSBPu2MOjZQJQwWZImRs6Un0cnns5EGEMvQaihlQW6QGXJ KM43n2TIegABM00IexnnGTSIp9qdA0OAa9tc+p3GwUjSKYAhCcN1hoepJ7azc2UENF 4xkLy8XKQ4pZBsMnW+LLTUavpw4OH/SMtVD/WsPU= Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by sourceware.org (Postfix) with ESMTPS id 3AF803858C2C for ; Mon, 27 Sep 2021 23:58:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3AF803858C2C Received: by mail-oo1-xc29.google.com with SMTP id j11-20020a4a92cb000000b002902ae8cb10so6589845ooh.7 for ; Mon, 27 Sep 2021 16:58:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YS9ifZwjXplgtq5fkgYggghhUXDGZr0MHsy4ssUtYOQ=; b=ONaoA0ED9t3kDuZyOP8PpombVghuJjiBwqjt+2FR5KDWxqT8+iWSQri0ebESq3c/53 FbIZFPqa3ha295SIG1T+oOVwKB56mAqgdiHBeopCplTYOCNc7vEIR6Ut4AOLlcGNt7EH 1XekxhTaN1R6IucQ9cKo3yKn2xU+xRImtJze5jdkBvd036Ybn3Xg4lDYgj0u6g0VLHBV 4OszQbBj6KpVdgFsHI43peJHyMeqCKRW+bfU+K3xiD5gRU67SFmbShEZthR0q9n3+pYP /TaO5FUWePHAdMDogIrPhwV+3MK2h2pZF91jI98eOJxsA4DIntwqCGUCG3kSGkIRHwD8 WfJA== X-Gm-Message-State: AOAM5330zuAbBg5Xi5YKNwLPDhEMPy/HzITLodUfn9cMtipEx2C5iIkl yHbue+n7UoUbeVGhGCG1TyJr+h2ORJ8= X-Google-Smtp-Source: ABdhPJzdlpOiJSI5D2fotQUf5OXLReYvgW6R1zl9w0WgGa8tBjGgx2BPyBloKSeDPg4pJ6WEYfg9Hw== X-Received: by 2002:a05:6820:1050:: with SMTP id x16mr2335950oot.40.1632787111562; Mon, 27 Sep 2021 16:58:31 -0700 (PDT) Received: from [192.168.0.41] (97-118-96-133.hlrn.qwest.net. [97.118.96.133]) by smtp.gmail.com with ESMTPSA id x62sm3124160oig.24.2021.09.27.16.58.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 16:58:31 -0700 (PDT) Subject: Re: avoid -Waddress in vfprintf-internal.c To: Florian Weimer , Martin Sebor via Libc-alpha References: <14db3354-56a5-86cc-b840-010c9ba7fc83@gmail.com> <87ilymgmd4.fsf@oldenburg.str.redhat.com> Message-ID: <05f35752-1d06-72ae-85bc-28ad2365b1c6@gmail.com> Date: Mon, 27 Sep 2021 17:58:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <87ilymgmd4.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Martin Sebor via Libc-alpha Reply-To: Martin Sebor Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 9/27/21 7:48 AM, Florian Weimer wrote: > * 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? I don't see the warnings in my latest build anymore. The GCC patch that enhances the warning is still waiting for formal approval but I don't expect to make any substantive changes to it. I've resolved the bug I raised to keep track of the warnings (BZ #28368). Thanks Martin