Eric Blake wrote: > Shouldn't that imply that gnulib's <stdlib.h> replacement should be > taught to guarantee that exit() is declared noreturn even if the > system's header is missing that information?
Yes, this would be a good idea. > Or, avoiding a change to gnulib's <stdlib.h>, why not use this? > > static _Noreturn void > handler (int sig) > { > while (1) > exit (0); > } > > That is, the while(1) construct should be sufficient for gcc to detect > an infloop condition which is another way to satisfy handler's noreturn > marking, even if exit() itself was not marked noreturn. Yes, this should work too. But it smells the hack, therefore I would prefer your first idea. Bruno -- In memoriam Annalena Tonelli <http://en.wikipedia.org/wiki/Annalena_Tonelli>