This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Add a few noreturn keywords
On 01/11/2012 01:07 AM, Ulrich Drepper wrote:
> Look at the patch I checked in. That should fix the issue but since I
> don't use 4.7 I cannot verify.
Ok, that helped, thanks. But one more change is needed to shut up
2012-01-11 Marek Polacek <email@example.com>
* forward.c: Define return to nothing for __pthread_exit.
--- libc/nptl/forward.c.mp 2012-01-11 13:40:10.740045981 +0100
+++ libc/nptl/forward.c 2012-01-11 14:09:25.736285276 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <firstname.lastname@example.org>, 2002.
@@ -161,8 +161,10 @@ FORWARD (pthread_equal, (pthread_t threa
/* Use an alias to avoid warning, as pthread_exit is declared noreturn. */
+#define return /* value is void */
FORWARD2 (__pthread_exit, void, (void *retval), (retval), exit (EXIT_SUCCESS))
strong_alias (__pthread_exit, pthread_exit);
> I don't know where you see a problem. Run the code through the
> preprocessor and look at all the relevant pieces.
The problem was that gcc emitted suggestion to add the attribute
even though all the prototypes are already marked as noreturn.
I'll look at it later.
> For the ones in installed headers I see a problem with the placement.
> Unless all gcc versions are guaranteed to allow the attribute to be
> added in the same place as _Noreturn is required there will be no
All right, that makes sense. Thanks,