From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48751 invoked by alias); 2 Oct 2017 09:39:49 -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 48738 invoked by uid 89); 2 Oct 2017 09:39:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=blame, H*Ad:U*palves, dear 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, 02 Oct 2017 09:39:47 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 112EE7E437; Mon, 2 Oct 2017 09:39:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 112EE7E437 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com 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 11045907EF; Mon, 2 Oct 2017 09:39:42 +0000 (UTC) Subject: Re: Oh dear. I regret to inform you that commit ab816a274505933da2f854014b54901c3c3db9d2 might be unfortunate To: Tom Tromey , Sergio Durigan Junior References: <5378.08408630571$1506886707@news.gmane.org> <87infy73sx.fsf@redhat.com> <87h8viwbig.fsf@pokyo> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <864b8f6a-ac73-fb6f-866b-a20eb63e8d9b@redhat.com> Date: Mon, 02 Oct 2017 09:39: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: <87h8viwbig.fsf@pokyo> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2017-10/txt/msg00016.txt.bz2 On 10/02/2017 03:04 AM, Tom Tromey wrote: >>>>>> "Sergio" == Sergio Durigan Junior writes: > > Sergio> /usr/include/c++/4.8/bits/stl_algo.h:2245:19: error: passing ‘const ada_exc_info’ as ‘this’ argument of ‘bool ada_exc_info::operator<(const ada_exc_info&)’ discards qualifiers [-fpermissive] > > I don't really understand this error, I have a local build of gcc 4.8.5, and I see the same. The const is coming from here: /opt/gcc-4.8/include/c++/4.8.5/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = ^^^^^^^^^^ __gnu_cxx::__normal_iterator >; _Tp = ada_exc_info]’: ^^^^^^^^^^^^^^^^^^ I think that was a bug in libstdc++. std::__unguarded_partition no longer take 'const _Tp&' in the current sources. Git blame points at: https://gcc.gnu.org/ml/libstdc++/2012-04/msg00074.html where François wrote (emphasis mine): ~~~~ - __unguarded_partition used to have 3 template parameters: _RandomAccessIterator, _Tp and _Compare. It was taking a const reference ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to _Tp which was a useless constraint for the functor. So it now only have 2 template parameters, const _Tp& has been replaced by ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ iterator_traits<_RandomAccessIterator>::reference. ~~~~ and especially why I don't see it > (and didn't see it from try?), but I wonder if changing operator< and > operator== to const-qualified would help. > > The appended is an attempt but I'm not sure how to test it now. Yes, I also think that that's the right fix. I've pushed it in now. Thanks, Pedro Alves