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 42009383E814 for ; Fri, 15 May 2020 20:32:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 42009383E814 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 04FKW1rs020250 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 15 May 2020 16:32:05 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 04FKW1rs020250 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 C7A471E79B for ; Fri, 15 May 2020 16:32:00 -0400 (EDT) To: "gdb-patches@sourceware.org" From: Simon Marchi Subject: -Wtautological-bitwise-compare error in arm-tdep.c Message-ID: Date: Fri, 15 May 2020 16:32:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 15 May 2020 20:32:01 +0000 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, 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:32:20 -0000 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