[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: posible issue on ia64 with va_args.

From: Miles Bader
Subject: [Gnu-arch-users] Re: posible issue on ia64 with va_args.
Date: 10 Mar 2004 19:13:04 +0900

Robert Collins <address@hidden> writes:
> u_char * is not promoted at all according to my va_arg info pages. But
> '0' is being promoted incorrectly, and when accessed by va_arg(ap, char
> *) results in a 0x60000000000 value. (I think I have the right number of
> 0's there) :}.
> Anyone care to comment?

I'm confused -- if you're just passing in `0', it's going to get passed
as a plain int, which obviously isn't going to work very well if ints
are shorter than pointers (Are they?  It looks like maybe it's treating
random junk in the next word as part of the pointer).

I think you really have to cast 0 to a pointer type in a varargs call.

"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join."   -- Anon. British Officer in WW I

reply via email to

[Prev in Thread] Current Thread [Next in Thread]