Path: utzoo!attcan!uunet!husc6!cmcl2!rutgers!tut.cis.ohio-state.edu!osu-cis!att!ihlpb!nevin1 From: nevin1@ihlpb.ATT.COM (Liber) Newsgroups: comp.lang.c Subject: Re: Strange lint mumblings Message-ID: <9280@ihlpb.ATT.COM> Date: 28 Dec 88 00:35:14 GMT References: <416@marob.MASA.COM> <11467@dartvax.Dartmouth.EDU> <179@amsdsg.UUCP> <11274@haddock.ima.isc.com> Reply-To: nevin1@ihlpb.UUCP (55528-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 12 In article <11274@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >(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. It is only logically correct when exit() is "reachable" from all possible executions of main(). It may not be logically correct if someone recursively calls main() and expects a return value. What value main() returns and if main() calls some funky function so that it never returns are two different issues. -- NEVIN ":-)" LIBER AT&T Bell Laboratories nevin1@ihlpb.ATT.COM (312) 979-4751