PR libstdc++/91711 fix failing test
diff mbox series

Message ID 20190910072636.GA24847@redhat.com
State New
Headers show
Series
  • PR libstdc++/91711 fix failing test
Related show

Commit Message

Jonathan Wakely Sept. 10, 2019, 7:26 a.m. UTC
PR libstdc++/91711
	* testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
	0ul being a valid null pointer constant.

Tested x86-linux, committed to trunk.
commit 7c30df0f9caea5ad48484bc72a984c09fc6513fa
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Sep 9 22:31:26 2019 +0100

    PR libstdc++/91711 fix failing test
    
            PR libstdc++/91711
            * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
            0ul being a valid null pointer constant.

Patch
diff mbox series

diff --git a/libstdc++-v3/testsuite/23_containers/span/get_neg.cc b/libstdc++-v3/testsuite/23_containers/span/get_neg.cc
index 37d188ed073..cd54716b105 100644
--- a/libstdc++-v3/testsuite/23_containers/span/get_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/span/get_neg.cc
@@ -24,7 +24,7 @@ 
 int
 main()
 {
-  std::span<int, std::dynamic_extent> myspan((int*)nullptr, 0ul);
+  std::span<int, std::dynamic_extent> myspan((int*)nullptr, (std::size_t)0);
   std::get<0>(myspan); // { dg-error "here" }
 }
 // { dg-error "static assertion failed" "" { target *-*-* } 0 }