benson@odi.com (Benson I. Margulies) (11/19/89)
Has anyone out there made stdarg.h work for sparc? A surface
analysis would seem to require a cfront feature, to whit:
when the compiler sees a definition like
x (int a, int b, char * c, ...)
{ ...}
it would have to print it in C as
x(a, b, c, __builtin_va_alist)
int a;
int b;
char * c;
int __builtin_va_alist;
{ ... }
Then in stdarg.h
#define va_start (l, X) l = &__builtin_va_alist;
This trick assumes that va_start in stdarg must always get the very
last arg, not some one in the middle. I believe that this is what
ANSI requires.
--
Benson I. Margulies