Path: utzoo!yunexus!ists!stpl!bbm!darcy From: darcy@bbm.UUCP (D'Arcy Cain) Newsgroups: comp.lang.c Subject: Re: (* func)(fred, bert) Message-ID: <812@bbm.UUCP> Date: 13 Nov 89 04:28:33 GMT Article-I.D.: bbm.812 References: <2387@stl.stc.co.uk> <744@lakart.UUCP> <0175@sheol.UUCP> Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain) Organization: BBM Bureau of Measurement, Toronto Lines: 19 In article <0175@sheol.UUCP> throopw@sheol.UUCP (Wayne Throop) writes: >> dg@lakart.UUCP (David Goodenough) >>> VOID main() >> void main() > >I is well worth mentioning (again) that it is NOT a good idea >to lie to your compiler in this way. The main routine of a C >program is NOT void. It returns an int. >-- So what? If you exit your program through some cleanup routine (perhaps from a signal trap as well) then returning a value from main is an error in the context of your program. I use the GNU compiler with all the warning levels turned on and declaring main an int would cause a warning in just about every program I have written since they don't return a value. I don't think it is "lying" to your compiler to do this. It is simply declaring your exact intention of what you plan to do in main. D'Arcy J.M. Cain (darcy@{bbm,druid})