Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Mar 2006 09:43:28 +0100
From:      des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=)
To:        jkoshy@FreeBSD.ORG (Joseph Koshy)
Cc:        Maxime Henrion <mux@FreeBSD.org>, cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys queue.h
Message-ID:  <8664mtth73.fsf@xps.des.no>
In-Reply-To: <20060304154259.8A7BE16A422@hub.freebsd.org> (Joseph Koshy's message of "Sat, 4 Mar 2006 15:42:59 %2B0000 (GMT)")
References:  <20060304154259.8A7BE16A422@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Joseph Koshy <jkoshy@FreeBSD.org> writes:
> Maxime Henrion <mux@FreeBSD.org> writes:
> >   Log:
> >   Cast the pointer to void * before casting it back to struct type * in
> >   STAILQ_LAST.  This quiets a warning from GCC about increased required
> >   alignment for the cast.
> Doesn't this trade a compile time warning for a runtime fault on those
> architectures where alignment matters?

Unless the stailq head has been corrupted, we know that the result of
the expression is correctly aligned for a pointer to struct type.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8664mtth73.fsf>