From 2b715de1945b2f8540ee945148e64232fe573be1 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Fri, 7 Oct 2011 11:37:31 +0200 Subject: [PATCH] raise tests: Avoid a GCC warning. * tests/test-raise.c (handler): Use _Noreturn. --- ChangeLog | 5 +++++ tests/test-raise.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e21b9efad..e3ef62de8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-07 Bernhard Voelker + + raise tests: Avoid a GCC warning. + * tests/test-raise.c (handler): Use _Noreturn. + 2011-10-07 Bruno Haible Tests for module 'ldexpf'. diff --git a/tests/test-raise.c b/tests/test-raise.c index 38c23538a..85d076e98 100644 --- a/tests/test-raise.c +++ b/tests/test-raise.c @@ -25,7 +25,10 @@ SIGNATURE_CHECK (raise, int, (int)); #include "macros.h" -static void +/* It is safe to use _Noreturn here: exit() never returns, and GCC knows that + exit() is a non-returning function, even on platforms where its declaration + in does not have the 'noreturn' attribute. */ +static _Noreturn void handler (int sig) { exit (0); -- 2.11.0