From owner-freebsd-arch@FreeBSD.ORG Sun Feb 5 08:48:21 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 7911416A420 for ; Sun, 5 Feb 2006 08:48:21 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep20-int.chello.at (viefep12-int.chello.at [213.46.255.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59BA543D45 for ; Sun, 5 Feb 2006 08:48:19 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep20-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060205084817.DFCI24926.viefep20-int.chello.at@wombat.fafoe.narf.at>; Sun, 5 Feb 2006 09:48:17 +0100 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 47A30BC8C; Sun, 5 Feb 2006 09:48:15 +0100 (CET) Date: Sun, 5 Feb 2006 09:48:15 +0100 From: Stefan Farfeleder To: "M. Warner Losh" Message-ID: <20060205084813.GN21806@wombat.fafoe.narf.at> References: <20060204211357.GD7604@ip.net.ua> <20060204.143353.109955782.imp@bsdimp.com> <86fymyn5il.fsf@xps.des.no> <20060204.155856.39766510.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060204.155856.39766510.imp@bsdimp.com> User-Agent: Mutt/1.5.11 Cc: des@des.no, 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 08:48:21 -0000 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: > > struct foo foo; > ((uint32_t *)(void *)&foo)[3] = 12; > > 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. Stefan