From: Richard Dawe Newsgroups: comp.os.msdos.djgpp Subject: Re: Strange behavior of compiler. Date: Tue, 26 Jun 2001 21:29:31 +0100 Lines: 19 Message-ID: <3B38F0AB.655B722@phekda.freeserve.co.uk> References: <3b37e5df DOT 287898614 AT news DOT primus DOT ca> NNTP-Posting-Host: modem-62.desitin.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news8.svr.pol.co.uk 993586894 19694 62.136.89.62 (26 Jun 2001 20:21:34 GMT) NNTP-Posting-Date: 26 Jun 2001 20:21:34 GMT X-Complaints-To: abuse AT theplanet DOT net X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello. Graaagh the Mighty wrote: > Incidentally, one persistent annoyance has been the compiler failing > to bomb if a return is omitted along some execution path in a function > that's declared as returning a value. This obviously should be an > error if the compiler can prove that the function can in fact fail to > return a valid value for some inputs, and a warning in every other > case. Which version of gcc are you using (use: gcc -v)? Maybe if you upgrade to a later version (e.g. 2.95.3 or 3.0), it will generate the warning you want? Bye, -- Richard Dawe http://www.phekda.freeserve.co.uk/richdawe/