From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.baldwin.cx (bigwig.baldwin.cx [66.216.25.90]) by sourceware.org (Postfix) with ESMTPS id 0E168386FC00 for ; Wed, 19 May 2021 18:49:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0E168386FC00 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=jhb@FreeBSD.org Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 36DFF1A84BA9; Wed, 19 May 2021 14:49:51 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Cc: tom@tromey.com Subject: [PATCH] Mark tu_abbrev_offset::operator<() const. Date: Wed, 19 May 2021 11:49:26 -0700 Message-Id: <20210519184926.22913-1-jhb@FreeBSD.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Wed, 19 May 2021 14:49:51 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KHOP_HELO_FCRDNS, SPF_HELO_PASS, SPF_SOFTFAIL, 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: Wed, 19 May 2021 18:49:53 -0000 clang 11 with libc++'s fails to match the existing operator<() for std::less<> since the method is not marked const. gdb/ChangeLog: * dwarf2/read.c (tu_abbrev_offset::operator<): Mark const. --- gdb/ChangeLog | 4 ++++ gdb/dwarf2/read.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4cc0cb8794f..d8992d48106 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2021-05-19 John Baldwin + + * dwarf2/read.c (tu_abbrev_offset::operator<): Mark const. + 2021-05-17 Tom Tromey * dwarf2/read.h: Update include. diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 8a57aeee61c..2cd8a95658a 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -7116,7 +7116,7 @@ struct tu_abbrev_offset {} /* This is used when sorting. */ - bool operator< (const tu_abbrev_offset &other) + bool operator< (const tu_abbrev_offset &other) const { return abbrev_offset < other.abbrev_offset; } -- 2.31.1