summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/experimental/filesystem
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-11-19 18:13:10 +0000
committerJonathan Wakely <jwakely@redhat.com>2021-11-19 18:15:52 +0000
commitb8f2efaed02e8b03d215d74e42d3707761772f64 (patch)
tree51add8bb89c8a7c52a97e6914b6bffb9f2c38669 /libstdc++-v3/testsuite/experimental/filesystem
parent2d76292bd6719d687bc77051da265df8ed7f5a61 (diff)
libstdc++: Suppress -Wstringop warnings [PR103332]
libstdc++-v3/ChangeLog: PR libstdc++/103332 PR libstdc++/102958 * testsuite/21_strings/basic_string/capacity/char/1.cc: Add -Wno-stringop-overflow. * testsuite/21_strings/basic_string/operators/char/1.cc: Likewise. * testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc: Add -Wno-stringop-overread.
Diffstat (limited to 'libstdc++-v3/testsuite/experimental/filesystem')
-rw-r--r--libstdc++-v3/testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc
index 26b04cd1cf1..985a5f8fbc1 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-lstdc++fs -fchar8_t" }
+// { dg-options "-lstdc++fs -fchar8_t -Wno-stringop-overread" }
// { dg-do run { target c++11 } }
// { dg-require-filesystem-ts "" }
@@ -36,10 +36,12 @@ test01()
p = fs::u8path(u8"\xf0\x9d\x84\x9e");
VERIFY( p.u8string() == u8"\U0001D11E" );
+ // The following triggers -Wstringop-overread. See PR 103332.
std::u8string s1 = u8"filename2";
p = fs::u8path(s1);
VERIFY( p.u8string() == u8"filename2" );
+ // The following triggers -Wstringop-overread. See PR 103332.
std::u8string s2 = u8"filename3";
p = fs::u8path(s2.begin(), s2.end());
VERIFY( p.u8string() == u8"filename3" );