Path: utzoo!attcan!uunet!husc6!bu-cs!mirror!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Strange lint mumblings Message-ID: <11274@haddock.ima.isc.com> Date: 22 Dec 88 21:33:54 GMT References: <416@marob.MASA.COM> <11467@dartvax.Dartmouth.EDU> <179@amsdsg.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 11 In article <179@amsdsg.UUCP> jeff@amsdsg.UUCP (Jeff Barr) writes: >> >(137) warning: main() returns random value to invocation environment >How about: > void main () { ... exit (0); } (a) It doesn't work, at least on the machine I tried. (b) According to the dpANS, the type of `main' must be either `int(void)' or `int(int, char **)'. A `void' declaration, although logically correct, cannot be used in a strictly conforming program. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint