Package segfaults when built with -O2 but not with -O0

Kevin Kofler kevin.kofler at chello.at
Thu Dec 1 20:19:14 UTC 2011


Paul Howarth wrote:
> This is weird: I can't reproduce these either locally in mock or in
> koji:
> 
> http://koji.fedoraproject.org/koji/taskinfo?taskID=3555838

-Wstrict-aliasing only works if -fstrict-aliasing is enabled, so if you're 
using -fno-strict-aliasing (or an optimization level below -O2 –
-fstrict-aliasing is only enabled by default at -O2, -O3 or -Os), you won't 
get the warnings.

-fno-strict-aliasing is a workaround for production builds, but it also 
sweeps the warnings under the carpet.

        Kevin Kofler



More information about the devel mailing list