Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!rushpc!jjr From: jjr@rushpc (John J. Rushford Jr) Newsgroups: comp.lang.c Subject: exit(); Message-ID: <1991Apr2.153726.3829@rushpc> Date: 2 Apr 91 15:37:26 GMT References: <1991Mar31.6943@segue.segue.com> Organization: My place on the Front Range Lines: 31 In article <1991Mar30.155011.767@rodan.acs.syr.edu> jkchan@lynx.cat.syr.edu (J. K. Chan) writes: > exit value declared inconsistently llib-lc(232) :: t.c(8) In article <1991Mar31.6943@segue.segue.com> jim@segue.segue.com (Jim Balter) writes: > How is exit declared in stdlib.h and in llib-lc on your system? They should > both be declared as returning void. I suspect that your stdlib.h doesn't > declare exit at all, which would explain why the message refers to t.c(8), > which would be an implicit declaration of int exit(); in the absense of > a declaration in stdlib.h. I've always used the following and avoid the lint complaint: #include void exit(); /* exit returns type void */ main() { program_stuff(); exit(1); exit(2); exit(3); exit(etc); } -- J. Rushford ----------- Westminster, Colorado.