From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78227 invoked by alias); 20 Nov 2017 00:33:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 78215 invoked by uid 89); 20 Nov 2017 00:33:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.7 required=5.0 tests=BAYES_00,GIT_PATCH_1,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=bite X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Nov 2017 00:33:43 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45EA97AE99; Mon, 20 Nov 2017 00:33:42 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BA7A5C542; Mon, 20 Nov 2017 00:33:41 +0000 (UTC) Subject: Re: [PATCH 26/40] Optimize .gdb_index symbol name searching To: Simon Marchi , gdb-patches@sourceware.org References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-27-git-send-email-palves@redhat.com> <87b7a366-9b57-c169-6336-78b3326bba89@simark.ca> From: Pedro Alves Message-ID: <5d721d13-d886-0400-db6b-76485c545142@redhat.com> Date: Mon, 20 Nov 2017 00:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <87b7a366-9b57-c169-6336-78b3326bba89@simark.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-11/txt/msg00385.txt.bz2 On 11/18/2017 05:23 AM, Simon Marchi wrote: > On 2017-06-02 08:22 AM, Pedro Alves wrote: >> + /* In completion mode, increment the last character because >> + we want UPPER to point past all symbols names that have >> + the same prefix. */ >> + std::string after = cplus; >> + >> + gdb_assert (after.back () != 0xff); > > Hi Pedro, > Hi! > With Clang, I get this warning: > > /home/simark/src/binutils-gdb/gdb/dwarf2read.c:4316:30: error: comparison of constant 255 with expression of type '__gnu_cxx::__alloc_traits >::value_type' (aka 'char') is always true [-Werror,-Wtautological-constant-out-of-range-compare] > gdb_assert (after.back () != 0xff); > ~~~~~~~~~~~~~ ^ ~~~~ > /home/simark/src/binutils-gdb/gdb/common/gdb_assert.h:34:13: note: expanded from macro 'gdb_assert' > ((void) ((expr) ? 0 : \ > ^~~~ > Bleh, I should have known that'd come back and bite. :-P I'm sending a 3 patch series in response to this email that fixes that, and also other things that I ran into in course of fixing it. Thanks, Pedro Alves