From: Jonathan Wakely Date: Wed, 31 Aug 2022 19:36:23 +0000 (+0100) Subject: testsuite: Fix warning regression due to std::string changes [PR106795] X-Git-Tag: basepoints/gcc-14~4887 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dbe2801df3010c5549a3ca958194aa77737122d;p=thirdparty%2Fgcc.git testsuite: Fix warning regression due to std::string changes [PR106795] std::string now has [[nodiscard]] attributes on most members, causing -Wunused-result warnings for this test. gcc/testsuite/ChangeLog: PR testsuite/106795 * g++.dg/tree-ssa/empty-loop.C: Use -Wno-unused-result. --- diff --git a/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C b/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C index 6b1e879e6a98..dca7868f3c96 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C +++ b/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-cddce2 -ffinite-loops" } */ +/* { dg-options "-O2 -fdump-tree-cddce2 -ffinite-loops -Wno-unused-result" } */ #include #include