Date: Sun, 5 Feb 2006 09:48:15 +0100 From: Stefan Farfeleder <stefanf@FreeBSD.org> To: "M. Warner Losh" <imp@bsdimp.com> Cc: des@des.no, arch@FreeBSD.org Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 Message-ID: <20060205084813.GN21806@wombat.fafoe.narf.at> In-Reply-To: <20060204.155856.39766510.imp@bsdimp.com> References: <20060204211357.GD7604@ip.net.ua> <20060204.143353.109955782.imp@bsdimp.com> <86fymyn5il.fsf@xps.des.no> <20060204.155856.39766510.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060205084813.GN21806>