This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/4] Fix undefined behaviour in libstdc++ testsuite


This one just fixes some missing returns, where the functions should
have been declared to return void anyway.

   Fix missing returns in libstdc++ testsuite
* testsuite/24_iterators/container_access.cc: Fix missing returns.
   	* testsuite/24_iterators/range_access_cpp14.cc: Likewise.

Tested powerpc64-linux, committed to trunk.
commit 485fa6438286f25d3e1b66e7280d2c5105628416
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Jul 21 19:38:44 2016 +0000

    Fix missing returns in libstdc++ testsuite
    
    	* testsuite/24_iterators/container_access.cc: Fix missing returns.
    	* testsuite/24_iterators/range_access_cpp14.cc: Likewise.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238608 138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/libstdc++-v3/testsuite/24_iterators/container_access.cc b/libstdc++-v3/testsuite/24_iterators/container_access.cc
index a9cb54e..f4d4f7e 100644
--- a/libstdc++-v3/testsuite/24_iterators/container_access.cc
+++ b/libstdc++-v3/testsuite/24_iterators/container_access.cc
@@ -47,7 +47,7 @@ test02()
   static_assert(!e);
 }
 
-int
+void
 test03()
 {
   std::initializer_list<int> il{1,2,3};
@@ -67,7 +67,7 @@ test03()
 
 }
 
-int
+void
 test04()
 {
   std::vector<int> v{1,2,3};
diff --git a/libstdc++-v3/testsuite/24_iterators/range_access_cpp14.cc b/libstdc++-v3/testsuite/24_iterators/range_access_cpp14.cc
index 9292fa6..79fb0f4b 100644
--- a/libstdc++-v3/testsuite/24_iterators/range_access_cpp14.cc
+++ b/libstdc++-v3/testsuite/24_iterators/range_access_cpp14.cc
@@ -48,7 +48,7 @@ test02()
   constexpr auto ce __attribute__((unused)) = std::cend(i);
 }
 
-int
+void
 test03()
 {
   std::initializer_list<int> il{1};
@@ -60,7 +60,7 @@ test03()
   VERIFY(std::crend(il) == std::reverse_iterator<const int*>(il.begin()));
 }
 
-int
+void
 test04()
 {
   std::vector<int> v{1};

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]