From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 16:46:49 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88E8316A420; Mon, 13 Feb 2006 16:46:49 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31C0243D49; Mon, 13 Feb 2006 16:46:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1DGhb3i040344; Mon, 13 Feb 2006 09:43:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 13 Feb 2006 09:43:36 -0700 (MST) Message-Id: <20060213.094336.118368793.imp@bsdimp.com> To: cperciva@freebsd.org From: "M. Warner Losh" In-Reply-To: <43F04494.4030900@freebsd.org> References: <20060213.002310.125802352.imp@bsdimp.com> <20060213082129.GA13997@flame.pc> <43F04494.4030900@freebsd.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 13 Feb 2006 09:43:37 -0700 (MST) Cc: keramida@ceid.upatras.gr, arch@freebsd.org, stefanf@freebsd.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 16:46:49 -0000 In message: <43F04494.4030900@freebsd.org> Colin Percival writes: : Giorgos Keramidas wrote: : > On 2006-02-13 00:23, "M. Warner Losh" 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