If the libc's declaration of pthread_exit isn't decorated with a
noreturn attribute then the recent changes to enable -Wreturn-type by
default cause this test to warn. Fixed by adding a return statement.

        PR libstdc++/83450
        * testsuite/21_strings/basic_string/pthread18185.cc: Add return
        statement.

Tested powerpc64le-linux, committed to trunk.


commit 70df8cb9325b7bac794b1135369165d99b7c6828
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Sun Dec 24 08:37:07 2017 +0000

    PR libstdc++/83450 avoid -Wreturn-type warning in test
    
            PR libstdc++/83450
            * testsuite/21_strings/basic_string/pthread18185.cc: Add return
            statement.

diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc 
b/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc
index fb3d43de528..b6649178a0a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc
@@ -38,6 +38,7 @@ foo (void*)
     {
       pthread_exit (0);
     }
+  return 0; // See libstdc++/83450
 }
 
 // c++/18185

Reply via email to