diff options
author | Pedro Alves <palves@redhat.com> | 2017-10-02 10:18:30 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-10-02 10:18:30 +0100 |
commit | cc536b21677586455973f81ee05257ada8efdcb8 (patch) | |
tree | bf124cad2e58a0abec01dde07fb63df0f3e1c798 /gdb/ChangeLog | |
parent | 289a6840c1ed80f71d58632bb6d702d97d114387 (diff) | |
download | gdb-cc536b21677586455973f81ee05257ada8efdcb8.zip gdb-cc536b21677586455973f81ee05257ada8efdcb8.tar.gz gdb-cc536b21677586455973f81ee05257ada8efdcb8.tar.bz2 |
Fix GDB build with G++ 4.8
G++ 4.8 trips on:
In file included from /opt/gcc-4.8/include/c++/4.8.5/algorithm:62:0,
from ../../src/gdb/ada-lang.c:65:
/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]’:
/opt/gcc-4.8/include/c++/4.8.5/bits/stl_algo.h:2283:70: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<ada_exc_info*, std::vector<ada_exc_info> >]’
/opt/gcc-4.8/include/c++/4.8.5/bits/stl_algo.h:2315:54: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<ada_exc_info*, std::vector<ada_exc_info> >; _Size = long int]’
/opt/gcc-4.8/include/c++/4.8.5/bits/stl_algo.h:5461:36: required from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<ada_exc_info*, std::vector<ada_exc_info> >]’
../../src/gdb/ada-lang.c:13153:61: required from here
/opt/gcc-4.8/include/c++/4.8.5/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]
while (__pivot < *__last)
^
Seems to be a libstdc++ bug meanwhile fixed by:
https://gcc.gnu.org/ml/libstdc++/2012-04/msg00074.
In any case, there's no reason these methods can't be const.
gdb/ChangeLog:
2017-10-02 Tom Tromey <tom@tromey.com>
Pedro Alves <palves@redhat.com>
* ada-lang.h (ada_exc_info::operator<): Make const.
(ada_exc_info::operator==): Make const.
* ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
Make const.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ed5d20c..9bdb6f8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2017-10-02 Tom Tromey <tom@tromey.com> + Pedro Alves <palves@redhat.com> + + * ada-lang.h (ada_exc_info::operator<): Make const. + (ada_exc_info::operator==): Make const. + * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==): + Make const. + 2017-09-29 Tom Tromey <tom@tromey.com> * target.c (read_whatever_is_readable): Change type of "result". |