Subject: Re: disabling -fstrict-aliasing @ -O2 by default
To: None <tech-toolchain@netbsd.org>
From: Aaron J. Grier <agrier@poofygoof.com>
List: tech-toolchain
Date: 03/20/2007 14:31:10
On Mon, Mar 19, 2007 at 06:17:21AM -0400, Blair Sadewitz wrote:
> I've been noticing lately that a lot of major software packages
> (firefox, gtk2, lots of other GNOME libraries, and a lot more) do
> type-punning.
[...]
> At any rate, I think that the 'average user' (assume that this
> construct is real for the sake of argument, or that it represents me,
> heh) would rather one optimization than gain a myriad of bugs.
> 
> Comments?

also include "-fno-strict-aliasing" if the punning is OK.

C99 makes strict-aliasing the default, which is where type punning
really gets in trouble.  the Optimize Options section of the gcc info
pages gives some examples.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
              "silly brewer, saaz are for pils!"  --  virt