Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!twinsun!eggert From: eggert@twinsun.com (Paul Eggert) Newsgroups: comp.std.c Subject: Re: Must main return a value? Message-ID: <1991Jun28.180636.19856@twinsun.com> Date: 28 Jun 91 18:06:36 GMT References: <7830001@hpwrce.HP.COM> <1991Jun28.043342.27540@ptcburp.ptcbu.oz.au> <787@taumet.com> Sender: usenet@twinsun.com Organization: Twin Sun, Inc Lines: 14 Nntp-Posting-Host: ata steve@taumet.com (Stephen Clamage) writes: >michi@ptcburp.ptcbu.oz.au (Michael Henning) writes: >>So it pays to write >>int main(void) { exit(0); } >Except that EXIT_SUCCESS need not have the value 0. This might be >wrong in an ANSI environment. But section 4.10.4.3 says that exit(0) and exit(EXIT_SUCCESS) have the same effect even if EXIT_SUCCESS!=0. Anyway, Posix 1003.1-1990 (section 8.1) says that EXIT_SUCCESS==0, so hosts where EXIT_SUCCESS!=0 are an endangered species.