Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!brazeau.ucs.ualberta.ca!unixg.ubc.ca!ubc-cs!van-bc!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!yale.edu!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Must main return a value? Message-ID: <16575@smoke.brl.mil> Date: 28 Jun 91 19:34:01 GMT References: <7830001@hpwrce.HP.COM> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9 In article <7830001@hpwrce.HP.COM> walterm@hpwrce.HP.COM (Walter Murray) writes: >Many people have written that the main function must return a value. >I can't find such a requirement in the Standard. I have read 2.1.2.2.3 >and 3.6.6.4. Am I missing something? You must be -- 2.1.2.2.3 states explicitly "If the main function executes a return that specifies no value, the termination status returned to the host environment is undefined." That meets the condition for causing undefined behavior on at least two counts.