Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!jade!ucbvax!cbosgd!osu-cis!tut!lvc From: lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) Newsgroups: comp.lang.c Subject: Re: exit(main(argc,argv,env)); Message-ID: <3461@tut.cis.ohio-state.edu> Date: 22 Dec 87 17:16:49 GMT References: <10875@brl-adm.ARPA> <176@fxgrp.UUCP> <1286@laidbak.UUCP> <164@teletron.UUCP> Organization: Ohio State Computer & Info Science Lines: 26 Summary: /*NOTREACHED*/ In article <164@teletron.UUCP>, andrew@teletron.UUCP (Andrew Scott) writes: previous quotation and first two questions deleted > The reason I ask is that it's > always annoyed me that our lint doesn't understand exit() (and similar > functions) and complains that "main() returns random value to invocation > environment" if I don't use return. > > Andrew This has bothered me about lint too. I don't think it will ever be changed by AT&T (but don't quote me on that). To get lint to shut up about this use the /*NOTREACHED*/ comment after the call to exit(n); e.g. main(argc, argv) int argc; char *argv[]; { code for main exit(n); /*NOTREACHED*/ } This will work for similar functions too. I wish I didn't HAVE to do this, but thats how to get around the complaint. -- Larry Cipriani AT&T Network Systems at cbosgd!osu-cis!tut!lvc Ohio State University