gcc/libstdc++-v3/ChangeLog

98 lines
3.9 KiB
Plaintext
Raw Normal View History

2019-01-04 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/list/61347.cc: Avoid spurious failure when
-fno-inline added to test flags.
* testsuite/21_strings/basic_string/requirements/
explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
* testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
assertion failures with old std::string ABI.
Fix bugs in filesystem::path::lexically_normal() Using path::_List::erase(const_iterator) to remove a non-final component in path::lexically_normal() is a bug, because it leaves the following component with an incorrect _M_pos value. Instead of providing erase members that allow removing components from the middle, replace them with pop_back() and _M_erase_from(const_iterator) which only allow removing elements at the end. Most uses of erase are unaffected, because they only remove elements from the end anyway. The one use of erasure from the middle in lexically_normal() is replaced by calls to pop_back() and/or clearing the last component to leave it as an empty final filename. Also replace the "???" comment in lexically_normal() to document when that branch is taken. * include/bits/fs_path.h (path::_List::erase): Replace both overloads with ... (path::pop_back(), path::_M_erase_from(const_iterator)): New member functions that will only erase elements at the end. * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define. (path::_List::_Impl::_M_erase_from(const_iterator)): Define. (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead of erase(p, end()). (path::_List::pop_back()): Define. (path::_List::_M_erase_from(const_iterator)): Define. (path::operator/=(const path&)): Use pop_back to remove last component and _M_erase_from to remove multiple components. (path::_M_append(basic_string_view<value_type>)): Likewise. (path::operator+=(const path&)): Likewise. (path::_M_concat(basic_string_view<value_type>)): Likewise. (path::remove_filename()): Likewise. (path::lexically_normal()): Use _List::_Impl iterators instead of path::iterator. Use pop_back to remove components from the end. Clear trailing filename, instead of using erase(const_iterator) to remove a non-final component. * testsuite/27_io/filesystem/path/generation/normal.cc: Test additional cases. * testsuite/27_io/filesystem/path/generation/normal2.cc: New test. From-SVN: r267576
2019-01-04 15:03:59 +01:00
* include/bits/fs_path.h (path::_List::erase): Replace both overloads
with ...
(path::pop_back(), path::_M_erase_from(const_iterator)): New member
functions that will only erase elements at the end.
* src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
(path::_List::_Impl::_M_erase_from(const_iterator)): Define.
(path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
of erase(p, end()).
(path::_List::pop_back()): Define.
(path::_List::_M_erase_from(const_iterator)): Define.
(path::operator/=(const path&)): Use pop_back to remove last component
and _M_erase_from to remove multiple components.
(path::_M_append(basic_string_view<value_type>)): Likewise.
(path::operator+=(const path&)): Likewise.
(path::_M_concat(basic_string_view<value_type>)): Likewise.
(path::remove_filename()): Likewise.
(path::lexically_normal()): Use _List::_Impl iterators instead of
path::iterator. Use pop_back to remove components from the end. Clear
trailing filename, instead of using erase(const_iterator) to remove
a non-final component.
* testsuite/27_io/filesystem/path/generation/normal.cc: Test
additional cases.
* testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
* src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
incorrect treatment of empty filename after trailing slash.
* testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
* testsuite/21_strings/basic_string/modifiers/assign/char/
move_assign_optim.cc: Avoid spurious failure when -fno-inline added
to test flags.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
move_assign_optim.cc: Likewise.
2019-01-03 Jonathan Wakely <jwakely@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR libstdc++/88607
* include/experimental/memory: Replace UTF-8 quote characters.
* include/std/future: Replace UTF-8 "em dash" characters.
2019-01-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/88607
* include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
* include/debug/forward_list: Likewise.
* include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
character.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
* include/parallel/multiseq_selection.h: Likewise.
PR libstdc++/88681
* config/abi/pre/gnu.ver: Add missing exports.
* testsuite/22_locale/collate_byname/88681.cc: New test.
* testsuite/22_locale/time_get/get/char/88681.cc: New test.
* testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
2019-01-02 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/map/cons/deduction.cc: Test deduction from
initializer_list<value_type> and from input iterator ranges.
* testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
* testsuite/experimental/string_view/element_access/char/empty.cc:
Fix year range in copyright header.
2019-01-02 Joel Brobecker <brobecker@adacore.com>
* testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
Fix year range in copyright header.
2019-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
Copyright (C) 2019 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.