va_list: ppc
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Thu Jul 29 09:54:00 GMT 1999
At 11:14 29.07.99 , Richard Henderson wrote:
>Eyeballed. Would one of the ppc-linux folks sick the test suite
>on this for good measure?
stdarg.h support seems to be fine (btw, can we have some backwards
compatibility here with __va_copy for 1 major release?), no failures with
my testcases.
varargs.h doesn't quite work it seems. First, the final #endif is missing
in varargs.h. Then the following 3 testcases fail:
- va-arg-3.c out of the testsuite
- varargs10.c:
#include <varargs.h>
inline void debug(i1, i2, i3, i4, i5, i6, i7, f1, f2, f3, f4, f5, f6, f7,
f8, f9, va_alist)
int i1, i2, i3, i4, i5, i6, i7;
double f1, f2, f3, f4, f5, f6, f7, f8, f9;
va_dcl
{
va_list ap;
va_start(ap);
if ( va_arg(ap,int) != 8)
abort();
if ( va_arg(ap,int) != 9)
abort();
if ( va_arg(ap,int) != 10)
abort();
va_end( ap );
}
int main(void)
{
debug(1, 2, 3, 4, 5, 6, 7, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0,
9.0, 8, 9, 10);
exit(0);
}
- varargs11.c:
#include <varargs.h>
typedef long long int INT64;
inline void debug(i1, i2, i3, i4, i5, i6, i7, i8, i9, va_alist)
int i1, i2, i3, i4, i5, i6, i7, i8, i9;
va_dcl
{
va_list ap;
va_start(ap);
if ( va_arg(ap,int) != 10)
abort();
if ( va_arg(ap,INT64) != 0x123400005678LL)
abort();
va_end( ap );
}
int main(void)
{
debug(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0x123400005678LL);
exit(0);
}
I haven't looked into the failures further yet, but I have the impression
it's only one common problem. Unless the fix is obvious to you, I'll debug
it later today.
Franz.
More information about the Gcc-patches
mailing list