Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Aug 2006 10:05:14 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no>
Cc:        freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org, freebsd-geom@FreeBSD.org
Subject:   Re: GJournal (hopefully) final patches.
Message-ID:  <44DB3D1A.1030605@mac.com>
In-Reply-To: <868xlw3e2z.fsf@xps.des.no>
References:  <20060808195202.GA1564@garage.freebsd.pl> <20060808210211.GA730@bsd.trippelsdorf.de> <20060808214116.GB730@bsd.trippelsdorf.de> <868xlw3e2z.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smørgrav wrote:
> Markus Trippelsdorf <markus@trippelsdorf.de> writes:
>> Adding -fno-strict-aliasing to the CFLAGS of sbin/fsck_ffs/Makefile
>> solved the problem for now.
> 
> -fno-strict-aliasing does not solve anything, it just prevents the
> compiler from telling you about bugs in your code.

It also prevents the compiler's optimizer from assuming that a pointer 
dereference may impact datatypes of other sizes.

Since there exists C code that changes, say, int16_t's or int32_t's one byte 
at a time, using that flag prevents the compiler from generating buggy 
executables from C sources which do not adhere to the assumptions made by 
"strict aliasing".

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44DB3D1A.1030605>