From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 9FCDC383E81C for ; Fri, 15 May 2020 20:41:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9FCDC383E81C Received: by mail-qv1-xf30.google.com with SMTP id d1so1780924qvl.6 for ; Fri, 15 May 2020 13:41:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=w/z7onU4BDnyiTIeNbk2z1h8hz92E7hxpXWtmUBPQKM=; b=GCo633T1iiOwoqwbEI6xHryB/PmBw06bCfQSU467SLgxSmnlBJ6JwAiGU4fJ3hSY6+ 1YlTQx2uKLjbGBtXQmYXdVHGXLHjjWblTq0DBnvkkBT1Kyz6S5t/9Isi1yg6rXTH31mM ul/2n6bl+oFN01muz1/mDcyAgNbISQdM9vxGt6AG6Wx6SAO15tsgavWtkRcwKYri6MH6 o0LpK/V5nmeFNT3M0XO05DvKUNPHZy7y3h0bnD7+AQ8qRionLYnDEya22kudL1mhQ5mo 3lW5sdvIUFa9eucDx+VIxWVBqc+FN2n0Kn42epp4E4vMpUSwWJ21j+4weX+Iq8efvIxp OQyg== X-Gm-Message-State: AOAM532NMxb2OXiqqwbK/C/JtYm+gQqPaSntH0JYkGENiTa/DD1NeVaq qD7KA1sPWSAsdTI1AYcrXSuaOH4F2rw= X-Google-Smtp-Source: ABdhPJyEpqp2RwjfvXDzbFSoD7RXQTM3Q6H4I5ONctD5mtHBVjpVAGUgubj4aS8dV8dEJYZf5OIjJQ== X-Received: by 2002:a0c:8b52:: with SMTP id d18mr5427281qvc.125.1589575265850; Fri, 15 May 2020 13:41:05 -0700 (PDT) Received: from [192.168.0.185] ([179.177.236.41]) by smtp.gmail.com with ESMTPSA id y23sm3021702qta.37.2020.05.15.13.41.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 May 2020 13:41:05 -0700 (PDT) Subject: Re: -Wtautological-bitwise-compare error in arm-tdep.c To: Simon Marchi , "gdb-patches@sourceware.org" References: From: Luis Machado Message-ID: <09dc3a76-bc35-0079-c72b-1b0ae5845faf@linaro.org> Date: Fri, 15 May 2020 17:41:02 -0300 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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:41:17 -0000 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.