From: "Bart van den Burg" Newsgroups: comp.os.msdos.djgpp Subject: Re: `return' with no value, in function returning non-void (was Re: Clearing screens) Date: Thu, 18 Oct 2001 19:06:36 +0200 Organization: XO Communications B.V. Lines: 52 Message-ID: <9qn229$glu$1@cyan.nl.gxn.net> References: <16a9b8d3 DOT 0110180325 DOT 4f2ff5e AT posting DOT google DOT com> <9qmfe4$iqt$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <9qmuod$fu2$1 AT cyan DOT nl DOT gxn DOT net> NNTP-Posting-Host: asd-tel-ap02-d09-028.dial.freesurf.nl X-Trace: cyan.nl.gxn.net 1003424649 17086 62.100.22.28 (18 Oct 2001 17:04:09 GMT) X-Complaints-To: abuse AT freesurf DOT nl NNTP-Posting-Date: 18 Oct 2001 17:04:09 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com by the way the function returns a number larger than in integer can be: ----------------------------------------- #include int someFunction() { cout << "hi" << endl; } void main() { cout << someFunction(); } ========================================= C:\djgpp>test hi 120064 ----------------------------------------- Bart "A. Sinan Unur" wrote in message news:Xns913E7D7DCC53AASINANUNUR AT 132 DOT 236 DOT 56 DOT 8... > "Bart van den Burg" wrote in > news:9qmuod$fu2$1 AT cyan DOT nl DOT gxn DOT net: > > > is it a DJGPP WIN2k bug that an int function doesn't have to return > > anything? > > Change the subject line when you change the topic of a thread. > > Now, I am not sure what you mean. If you do the following: > > /* i.c */ > int blah(void) > { > return; > } > > C:\var>gcc -c i.c -Wall > i.c: In function `blah': > i.c:3: warning: `return' with no value, in function returning non-void > > do you not get a warning under W2K? > > Sinan. > -- > -------------------------------- > A. Sinan Unur > http://www.unur.com/