Fix strict-aliasing warnings from unwind-dw2-fde.c
Jeff Law
law@redhat.com
Thu Nov 29 21:18:00 GMT 2012
On 11/21/2012 12:05 PM, Roland McGrath wrote:
> We should aim to clean up the code to avoid the warnings while not making
> the generated code worse. If there is a case where it's very hard to avoid
> the warnings without generating worse code, we can consider using the
> option as a last resort.
So I went back and disabled the old Fedora patch which turned off strict
aliasing for a handful of files and rebuilt glibc for x86, x86_64, ppc,
ppc64, s390, s390x.
The only strict-alias warnings that were spit out were the following
across all architectures:
make[2]: Entering directory
`/builddir/build/BUILD/glibc-2.16.90-2af1b328/inet'
tst-inet6_rth.c: In function 'do_test':
tst-inet6_rth.c:76:17: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
and this one which was PPC64 specific:
gmon-start.c: In function '__gmon_start__':
gmon-start.c:63:3: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
So we're actually pretty close to being strict-aliasing clean as far as
I can tell.
jeff
More information about the Libc-alpha
mailing list