This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Use '::iterator' instead of '::const_iterator' on environ.c (and fix breakage on early versions of libstdc++)
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 20 Jun 2017 10:08:10 -0400
- Subject: [binutils-gdb] Use '::iterator' instead of '::const_iterator' on environ.c (and fix breakage on early versions of libstdc++)
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 96160d605128658378af73bb62732d1cbfa73d8a ***
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Branch: master
Commit: 96160d605128658378af73bb62732d1cbfa73d8a
Use '::iterator' instead of '::const_iterator' on environ.c (and fix breakage on early versions of libstdc++)
Even though C++11 supports modifying containers using a const_iterator
(e.g., calling the 'erase' method of a std::vector), early versions of
libstdc++ did not implement that. Some of our buildslaves are using
these versions (e.g., the AArch64 buildslave uses gcc 4.8.8), and my
previous commit causes a breakage on them. The solution is simple:
just use a normal iterator, without const.
gdb/ChangeLog:
2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
* common/environ.c (gdb_environ::unset): Use '::iterator' instead
of '::const_iterator'.