https://gcc.gnu.org/g:8ae7062bf4005c08b093828d40e2c9278e6f6d9c

commit r14-9491-g8ae7062bf4005c08b093828d40e2c9278e6f6d9c
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Mar 15 10:01:41 2024 +0100

    testsuite: Fix up pr104601.C for recent libstdc++ changes
    
    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  <ja...@redhat.com>
    
            * g++.dg/torture/pr104601.C: Add -Wno-unused-result to dg-options.

Diff:
---
 gcc/testsuite/g++.dg/torture/pr104601.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/torture/pr104601.C 
b/gcc/testsuite/g++.dg/torture/pr104601.C
index 92ad73d47e9..c8d4661e86d 100644
--- a/gcc/testsuite/g++.dg/torture/pr104601.C
+++ b/gcc/testsuite/g++.dg/torture/pr104601.C
@@ -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>

Reply via email to