patch for problem with va-ppc.h included with egcs and gcc-2.95.2

Jason Kim jwk2@EECS.Lehigh.EDU
Mon Nov 29 13:05:00 GMT 1999


There is no ChangeLog here. The original files in GCC (2.95.2) had no
changelog (!)

jason kim.
jwk2@eecs.lehigh.edu


There is a problem with va-ppc.h distributed with recent versions of
gcc (2.95 and onwards) as well as the older egcs 1.1 releases.

va-ppc.h typedefs va_list as an array of 1 element of struct
_va_list_tag but this causes problems when va_lists (or pointers to
them!) are passed as arguments to functions:

e.g.

void foo(va_list va1)
{
  va_list va2;
  va1 = va2;
}

will cause the compilation to fail with incompatible pointer types under
PowerPC linux systems (including LinuxPPC 1999 Q3)

Included with this message are two patches, one for
/usr/lib/gcc-lib/ppc-redhat-linux/egcs-2.91.66/include/va-ppc.h

and a similar patch for gcc/ginclude/va-ppc.h in gcc-2.95.2 (generic)

This patch is needed to compile and run programs that use vararg stuff
extensively such as ssh-2.0.13 on PowerPC based linux systems.

I have tested my patch in a 1999 Q3 version of LinuxPPC and seems to work
fine. (i.e. ssh2 compiled, and ran, and works with no probs)

p.s. gcc-2.95.2 and the latest binutils seems to disagree on what the proper
target name is for linking... more on this as it develops..



More information about the Gcc-patches mailing list