bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] test-raise: use _Noreturn


From: Bruno Haible
Subject: Re: [PATCH] test-raise: use _Noreturn
Date: Thu, 6 Oct 2011 00:34:01 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Hi,

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).

Can you provide a patch that removes the original warning without
introducing a new one?

Bruno
-- 
In memoriam Annalena Tonelli <http://en.wikipedia.org/wiki/Annalena_Tonelli>



reply via email to

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