]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/71044 fix off-by-one errors introduced recently
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Dec 2018 22:43:31 +0000 (22:43 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Dec 2018 22:43:31 +0000 (22:43 +0000)
commitd4662699e76ca973da88172e1478c95fcab01b1a
treebf98a4da1248df78980803fb1ae136e3eba5ba14
parentc601c9884b8c2eaf87a912504aaa08101592933c
PR libstdc++/71044 fix off-by-one errors introduced recently

The recent changes to append/concat directly from strings (without
constructing paths) introduced regressions where one of the components
could be omitted from the iteration sequence in the result.

PR libstdc++/71044
* src/filesystem/std-path.cc (path::_M_append): Fix off-by-one error
that caused a component to be lost from the iteration sequence.
(path::_M_concat): Likewise.
* testsuite/27_io/filesystem/path/append/source.cc: Test appending
long strings.
* testsuite/27_io/filesystem/path/concat/strings.cc: Test
concatenating long strings.
* testsuite/27_io/filesystem/path/construct/string_view.cc: Test
construction from long string.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267222 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/src/filesystem/std-path.cc
libstdc++-v3/testsuite/27_io/filesystem/path/append/source.cc
libstdc++-v3/testsuite/27_io/filesystem/path/concat/strings.cc
libstdc++-v3/testsuite/27_io/filesystem/path/construct/string_view.cc