prototypes required ?

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Oct 17 04:53:37 AEST 1990


In article <4026 at otis.oakhill.UUCP> jeff at oakhill.UUCP (Jeff Enderwick) writes:
>Is it legal for a compilation system to require prototypes when stdarg
>functions are used ? It valid for the compiler to require you to include
>the prototype:
>	int printf ( const char*, ... );
>before making the call:
>	 printf ( "hello %d worlds\n", 5 );

Yes, you definitely must have a prototype in scope before calling a
variable-argument function in a strictly conforming program.

For printf(), you should #include <stdio.h> instead of declaring it
yourself.  You might get better results that way in some implementations.



More information about the Comp.std.c mailing list