bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 09/19] c-stack: use _Noreturn


From: Paul Eggert
Subject: [PATCH 09/19] c-stack: use _Noreturn
Date: Sun, 10 Jul 2011 22:24:06 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10

* lib/c-stack.c (die, overflow_handler, segv_handler):
Use _Noreturn rather than __attribute__((noreturn)).
---
 ChangeLog     |    4 ++++
 lib/c-stack.c |   10 +++-------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b1fb51b..83677cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-07-10  Paul Eggert  <address@hidden>
 
+       c-stack: use _Noreturn
+       * lib/c-stack.c (die, overflow_handler, segv_handler):
+       Use _Noreturn rather than __attribute__((noreturn)).
+
        argmatch-tests, exclude_tests: use _Noreturn
        * tests/test-argmatch.c, tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN):
        Remove.
diff --git a/lib/c-stack.c b/lib/c-stack.c
index e48b97c..2f902af 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -104,8 +104,7 @@ static char const * volatile stack_overflow_message;
    appears to have been a stack overflow, or with a core dump
    otherwise.  This function is async-signal-safe.  */
 
-static void die (int) __attribute__ ((noreturn));
-static void
+static _Noreturn void
 die (int signo)
 {
   char const *message;
@@ -182,9 +181,7 @@ static int segv_handler (void *address __attribute__ 
((unused)),
 /* Handle a segmentation violation that is likely to be a stack
    overflow and exit.  This function is async-signal-safe.  */
 
-static void overflow_handler (int, stackoverflow_context_t)
-  __attribute__ ((noreturn));
-static void
+static _Noreturn void
 overflow_handler (int emergency,
                   stackoverflow_context_t context __attribute__ ((unused)))
 {
@@ -228,8 +225,7 @@ c_stack_action (void (*action) (int))
 /* Handle a segmentation violation and exit.  This function is
    async-signal-safe.  */
 
-static void segv_handler (int, siginfo_t *, void *) __attribute__((noreturn));
-static void
+static _Noreturn void
 segv_handler (int signo, siginfo_t *info,
               void *context __attribute__ ((unused)))
 {
-- 
1.7.4.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]