From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, Sergio Durigan Junior <sergiodj@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Oh dear. I regret to inform you that commit ab816a274505933da2f854014b54901c3c3db9d2 might be unfortunate
Date: Mon, 02 Oct 2017 09:39:00 -0000 [thread overview]
Message-ID: <864b8f6a-ac73-fb6f-866b-a20eb63e8d9b@redhat.com> (raw)
In-Reply-To: <87h8viwbig.fsf@pokyo>
On 10/02/2017 03:04 AM, Tom Tromey wrote:
>>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> 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<ada_exc_info*, std::vector<ada_exc_info> >; _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
next prev parent reply other threads:[~2017-10-02 9:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5378.08408630571$1506886707@news.gmane.org>
2017-10-02 1:10 ` Sergio Durigan Junior
2017-10-02 2:04 ` Tom Tromey
2017-10-02 2:43 ` Sergio Durigan Junior
2017-10-02 9:10 ` Tejas Belagod
2017-10-02 9:39 ` Pedro Alves [this message]
2017-10-01 19:38 gdb-buildbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=864b8f6a-ac73-fb6f-866b-a20eb63e8d9b@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@redhat.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox