]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix warning regression due to std::string changes [PR106795]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 31 Aug 2022 19:36:23 +0000 (20:36 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 31 Aug 2022 20:09:57 +0000 (21:09 +0100)
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.

gcc/testsuite/g++.dg/tree-ssa/empty-loop.C

index 6b1e879e6a987965623db525f07a5f7e498e9a7e..dca7868f3c96cec3662c1b67ad0c864d725d816e 100644 (file)
@@ -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 <string>
 #include <vector>