[Top][All Lists]

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

Re: [PATCH] test-raise: use _Noreturn

From: Eric Blake
Subject: Re: [PATCH] test-raise: use _Noreturn
Date: Wed, 05 Oct 2011 16:46:30 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110906 Fedora/3.1.14-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.4 Thunderbird/3.1.14

On 10/05/2011 04:34 PM, Bruno Haible wrote:

Bernhard Voelker wrote:
diff --git a/tests/test-raise.c b/tests/test-raise.c
index 38c2353..6129f9a 100644
--- a/tests/test-raise.c
+++ b/tests/test-raise.c
@@ -25,7 +25,7 @@ SIGNATURE_CHECK (raise, int, (int));

   #include "macros.h"

-static void
+static _Noreturn void
   handler (int sig)
     exit (0);

While this patch removes a gcc warning of type
"function might be possible candidate for attribute 'noreturn'"
on some platform, it introduces a gcc warning of type
"'noreturn' function does return" on other platforms (namely
on those where<stdlib.h>  does not declare exit() as a non-
returning function).

Shouldn't that imply that gnulib's <stdlib.h> replacement should be taught to guarantee that exit() is declared noreturn even if the system's header is missing that information?

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

reply via email to

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