[PATCH] Add a few noreturn keywords
Marek Polacek
polacek@redhat.com
Sun Jan 8 18:32:00 GMT 2012
As trunk GCC suggests, we might mark some more functions as `noreturn'.
ChangeLog:
2012-01-08 Marek Polacek <polacek@redhat.com>
* setjmp/longjmp.c (__libc_siglongjmp): Add noreturn attribute.
* locale/programs/locarchive.c (show_archive_content): Likewise.
nptl/ChangeLog:
2012-01-08 Marek Polacek <polacek@redhat.com>
* pthread_exit.c (__pthread_exit): Add noreturn attribute.
--- libc/setjmp/longjmp.c.mp 2011-12-31 15:04:50.726665438 +0100
+++ libc/setjmp/longjmp.c 2011-12-31 15:25:11.574513848 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,97,98,2000,2002,2009
+/* Copyright (C) 1991,92,94,95,97,98,2000,2002,2009,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -26,6 +26,7 @@
to the position specified in ENV, causing the setjmp
call there to return VAL, or 1 if VAL is 0. */
void
+__attribute__ ((noreturn))
__libc_siglongjmp (sigjmp_buf env, int val)
{
/* Perform any cleanups needed by the frames being unwound. */
--- libc/locale/programs/locarchive.c.mp 2011-12-31 15:07:56.730514268 +0100
+++ libc/locale/programs/locarchive.c 2011-12-31 15:24:56.406638700 +0100
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002,2003,2005,2007,2009,2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2005,2007,2009,2011,2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -1546,6 +1547,7 @@ dataentcmp (const void *a, const void *b
void
+__attribute__ ((noreturn))
show_archive_content (int verbose)
{
struct locarhandle ah;
--- libc/nptl/pthread_exit.c.mp 2011-12-31 15:02:05.463636828 +0100
+++ libc/nptl/pthread_exit.c 2011-12-31 15:24:16.990513262 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -22,6 +22,7 @@
void
+__attribute__ ((noreturn))
__pthread_exit (value)
void *value;
{
Marek
More information about the Libc-alpha
mailing list