aliasing problem with va_arg
Jason Merrill
jason@cygnus.com
Wed Oct 28 01:58:00 GMT 1998
>>>>> Jim Wilson <wilson@cygnus.com> writes:
> If there was a syntax for declaring a pointer to unaligned data, we could
> perhaps solve the problem by using that in the va_arg macro.
Here's what I did in frame.c:
union unaligned {
void *p;
unsigned b2 __attribute__ ((mode (HI)));
unsigned b4 __attribute__ ((mode (SI)));
unsigned b8 __attribute__ ((mode (DI)));
} __attribute__ ((packed));
static inline void *
read_pointer (void *p)
{ union unaligned *up = p; return up->p; }
..etc..
Jason
More information about the Gcc
mailing list