From owner-freebsd-arch@FreeBSD.ORG Sun Feb 5 15:45: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 6C71416A420; Sun, 5 Feb 2006 15:45:49 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id C563E43D5F; Sun, 5 Feb 2006 15:45:40 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 5150E2081; Sun, 5 Feb 2006 16:45:35 +0100 (CET) X-Spam-Tests: AWL,BAYES_00,FORGED_RCVD_HELO X-Spam-Learn: ham X-Spam-Score: -3.1/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id BC5FA2080; Sun, 5 Feb 2006 16:45:34 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id 9705133C22; Sun, 5 Feb 2006 16:45:34 +0100 (CET) To: Stefan Farfeleder References: <20060204211357.GD7604@ip.net.ua> <20060204.143353.109955782.imp@bsdimp.com> <86fymyn5il.fsf@xps.des.no> <20060204.155856.39766510.imp@bsdimp.com> <20060205084813.GN21806@wombat.fafoe.narf.at> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sun, 05 Feb 2006 16:45:34 +0100 In-Reply-To: <20060205084813.GN21806@wombat.fafoe.narf.at> (Stefan Farfeleder's message of "Sun, 5 Feb 2006 09:48:15 +0100") Message-ID: <867j89n71d.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@FreeBSD.org 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: Sun, 05 Feb 2006 15:45:49 -0000 Stefan Farfeleder writes: > On Sat, Feb 04, 2006 at 03:58:56PM -0700, M. Warner Losh wrote: > > This driver wants to access these structures as arrays of uint32_t. > > It used to cast directly, but that isn't allowed. So, I've passed > > the cast through a (void *). Is that allowed? Eg: > >=20 > > struct foo foo; > > ((uint32_t *)(void *)&foo)[3] =3D 12; > >=20 > > is that OK? > I'm afraid that only silences the warning without solving the underlying > problem. I don't think there's a Standard conforming way to treat a > struct foo as an uint32_t array. A union should do the trick. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no