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

Paul Howarth paul at
Thu Dec 1 20:38:25 UTC 2011

On Thu, 01 Dec 2011 21:19:14 +0100
Kevin Kofler <kevin.kofler at> wrote:

> Paul Howarth wrote:
> > This is weird: I can't reproduce these either locally in mock or in
> > koji:
> > 
> >
> -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.

Understood... but I'm using -O2 and not -fno-strict-aliasing:

gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic
-Wextra -Wstrict-aliasing -Wnested-externs -Wstrict-prototypes   -c -o
pptp_gre.o pptp_gre.c


More information about the devel mailing list