/* Test raising a signal.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#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 <stdlib.h> does not have the 'noreturn' attribute. */
+static _Noreturn void
handler (int sig)
{
exit (0);
{
/* Test behaviour for invalid argument. */
ASSERT (raise (-1) != 0);
- ASSERT (raise (99) != 0);
/* Test behaviour for SIGINT. */
ASSERT (signal (SIGINT, handler) != SIG_ERR);