prototype my function, please
D'Arcy J.M. Cain
darcy at druid.uucp
Tue Jun 12 13:54:27 AEST 1990
In article <2672bfbb.6b94 at petunia.CalPoly.EDU> cknight at polyslo.CalPoly.EDU
(King Claudius) writes:
>karl at haddock.ima.isc.com (Karl Heuer) writes:
>?My opinion: leave it out, and if the compiler doesn't provide a way to
>?suppress the warning, then complain to the vendor. Since it is very common to
>?leave main() with exit(), and since this is a defensible programming style,
>?the compiler should allow it--even if it has to make main() a special case.
>An easier way to do this is to declare main as returning void...
>
Bringing us back to last week's discussion of declaring main as void. I think
Karl had the right idea. No matter how elegant it is to think of it otherwise
main is not the same as other functions and a few special rules (in a hosted
environment) are not unreasonable.
--
D'Arcy J.M. Cain (darcy at druid) | Government:
D'Arcy Cain Consulting | Organized crime with an attitude
West Hill, Ontario, Canada |
(416) 281-6094 |
More information about the Comp.lang.c
mailing list