[OpenBIOS] [PATCH 1/4] Disable strict aliasing for all targets

Pavel Roskin proski at gnu.org
Tue Aug 11 21:14:58 CEST 2009


On Tue, 2009-08-11 at 12:39 +0200, Laurent Vivier wrote:
> >+CFLAGS+= -fno-strict-aliasing
> ...
> 
> Why is this needed ?

I suggested disabling strict aliasing for the filesystem sources back in
April:
http://lists.openbios.org/pipermail/openbios/2009-May/003691.html

At that time, I hoped to fix other warnings individually.  But I got a
reply suggesting that all strict aliasing should be disabled:

http://lists.openbios.org/pipermail/openbios/2009-May/003694.html

We still have some warnings about strict aliasing on PowerPC:

../drivers/fw_cfg.c:41: error: dereferencing type-punned pointer will
break strict-aliasing rules
../drivers/fw_cfg.c:51: error: dereferencing type-punned pointer will
break strict-aliasing rules

Most strict aliasing warnings can be resolved, but it's time consuming.
Considering the attitude to this issue, I decided that the best solution
would be to disable strict aliasing globally.

I'm using gcc 4.4.1 on PowerPC, so I'm probably seeing more warnings
than others.

-- 
Regards,
Pavel Roskin



More information about the OpenBIOS mailing list