main() linkage

Dr. T. Andrews tanner at cdis-1.uucp
Tue Nov 28 01:19:35 AEST 1989


In article <11665 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
) Your citing of "established practice" is merely citing of existing
) ERRONEOUS programming practice,
It is interesting to hear that the practice of declaring as "void"
a function which does not return a value is erroneous.

) Again, I explained the EXISTING, OPERATIONAL issues that make such
) practice erroneous,
No, you merely stated that you disapproved of the practice.  This
differs from saying what the problems might be, and why this practice
didn't receive blessing from X3J11.

I note that "main" has been granted special treatment in its
arguments: you may have "main(void)" as an alternative to the
usual arguments.  The lack of treatment for the case where
the program exits via exit() is therefore especially deserving
of attention.

) Too bad you didn't pay attention to the explanations and instead
) merely kept making silly noises.
It is, rather, too bad that you did not see fit to post anything
other than puffery and smoke on the issue.  I had foolishly expected
better of you.

Yes, other people have posted hypothetical but not unreasonable
examples where it would be more difficult to handle such cases.
In no case is it impossible to handle a void "main" which doesn't
return.
-- 
Mulroney: "Cut trains.  Drive in | {bpa,uunet}!cdin-1!cdis-1!tanner
Canada.  We need the acid rain." | {attctc gatech!uflorida}!ki4pv!cdis-1!tanner



More information about the Comp.lang.c mailing list