libstdc++: Compile PR93978 testcase with -Wall
authorPatrick Palka <ppalka@redhat.com>
Sat, 23 May 2020 19:25:40 +0000 (15:25 -0400)
committerPatrick Palka <ppalka@redhat.com>
Sat, 23 May 2020 19:25:40 +0000 (15:25 -0400)
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.

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/ChangeLog
libstdc++-v3/testsuite/std/ranges/adaptors/93978.cc

index 167cb88..d899c69 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-23  Patrick Palka  <ppalka@redhat.com>
+
+       PR libstdc++/93978
+       * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
+       dg-additional-options.  Avoid unused-but-set-variable warning.
+
 2020-05-23  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/95289
index a0152ec..82b82b0 100644 (file)
@@ -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>
 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;
 }