From: Robert Hoehne Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie question (error that needs cc1plus.exe file) Date: Thu, 22 May 1997 12:50:28 +0200 Organization: TU Chemnitz-Zwickau Lines: 27 Message-ID: <338424F4.16C75C15@Mathematik.tu-chemnitz.de> References: <97May21.104845gmt+0100 DOT 16661 AT internet01 DOT amc DOT de> <5m0hjp$ln5 AT freenet-news DOT carleton DOT ca> NNTP-Posting-Host: pandora.hrz.tu-chemnitz.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 * *****************************************************************