Now that the frontend issue PR c++/94038 is thoroughly fixed, the testcase for PR93978 no longer fails to compile with -O -Wall, so add -Wall to the testcase's compile flags to help ensure we don't regress here.
Committed as obvious after testing on x86_64-pc-linux-gnu. libstdc++-v3/ChangeLog: PR libstdc++/93978 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to dg-additional-options. Avoid unused-but-set-variable warning. --- libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc index a0152ec0532..82b82b0a5be 100644 --- a/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc +++ b/libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc @@ -16,7 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } -// { dg-additional-options "-O" } +// { dg-additional-options "-O -Wall" } // { dg-do compile { target c++2a } } #include <ranges> @@ -25,11 +25,12 @@ namespace ranges = std::ranges; namespace views = std::views; -void +auto test() { std::vector<std::string> x = {""}; auto i = std::counted_iterator(x.begin(), 1); auto r = ranges::subrange{i, std::default_sentinel}; auto v = r | views::join; + return v; } -- 2.27.0.rc1.5.gae92ac8ae3