functions that don't return
Pedz Thing
pedz at bobkat.UUCP
Sat Oct 4 01:50:59 AEST 1986
In article <1216 at bunker.UUCP> garys at bunker.UUCP (Gary M. Samuelson) writes:
>In article <86900070 at haddock> karl at haddock writes:
>>There are three possible models for the crt0/main interface: main() could be
>>int ("exit(main())"), void ("main(); exit(0)"), or dead ("main(); HALT").
I think it should be the second choice, main(); exit(0);. The reason
is two fold. First, unless a program specifically bombs off, it
should exit with a happy status. Falling off the bottom of main I
would not consider to be doing anything specific yet the return (and
exit) value will be random. Second, with a random exit status, it
makes the program much less usefull. Make(1) will sometimes work and
sometimes fail, etc.
--
Perry Smith
ctvax ---\
megamax --- bobkat!pedz
pollux---/
More information about the Comp.lang.c
mailing list