prototype my function, please

Karl Heuer karl at haddock.ima.isc.com
Tue Jun 12 02:06:33 AEST 1990


In article <1990Jun11.123122.13249 at diku.dk> thorinn at skinfaxe.diku.dk (Lars Henrik Mathiesen) writes:
>cknight at polyslo.CalPoly.EDU (King Claudius) writes:
>>An easier way to do this is to declare main as returning void...
>
>[But that could blow up if the function-call interface is different for void
>functions.]

Also, this practice may provoke a diagnostic from the compiler if it has
builtin knowledge of the correct prototype(s) for main().  (I find this
scenario more likely than the previous, especially in view of the common
missing-semicolon-before-main bug described in the FAQ.)

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list