From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 14D10385841E for ; Mon, 17 Jan 2022 11:14:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 14D10385841E Received: by mail-pl1-x633.google.com with SMTP id c3so20908794pls.5 for ; Mon, 17 Jan 2022 03:14:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EW8CnIaL9EgAxEnOiTn2Fy5o5I0THKF1IDgajS4vTaw=; b=VNt6eyNbWo0Y1HueJp1+wuAJFPzwWh6OGmjrJuZjGt8tvAUCQT93QCMbTcq0+7IFNk PkAnjIc3U3pAXrom7CVlOt4rLdCuPx9aH0/RJStHAN+XoIN+zxgdGK9vBf+q8cMUHIs0 kbxInyr1TckikqtgxI6NmBVgO/NQVb2lF6vPxa/OPDGVTr2gLonfFpAiJPHUxTpx239u xSavpVj3WOMt7g589tDHsKGKZkI8CtqUE9ydbw/r+V75RZhf1PLAnFxlZt9HyG8XIRY3 UO1PfFJOzAfcv4eZQme/j1w4TYFuhCkLmalHFP8HL+I5751rbkaxicG6P4ecKp7kETaM ZbuQ== X-Gm-Message-State: AOAM532a2PlSOzUazEbO32UMZmvflsznvBV1eC64qAwO435haR8BSUth FwL+dU51cVFh5REGT/mdjkNsTZR49sQ= X-Google-Smtp-Source: ABdhPJxA5AZQ64DyaYxVBJhSonsqyoSd5ctL1z+9749hYm7RP8DFQ8HW38R/Dcfou/vmxlc/DWUWdw== X-Received: by 2002:a17:902:b944:b0:14a:b045:4d00 with SMTP id h4-20020a170902b94400b0014ab0454d00mr6684980pls.52.1642418074229; Mon, 17 Jan 2022 03:14:34 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id gk10sm4213358pjb.1.2022.01.17.03.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 03:14:33 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 6E5F511402FC; Mon, 17 Jan 2022 21:44:30 +1030 (ACDT) Date: Mon, 17 Jan 2022 21:44:30 +1030 From: Alan Modra To: Simon Marchi Cc: binutils@sourceware.org Subject: Re: [PATCH] bfd/elf64-ppc.c: fix clang -Wbitwise-instead-of-logical warning in ppc64_elf_check_init_fini Message-ID: References: <20220116031307.17074-1-simon.marchi@efficios.com> <6416247f-d88f-48db-4352-e04988ecfe94@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6416247f-d88f-48db-4352-e04988ecfe94@efficios.com> X-Spam-Status: No, score=-3032.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2022 11:14:38 -0000 On Mon, Jan 17, 2022 at 05:50:46AM -0500, Simon Marchi wrote: > > > On 2022-01-16 18:10, Alan Modra wrote: > > On Sat, Jan 15, 2022 at 10:13:07PM -0500, Simon Marchi via Binutils wrote: > >> --- a/bfd/elf64-ppc.c > >> +++ b/bfd/elf64-ppc.c > >> @@ -13129,7 +13129,7 @@ bool > >> ppc64_elf_check_init_fini (struct bfd_link_info *info) > >> { > >> return (check_pasted_section (info, ".init") > >> - & check_pasted_section (info, ".fini")); > >> + && check_pasted_section (info, ".fini")); > >> } > >> > >> /* See whether we can group stub sections together. Grouping stub > > > > I think I'd rather see this fixed by > > > > bool ret1 = check_pasted_section (info, ".init"); > > bool ret2 = check_pasted_section (info, ".fini"); > > return ret1 && ret1; > > > > check_pasted_section has a side effect, and failure normally only > > produces a warning. > > > > No problem, here's the updated patch. Thanks, please commit. -- Alan Modra Australia Development Lab, IBM