X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-_Exit.c;h=bc00730460c44afbbefdf9918756aa4d8903bf59;hb=f335f3403011808afd7b7ee72253eb86d7ddd611;hp=ad5675590a37aeba18c68fad1fcab32fe917cf6b;hpb=088612b229d8e01c9c2e6deef5af7d4477fe2ef0;p=gnulib.git diff --git a/tests/test-_Exit.c b/tests/test-_Exit.c index ad5675590..bc0073046 100644 --- a/tests/test-_Exit.c +++ b/tests/test-_Exit.c @@ -1,5 +1,5 @@ /* Test of terminating the current process. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2011 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 @@ -20,8 +20,26 @@ #include +/* 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); }