public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR libstdc++/83450 avoid -Wreturn-type warning in test
@ 2017-12-24  9:18 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2017-12-24  9:18 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

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.



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 769 bytes --]

commit 70df8cb9325b7bac794b1135369165d99b7c6828
Author: Jonathan Wakely <jwakely@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-24  9:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-24  9:18 [PATCH] PR libstdc++/83450 avoid -Wreturn-type warning in test Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).