[FYI] Fix the gdb build with GCC 7

Message ID 20191213182821.18522-1-tromey@adacore.com
State New, archived
Headers

Commit Message

Tom Tromey Dec. 13, 2019, 6:28 p.m. UTC
  The Solaris buildbot builder complained about some recent patches of
mine.  Building with GCC 7 failed.

This patch fixes the bug.  I'm checking it in.

gdb/ChangeLog
2019-12-13  Tom Tromey  <tromey@adacore.com>

	* gdbsupport/safe-iterator.h (class basic_safe_range) <begin,
	end>: No longer "const".

Change-Id: I5f428fab61087f467ac3b6475f4ef4dbd314fcb0
---
 gdb/ChangeLog                  | 5 +++++
 gdb/gdbsupport/safe-iterator.h | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gdb/gdbsupport/safe-iterator.h b/gdb/gdbsupport/safe-iterator.h
index 1a98b426ab2..61af92a3aaf 100644
--- a/gdb/gdbsupport/safe-iterator.h
+++ b/gdb/gdbsupport/safe-iterator.h
@@ -117,12 +117,12 @@  public:
   {
   }
 
-  iterator begin () const
+  iterator begin ()
   {
     return iterator (m_range.begin (), m_range.end ());
   }
 
-  iterator end () const
+  iterator end ()
   {
     return iterator (m_range.end (), m_range.end ());
   }