This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: more va_dcl problems


On Sun, 8 Nov 1998 20:11:59 -0500 (EST), Todd Vierling wrote:
>This doesn't look like legal K&R C to me.  The proper use of K&R varargs is:
>
>#include <varargs.h>
>
>returntype functionname(var1, var2, va_alist)
>    var1type var1;
>    var2type var2;
>    va_dcl
>{
>    function body
>}
>
>which _does_ work on egcs 1.1 branch.

Are you sure the va_alist decl is required?  My old SunOS 4 docs imply
that you can get away with an empty argument list.  (They also say
that you can't have named parameters in a varargs function.)

zw



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]