From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 6BDE2383E813 for ; Fri, 15 May 2020 20:57:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6BDE2383E813 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 04FKvdV1004410 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 May 2020 16:57:44 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 04FKvdV1004410 Received: from [10.0.0.193] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 04B451E79B; Fri, 15 May 2020 16:57:38 -0400 (EDT) Subject: Re: -Wtautological-bitwise-compare error in arm-tdep.c To: Luis Machado , "gdb-patches@sourceware.org" References: <09dc3a76-bc35-0079-c72b-1b0ae5845faf@linaro.org> From: Simon Marchi Message-ID: <6d973400-466a-3127-783d-025bb5b7944a@polymtl.ca> Date: Fri, 15 May 2020 16:57:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <09dc3a76-bc35-0079-c72b-1b0ae5845faf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 15 May 2020 20:57:39 +0000 X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2020 20:57:59 -0000 On 2020-05-15 4:41 p.m., Luis Machado wrote: > On 5/15/20 5:32 PM, Simon Marchi via Gdb-patches wrote: >> We get this error in arm-tdep.c when building with clang 11: >> >>    CXX    arm-tdep.o >> /home/smarchi/src/binutils-gdb/gdb/arm-tdep.c:934:29: error: bitwise comparison always evaluates to false [-Werror,-Wtautological-bitwise-compare] >>            else if ((insn & 0xffb0) == 0xe950    /* ldrd Rt, Rt2, >>                     ~~~~~~~~~~~~~~~~^~~~~~~~~ >> >> Indeed, this can never evaluate to true.  I tried to look at what the condition >> should be, but it's a bit too deep into ARM instruction encoding for me.  I am >> pretty sure that the corresponding section in the ARM Architecture Reference >> Manual [1] is F3.1.15, if somebody wants to take a stab at it. >> >> Simon >> >> [1] https://static.docs.arm.com/ddi0487/fb/DDI0487F_b_armv8_arm.pdf >> > > Thanks for reporting this. I'll look into it. It may be a typo of some kind. Yes, I suppose, it's just not a trivial typo to fix! Simon