Mail Archives: djgpp/1997/05/22/16:38:08
Paul Derbyshire wrote:
>
> or if it has no return statement (such as return 0). This is actually
> irritating sometimes when I have actually designed it so that main calls a
> function like cleanup() that has an exit in it. :)
Then you have to tell gcc, that your 'cleanup()' does not return:
static void __attribute__ ((noreturn))
cleanup()
{
exit(0);
}
int main()
{
cleanup();
}
Robert
--
*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post: Am Berg 3, D-09573 Dittmannsdorf *
* e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE *
* WWW: http://www.tu-chemnitz.de/~rho *
*****************************************************************
- Raw text -