[releng_6 tinderbox] failure on sparc64/sparc64

M. Warner Losh imp at bsdimp.com
Mon Feb 13 08:46:49 PST 2006


In message: <43F04494.4030900 at freebsd.org>
            Colin Percival <cperciva at freebsd.org> writes:
: Giorgos Keramidas wrote:
: > On 2006-02-13 00:23, "M. Warner Losh" <imp at bsdimp.com> wrote:
: >> 	struct foo foo;
: >> 	uint32_t value[sizeof(foo) / sizeof(uint32_t)];
: >>
: >> 	memcpy(value, &foo);
: >> 	// write out value one 32-bit word at a time
: >>
: >> Is that right?  Or at least 'proper' here means defined.
: > 
: > AFAIK, yes.
: 
: I agree that the behaviour of the above code is defined, but
: I'd be much happier if value[] was defined to be an array of
: length ((sizeof(foo) - 1) / sizeof(uint32_t) + 1), just in
: case sizeof(foo) happens to not be a multiple of 4.  :-)

It won't matter given how I'm going to fix this problem...

Warner


More information about the freebsd-arch mailing list