This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Compile error: MkLinux, egcs, ssh2



source: ftp://ftp.cs.hut.fi/pub/ssh/ssh-2.0.8.tar.gz
file: ssh-2.0.8/lib/sshutil/sshencode.c

arch: powerpc601
system: MkLinux DR3 on kernel linux-2.0.35 OSF-Mach3
compiler: egcs-2.90.25 980302 (egcs-1.0.2 prerelease)
source: ftp.linuxppc.org for kernel, ftp.mklinux.apple.com for microkernel,
and compiler.

(This is the standard *NIX OS on PowerPC601 with the standard compiler.
http://www.mklinux.apple.com/ is the marginally informative website.)


First is a warning:
In function ssh_encode_va, line 92: Incompatible pointer 
	(*encoder)(buffer,&ap);

with:
	typedef void (*SshEncoder)(SshBuffer *buffer, va_list *ap);
	SshBuffer buffer; va_list ap; SshEncoder encoder;

So this is a bug in egcs, I would think.


Second is line 500: incompatible types in assignment
	start_of_ap=ap;
with:
	va_list ap; va_list start_of_ap;

and in line 512:
	ap=start_of_ap;

The problem possibly comes from egcs definition of va_list

as:
	typedef struct __va_list { ... } va_list[1]; 	


so that perhaps start_of_ap=ap wouldn't be what you wanted even if egcs
allowed it (copy first arg of ap into first arg of start_of_ap).

I personally can't think of a simple way to do what you want, but I'm no
real programmer. memcpy seems wrong, since you don't know how long the
array is.

Hope this is helpful to someone. Incidentally ssh-1.2.26 compiles cleanly
with no modifications. and so far all compile problems of ssh-2.0.8 come
from stdarg.h with every source file compiling with the exception of
sshencode.c Of course the binaries that rely on libsshutil.a can't be
built, so I can't vouch for the product as a whole.

-Jack Schmidt






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]