Turbo C atexit function.

RAMontante bobmon at iuvax.cs.indiana.edu
Wed Jun 21 14:06:52 AEST 1989


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.]



More information about the Comp.lang.c mailing list