ginclude/varargs.h fix for 64-bit AIX

Jeffrey A Law law@cygnus.com
Tue Jun 29 02:44:00 GMT 1999


  In message < 9906252250.AA32510@marc.watson.ibm.com >you write:
  > 	When I made the rounding change to stdarg.h and varargs.h for
  > 64-bit AIX, I missed the fact that the definition of va_dcl also is a
  > problem.  This patch fixes it and remove another testsuite failure.
  > 
  > David
  > 
  > Fri Jun 25 18:46:38 1999  David Edelsohn  <edelsohn@gnu.org>
  > 
  > 	* ginclude/varargs.h (va_dcl): Use long type for __builtin_va_alist
  > 	on AIX.
  > 
I'd like to avoid adding more and more machine specific #ifdefs to that
code.

I wonder if we could do something cleaner by letting the va-* files provide
an override for the type of __builtin_va_alist.

For example, we might consider having the va-* file conditionally define
__BUILTIN_VA_ALIST_TYPE or some similar variable to the right type, then
do something like:

#define __BUILTIN_VA_LIST_TYPE int
[ ... includes of various va-* files ... ]

#define va_dcl    __BUILTIN_VA_ALIST_TYPE __builtin_va_alist; __va_ellipsis

A va-* file that wanted to override could do
#undef __BUILTIN_VA_LIST_TYPE
#define __BUILTIN_VA_LIST_TYPE long

Or something along those lines.

Other options?  
jeff




More information about the Gcc-patches mailing list