On 07/11/11 21:58, Paul Eggert wrote: > Since the stdnoreturn > module no longer seems useful, the following patch removes it as well.
However, it does seem useful to retain the test for _Noreturn *somewhere*. _Exit-tests is as good a place as any: modules/_Exit-tests: test _Noreturn too * tests/test-_Exit.c (MTA, Charlie): New functions, taken from the old tests/test-stdnoreturn.c. This tests the _Noreturn keyword a bit. (main): Use them. diff --git a/tests/test-_Exit.c b/tests/test-_Exit.c index 7502153..bc00730 100644 --- a/tests/test-_Exit.c +++ b/tests/test-_Exit.c @@ -20,8 +20,26 @@ #include <stdlib.h> +/* But did he ever return? No he never returned, + And his fate is still unlearned ... */ +static _Noreturn void MTA (int); + +static _Noreturn void +Charlie (int n) +{ + MTA (n - 1); +} + +static void +MTA (int n) +{ + if (n < 0) + _Exit (81); + Charlie (n - 1); +} + int -main () +main (int argc, char **argv) { - _Exit (81); + MTA (argc + !!argv); }