]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix up pr104601.C for recent libstdc++ changes
authorJakub Jelinek <jakub@redhat.com>
Fri, 15 Mar 2024 09:01:41 +0000 (10:01 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 15 Mar 2024 09:01:41 +0000 (10:01 +0100)
r14-9478 added [[nodiscard]] to various <algorithm> APIs including find_if
the pr104601.C testcase uses.  As it is an optimization bug fix testcase,
haven't tried to adjust the testcase to use the find_if result, but instead
have added -Wno-unused-result flag to quiet the warning.

2024-03-15  Jakub Jelinek  <jakub@redhat.com>

* g++.dg/torture/pr104601.C: Add -Wno-unused-result to dg-options.

gcc/testsuite/g++.dg/torture/pr104601.C

index 92ad73d47e92dc50ff0007fb43258af135f5d87a..c8d4661e86d4875675cc35d21975a3d6035c4b88 100644 (file)
@@ -1,6 +1,6 @@
 // PR tree-optimization/104601
 // { dg-do run }
-// { dg-options "-std=c++17" }
+// { dg-options "-std=c++17 -Wno-unused-result" }
 
 #include <algorithm>
 #include <optional>