From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: compiler doesn't catch missing semicolon after struct Date: 11 Oct 2001 11:28:51 GMT Organization: Aachen University of Technology (RWTH) Lines: 28 Message-ID: <9q3vpj$k2e$1@nets3.rz.RWTH-Aachen.DE> References: <3BC35FB1 DOT FF1958C AT earthlink DOT net> <1hu8stke235jh08aogbbc44rojtm115j23 AT 4ax DOT com> <9q1vdo$34r$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1002799731 20558 137.226.32.75 (11 Oct 2001 11:28:51 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 11 Oct 2001 11:28:51 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Radical wrote: > Just what the HE** other choices would you want for > main other than "int" or "void" ?????? You don't want void, either. Not in any portable program, that is. "void main" is an extremely bad habit introduced by extremely lazy programmers, and by irresponsible authors writing books for those lazy guys. No standard definition of C (on 'real' computers, i.e. what the standard calls a "hosted environment") allows void main. > Why/How make it more complicated? For what reason > is there to say if it is NOT explicitly given, its an "int", main() is not special in this regard. Any function in old-fashioned K&R C was assumed to return int if your source didn't say otherwise. ANSI C grudgingly allowed this, too, as a compromise to allow existing sources still to be compiled. But it's icky enough that during C99 standardization, the committee finally ruled it out as no longer allowed. It's only after serious consideration that such a standardization committee ever kill existing source code like that, so this is quite a strong verdict, actually. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.