https://sourceware.org/bugzilla/show_bug.cgi?id=19788
Bug ID: 19788 Summary: gcc 6.0, bfd/aoutx.h and -Werror=strict-aliasing Product: binutils Version: 2.27 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: dilyan.palauzov at aegee dot org Target Milestone: --- Compiling bfd with gcc 6.0.0 20160308 prints: make[4]: Entering directory '/binutils/bfd' /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/git/binutils-gdb/bfd -I. -I/git/binutils-gdb/bfd -I/git/binutils-gdb/bfd/../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR='"/usr/local/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -pipe -O3 -fno-fat-lto-objects -flto -MT aout32.lo -MD -MP -MF .deps/aout32.Tpo -c -o aout32.lo /git/binutils-gdb/bfd/aout32.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/git/binutils-gdb/bfd -I. -I/git/binutils-gdb/bfd -I/git/binutils-gdb/bfd/../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -pipe -O3 -fno-fat-lto-objects -flto -MT aout32.lo -MD -MP -MF .deps/aout32.Tpo -c /git/binutils-gdb/bfd/aout32.c -o aout32.o In file included from /git/binutils-gdb/bfd/aout32.c:24:0: /git/binutils-gdb/bfd/aoutx.h: In function 'aout_32_write_syms': /git/binutils-gdb/bfd/aoutx.h:1871:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] H_PUT_16 (abfd, aout_symbol (g)->desc, nsp.e_desc); ^~~~~~~~ /git/binutils-gdb/bfd/aoutx.h:1872:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] H_PUT_8 (abfd, aout_symbol (g)->other, nsp.e_other); ^~~~~~~ /git/binutils-gdb/bfd/aoutx.h:1873:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] H_PUT_8 (abfd, aout_symbol (g)->type, nsp.e_type); ^~~~~~~ /git/binutils-gdb/bfd/aoutx.h: In function 'aout_32_get_symbol_info': /git/binutils-gdb/bfd/aoutx.h:2504:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] int type_code = aout_symbol (symbol)->type & 0xff; ^~~ /git/binutils-gdb/bfd/aoutx.h:2515:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ret->stab_other = (unsigned) (aout_symbol (symbol)->other & 0xff); ^~~ /git/binutils-gdb/bfd/aoutx.h:2516:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ret->stab_desc = (unsigned) (aout_symbol (symbol)->desc & 0xffff); ^~~ /git/binutils-gdb/bfd/aoutx.h: In function 'aout_32_print_symbol': /git/binutils-gdb/bfd/aoutx.h:2537:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] (unsigned) (aout_symbol (symbol)->desc & 0xffff), ^ /git/binutils-gdb/bfd/aoutx.h:2538:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] (unsigned) (aout_symbol (symbol)->other & 0xff), ^ /git/binutils-gdb/bfd/aoutx.h:2539:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] (unsigned) (aout_symbol (symbol)->type)); ^ /git/binutils-gdb/bfd/aoutx.h:2549:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] (unsigned) (aout_symbol (symbol)->desc & 0xffff), ^ /git/binutils-gdb/bfd/aoutx.h:2550:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] (unsigned) (aout_symbol (symbol)->other & 0xff), ^ /git/binutils-gdb/bfd/aoutx.h:2551:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] (unsigned) (aout_symbol (symbol)->type & 0xff)); ^ cc1: all warnings being treated as errors Makefile:1640: recipe for target 'aout32.lo' failed make[4]: *** [aout32.lo] Error 1 make[4]: Leaving directory '/binutils/bfd' -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils