Xref: news2.mv.net comp.os.msdos.djgpp:8357 Newsgroups: comp.os.msdos.djgpp From: biigb AT zeus DOT bris DOT ac DOT uk (I.G.Badcoe) Subject: Re: HELP MEEEEEE!!!! Message-ID: Sender: usenet AT fsa DOT bris DOT ac DOT uk (Usenet) Organization: University of Bristol, England References: <9609041643 DOT aa11427 AT ailin DOT inti DOT edu DOT ar> <322E303A DOT 114 AT cs DOT com> <5bSurDA1X3LyEw+F AT chocolat DOT foobar DOT co DOT uk> Date: Fri, 6 Sep 1996 08:03:45 GMT Lines: 26 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Paul Shirley (Paul AT chocolat DOT foobar DOT co DOT uk) wrote: : A microcontroller is a tiny processor system used in things like remote : controls, toasters and CD players. It may have CPU,ROM,RAM and IO all on : 1 chip. : It almost always runs just 1 program, which exits catastrophically when : the user kills the power... now tell me again, what was the return value : used for? None of which is relevant. The fact is simple, the C-standard **requires** main to be defined as returning int. If you don't do that then the behaviour is undefined (which means that the program would be "within its rights" to reformat the hard disk, or anything else). If there are some situations (like microcontrollers) where you need to define main differently, then __you__are__not__using__ansi__C__ ! You are using some extension to ansi C which has been specifically created for use in that situation. However, I don't believe gcc has any such extension ? Badders