Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.lang.c Subject: Re: Turbo C atexit function. Keywords: Turbo C Message-ID: <22420@iuvax.cs.indiana.edu> Date: 21 Jun 89 04:06:52 GMT References: <166@enuxha.eas.asu.edu> Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 18 As Greg Hinton says, the error lies in the test program printed in the manual. `atexit_t' is typedef'ed to mean typedef void (* atexit_t)(void); so instead of returning `atexit_t' the two exit functions should properly be declared as returning nothing: void exit_fn1(void); void exint_fn2(void); When the test program is modified this way it runs fine. As long as you're at it, Doug Gwyn's comment about main()'s return value can also be finessed by declaring it as void main(void) [I don't know if this is legitimate, but it silences the warning messages.]