On Tue, Oct 9, 2012 at 9:28 PM, Hans-Peter Nilsson <h...@bitrange.com> wrote: > On Tue, 9 Oct 2012, Ian Lance Taylor wrote: >> Patch bootstrapped and ran libbacktrace and Go testsuites on >> x86_64-unknown-linux-gnu. Committed to mainline. > > Trying x86_64 host gcc 4.1.2 (--target=rl78-elf but not the issue) at > r192285: > > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H > -I. -I/tmp/rl78b/gcc/libbacktrace -I /tmp/rl78b/gcc/li\ > bbacktrace/../include -I /tmp/rl78b/gcc/libbacktrace/../libgcc > -I ../libgcc -I ../gcc/include -I ../../gcc/include -fu\ > nwind-tables -W -Wall -Wwrite-strings -Wstrict-prototypes > -Wmissing-prototypes -Wold-style-definition -Wmissing-format-\ > attribute -Wcast-qual -Werror -g -O2 -c -o dwarf.lo > /tmp/rl78b/gcc/libbacktrace/dwarf.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. > -I/tmp/rl78b/gcc/libbacktrace -I > /tmp/rl78b/gcc/libbacktrace/../include -I /\ > tmp/rl78b/gcc/libbacktrace/../libgcc -I ../libgcc -I > ../gcc/include -I ../../gcc/include -funwind-tables -W -Wall > -Wwri\ > te-strings -Wstrict-prototypes -Wmissing-prototypes > -Wold-style-definition -Wmissing-format-attribute -Wcast-qual > -Werr\ > or -g -O2 -c /tmp/rl78b/gcc/libbacktrace/dwarf.c -o dwarf.o > cc1: warnings being treated as errors > /tmp/rl78b/gcc/libbacktrace/dwarf.c: In function > 'dwarf_fileline': > /tmp/rl78b/gcc/libbacktrace/dwarf.c:2766: warning: dereferencing > type-punned pointer will break strict-aliasing rules > /tmp/rl78b/gcc/libbacktrace/dwarf.c: In function > 'backtrace_dwarf_add': > /tmp/rl78b/gcc/libbacktrace/dwarf.c:2887: warning: dereferencing > type-punned pointer will break strict-aliasing rules > /tmp/rl78b/gcc/libbacktrace/dwarf.c:2899: warning: dereferencing > type-punned pointer will break strict-aliasing rules > make[3]: *** [dwarf.lo] Error 1
It's an incorrect warning from an old version of GCC. Fixed like so. Bootstrapped and ran libbacktrace testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2012-10-09 Ian Lance Taylor <i...@google.com> * dwarf.c (dwarf_fileline): Add cast to avoid warning. (backtrace_dwarf_add): Likewise.
foo.patch
Description: Binary data