Another problem with new varargs code

Jeffrey A Law law@cygnus.com
Wed Sep 22 12:41:00 GMT 1999


We have some systems (such as irix6.5) where we do only minimal fixing of
the system header files.

Most notably we do not munge stdio.h

Unfortunately, stdio.h has something like this:

/* Define the va_list type: */
#ifndef _VA_LIST_
#define _VA_LIST_
typedef char *va_list;
#endif /* !_VA_LIST_ */

Which prevents us from installing our own typedef for va_list in varargs.h or
stdarg.h.

Not surprisingly this causes some unpleasant problems when we call
__builtin_stdarg_start and similar functions with a variable of type va_list.

You can see this behavior first hand compiling 920726-1.c on an irix6.5
machine (holodeck:/work/law/egcs/gcc if you want a pre-built tree to poke at).

Presumably this means we're going to have to fix stdio.h on these systems to
avoid losing.



jeff



More information about the Gcc-bugs mailing list