Most recent gcc 8.0.1 20180209 does not compile most recent binutils (15b23f3612ffa19b): make[4]: Entering directory '/home/d/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_all_vecs -DBINDIR='"/usr/local/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -O3 -pipe -MT binary.lo -MD -MP -MF .deps/binary.Tpo -c -o binary.lo /git/binutils-gdb/bfd/binary.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_all_vecs -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -O3 -pipe -MT binary.lo -MD -MP -MF .deps/binary.Tpo -c /git/binutils-gdb/bfd/binary.c -o binary.o In file included from /git/binutils-gdb/bfd/binary.c:38: /git/binutils-gdb/bfd/libbfd.h:268:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, bfd *)’ {aka ‘int (*)(struct bfd *, struct bfd *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, bfd *)) bfd_true) ^ ./bfd.h:7463:3: note: in expansion of macro ‘_bfd_generic_bfd_copy_private_bfd_data’ NAME##_bfd_copy_private_bfd_data, \ ^~~~ /git/binutils-gdb/bfd/binary.c:362:3: note: in expansion of macro ‘BFD_JUMP_TABLE_COPY’ BFD_JUMP_TABLE_COPY (_bfd_generic), ^~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:270:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, struct bfd_link_info *)’ {aka ‘int (*)(struct bfd *, struct bfd_link_info *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_true) ^ ./bfd.h:7464:3: note: in expansion of macro ‘_bfd_generic_bfd_merge_private_bfd_data’ NAME##_bfd_merge_private_bfd_data, \ ^~~~ /git/binutils-gdb/bfd/binary.c:362:3: note: in expansion of macro ‘BFD_JUMP_TABLE_COPY’ BFD_JUMP_TABLE_COPY (_bfd_generic), ^~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:274:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asection *, bfd *, asection *)’ {aka ‘int (*)(struct bfd *, struct bfd_section *, struct bfd *, struct bfd_section *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true) ^ ./bfd.h:7466:3: note: in expansion of macro ‘_bfd_generic_bfd_copy_private_section_data’ NAME##_bfd_copy_private_section_data, \ ^~~~ /git/binutils-gdb/bfd/binary.c:362:3: note: in expansion of macro ‘BFD_JUMP_TABLE_COPY’ BFD_JUMP_TABLE_COPY (_bfd_generic), ^~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:276:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asymbol *, bfd *, asymbol *)’ {aka ‘int (*)(struct bfd *, struct bfd_symbol *, struct bfd *, struct bfd_symbol *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true) ^ ./bfd.h:7467:3: note: in expansion of macro ‘_bfd_generic_bfd_copy_private_symbol_data’ NAME##_bfd_copy_private_symbol_data, \ ^~~~ /git/binutils-gdb/bfd/binary.c:362:3: note: in expansion of macro ‘BFD_JUMP_TABLE_COPY’ BFD_JUMP_TABLE_COPY (_bfd_generic), ^~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:278:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, bfd *)’ {aka ‘int (*)(struct bfd *, struct bfd *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, bfd *)) bfd_true) ^ ./bfd.h:7468:3: note: in expansion of macro ‘_bfd_generic_bfd_copy_private_header_data’ NAME##_bfd_copy_private_header_data, \ ^~~~ /git/binutils-gdb/bfd/binary.c:362:3: note: in expansion of macro ‘BFD_JUMP_TABLE_COPY’ BFD_JUMP_TABLE_COPY (_bfd_generic), ^~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:272:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, flagword)’ {aka ‘int (*)(struct bfd *, unsigned int)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, flagword)) bfd_true) ^ ./bfd.h:7469:3: note: in expansion of macro ‘_bfd_generic_bfd_set_private_flags’ NAME##_bfd_set_private_flags, \ ^~~~ /git/binutils-gdb/bfd/binary.c:362:3: note: in expansion of macro ‘BFD_JUMP_TABLE_COPY’ BFD_JUMP_TABLE_COPY (_bfd_generic), ^~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:280:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, void *)’ {aka ‘int (*)(struct bfd *, void *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, void *)) bfd_true) ^ ./bfd.h:7470:3: note: in expansion of macro ‘_bfd_generic_bfd_print_private_bfd_data’ NAME##_bfd_print_private_bfd_data ^~~~ /git/binutils-gdb/bfd/binary.c:362:3: note: in expansion of macro ‘BFD_JUMP_TABLE_COPY’ BFD_JUMP_TABLE_COPY (_bfd_generic), ^~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:303:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, char **, bfd_size_type *, const char **)’ {aka ‘int (*)(struct bfd *, char **, long unsigned int *, const char **)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) \ ^ ./bfd.h:7519:3: note: in expansion of macro ‘_bfd_noarchive_construct_extended_name_table’ NAME##_construct_extended_name_table, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:306:4: error: cast between incompatible function types from ‘void (*)(bfd *)’ {aka ‘void (*)(struct bfd *)’} to ‘void (*)(bfd *, const char *, char *)’ {aka ‘void (*)(struct bfd *, const char *, char *)’} [-Werror=cast-function-type] ((void (*) (bfd *, const char *, char *)) bfd_void) ^ ./bfd.h:7520:3: note: in expansion of macro ‘_bfd_noarchive_truncate_arname’ NAME##_truncate_arname, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:308:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, unsigned int, struct orl *, unsigned int, int)’ {aka ‘int (*)(struct bfd *, unsigned int, struct orl *, unsigned int, int)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) \ ^ ./bfd.h:7521:3: note: in expansion of macro ‘_bfd_noarchive_write_armap’ NAME##_write_armap, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:312:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, bfd *)’ {aka ‘int (*)(struct bfd *, struct bfd *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, bfd *)) bfd_false) ^ ./bfd.h:7523:3: note: in expansion of macro ‘_bfd_noarchive_write_ar_hdr’ NAME##_write_ar_hdr, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:314:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘bfd * (*)(bfd *, bfd *)’ {aka ‘struct bfd * (*)(struct bfd *, struct bfd *)’} [-Werror=cast-function-type] ((bfd *(*) (bfd *, bfd *)) bfd_nullvoidptr) ^ ./bfd.h:7524:3: note: in expansion of macro ‘_bfd_noarchive_openr_next_archived_file’ NAME##_openr_next_archived_file, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:316:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘bfd * (*)(bfd *, symindex)’ {aka ‘struct bfd * (*)(struct bfd *, long unsigned int)’} [-Werror=cast-function-type] ((bfd *(*) (bfd *, symindex)) bfd_nullvoidptr) ^ ./bfd.h:7525:3: note: in expansion of macro ‘_bfd_noarchive_get_elt_at_index’ NAME##_get_elt_at_index, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:415:4: error: cast between incompatible function types from ‘void (*)(bfd *)’ {aka ‘void (*)(struct bfd *)’} to ‘void (*)(bfd *, void *, asymbol *, bfd_print_symbol_type)’ {aka ‘void (*)(struct bfd *, void *, struct bfd_symbol *, enum bfd_print_symbol)’} [-Werror=cast-function-type] ((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) bfd_void) ^ /git/binutils-gdb/bfd/binary.c:192:35: note: in expansion of macro ‘_bfd_nosymbols_print_symbol’ #define binary_print_symbol _bfd_nosymbols_print_symbol ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7551:3: note: in expansion of macro ‘binary_print_symbol’ NAME##_print_symbol, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:419:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const char * (*)(bfd *, asymbol *, bfd_boolean *)’ {aka ‘const char * (*)(struct bfd *, struct bfd_symbol *, int *)’} [-Werror=cast-function-type] ((const char *(*) (bfd *, asymbol *, bfd_boolean *)) bfd_nullvoidptr) ^ /git/binutils-gdb/bfd/binary.c:194:3: note: in expansion of macro ‘_bfd_nosymbols_get_symbol_version_string’ _bfd_nosymbols_get_symbol_version_string ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7553:3: note: in expansion of macro ‘binary_get_symbol_version_string’ NAME##_get_symbol_version_string, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/binary.c:214:46: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asymbol *)’ {aka ‘int (*)(struct bfd *, struct bfd_symbol *)’} [-Werror=cast-function-type] #define binary_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) ^ ./bfd.h:7555:3: note: in expansion of macro ‘binary_bfd_is_target_special_symbol’ NAME##_bfd_is_target_special_symbol, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ In file included from /git/binutils-gdb/bfd/binary.c:38: /git/binutils-gdb/bfd/libbfd.h:425:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘alent * (*)(bfd *, asymbol *)’ {aka ‘struct lineno_cache_entry * (*)(struct bfd *, struct bfd_symbol *)’} [-Werror=cast-function-type] ((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr) ^ /git/binutils-gdb/bfd/binary.c:207:31: note: in expansion of macro ‘_bfd_nosymbols_get_lineno’ #define binary_get_lineno _bfd_nosymbols_get_lineno ^~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7556:3: note: in expansion of macro ‘binary_get_lineno’ NAME##_get_lineno, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:427:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *)’ {aka ‘int (*)(struct bfd *, struct bfd_symbol **, struct bfd_section *, long unsigned int, const char **, const char **, unsigned int *, unsigned int *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, asymbol **, asection *, bfd_vma, \ ^ /git/binutils-gdb/bfd/binary.c:208:37: note: in expansion of macro ‘_bfd_nosymbols_find_nearest_line’ #define binary_find_nearest_line _bfd_nosymbols_find_nearest_line ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7557:3: note: in expansion of macro ‘binary_find_nearest_line’ NAME##_find_nearest_line, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:432:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asymbol **, asymbol *, const char **, unsigned int *)’ {aka ‘int (*)(struct bfd *, struct bfd_symbol **, struct bfd_symbol *, const char **, unsigned int *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, asymbol **, asymbol *, \ ^ /git/binutils-gdb/bfd/binary.c:209:30: note: in expansion of macro ‘_bfd_nosymbols_find_line’ #define binary_find_line _bfd_nosymbols_find_line ^~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7558:3: note: in expansion of macro ‘binary_find_line’ NAME##_find_line, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:436:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, const char **, const char **, unsigned int *)’ {aka ‘int (*)(struct bfd *, const char **, const char **, unsigned int *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \ ^ /git/binutils-gdb/bfd/binary.c:210:37: note: in expansion of macro ‘_bfd_nosymbols_find_inliner_info’ #define binary_find_inliner_info _bfd_nosymbols_find_inliner_info ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7559:3: note: in expansion of macro ‘binary_find_inliner_info’ NAME##_find_inliner_info, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:439:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘asymbol * (*)(bfd *, void *, long unsigned int)’ {aka ‘struct bfd_symbol * (*)(struct bfd *, void *, long unsigned int)’} [-Werror=cast-function-type] ((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr) ^ /git/binutils-gdb/bfd/binary.c:211:41: note: in expansion of macro ‘_bfd_nosymbols_bfd_make_debug_symbol’ #define binary_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7560:3: note: in expansion of macro ‘binary_bfd_make_debug_symbol’ NAME##_bfd_make_debug_symbol, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:455:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const reloc_howto_type * (*)(bfd *, bfd_reloc_code_real_type)’ {aka ‘const struct reloc_howto_struct * (*)(struct bfd *, enum bfd_reloc_code_real)’} [-Werror=cast-function-type] ((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr) ^ ./bfd.h:7610:3: note: in expansion of macro ‘_bfd_norelocs_bfd_reloc_type_lookup’ NAME##_bfd_reloc_type_lookup, \ ^~~~ /git/binutils-gdb/bfd/binary.c:366:3: note: in expansion of macro ‘BFD_JUMP_TABLE_RELOCS’ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), ^~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:457:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const reloc_howto_type * (*)(bfd *, const char *)’ {aka ‘const struct reloc_howto_struct * (*)(struct bfd *, const char *)’} [-Werror=cast-function-type] ((reloc_howto_type *(*) (bfd *, const char *)) bfd_nullvoidptr) ^ ./bfd.h:7611:3: note: in expansion of macro ‘_bfd_norelocs_bfd_reloc_name_lookup’ NAME##_bfd_reloc_name_lookup ^~~~ /git/binutils-gdb/bfd/binary.c:366:3: note: in expansion of macro ‘BFD_JUMP_TABLE_RELOCS’ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), ^~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:535:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, asymbol **)’ {aka ‘long int (*)(struct bfd *, struct bfd_symbol **)’} [-Werror=cast-function-type] ((long (*) (bfd *, asymbol **)) _bfd_n1) ^ ./bfd.h:7726:3: note: in expansion of macro ‘_bfd_nodynamic_canonicalize_dynamic_symtab’ NAME##_canonicalize_dynamic_symtab, \ ^~~~ /git/binutils-gdb/bfd/binary.c:369:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:537:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, long int, asymbol **, long int, asymbol **, asymbol **)’ {aka ‘long int (*)(struct bfd *, long int, struct bfd_symbol **, long int, struct bfd_symbol **, struct bfd_symbol **)’} [-Werror=cast-function-type] ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1) ^ ./bfd.h:7727:3: note: in expansion of macro ‘_bfd_nodynamic_get_synthetic_symtab’ NAME##_get_synthetic_symtab, \ ^~~~ /git/binutils-gdb/bfd/binary.c:369:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:540:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, arelent **, asymbol **)’ {aka ‘long int (*)(struct bfd *, struct reloc_cache_entry **, struct bfd_symbol **)’} [-Werror=cast-function-type] ((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1) ^ ./bfd.h:7729:3: note: in expansion of macro ‘_bfd_nodynamic_canonicalize_dynamic_reloc’ NAME##_canonicalize_dynamic_reloc ^~~~ /git/binutils-gdb/bfd/binary.c:369:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[4]: *** [Makefile:1705: binary.lo] Error 1 make[4]: Leaving directory '/home/d/binutils/bfd'
I'm seeing the same (a regression, if you can call it that), from gcc 7.1. You can work around this by configuring with --disable-werror.
Created attachment 10809 [details] Proposed patch Hi Dilyan, Would you mind trying out this patch and let me know if it works ? I do not have access to a gcc-8 build system at the moment, so I am not sure if this fix will actually make things any better... Cheers Nick
This shifts the errors few lines further: make[4]: Entering directory '/home/d/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_all_vecs -DBINDIR='"/usr/local/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -O3 -pipe -MT binary.lo -MD -MP -MF .deps/binary.Tpo -c -o binary.lo /git/binutils-gdb/bfd/binary.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_all_vecs -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -O3 -pipe -MT binary.lo -MD -MP -MF .deps/binary.Tpo -c /git/binutils-gdb/bfd/binary.c -o binary.o In file included from /git/binutils-gdb/bfd/binary.c:38: /git/binutils-gdb/bfd/libbfd.h:305:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, char **, bfd_size_type *, const char **)’ {aka ‘int (*)(struct bfd *, char **, long unsigned int *, const char **)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) \ ^ ./bfd.h:7519:3: note: in expansion of macro ‘_bfd_noarchive_construct_extended_name_table’ NAME##_construct_extended_name_table, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:308:4: error: cast between incompatible function types from ‘void (*)(bfd *)’ {aka ‘void (*)(struct bfd *)’} to ‘void (*)(bfd *, const char *, char *)’ {aka ‘void (*)(struct bfd *, const char *, char *)’} [-Werror=cast-function-type] ((void (*) (bfd *, const char *, char *)) bfd_void) ^ ./bfd.h:7520:3: note: in expansion of macro ‘_bfd_noarchive_truncate_arname’ NAME##_truncate_arname, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:310:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, unsigned int, struct orl *, unsigned int, int)’ {aka ‘int (*)(struct bfd *, unsigned int, struct orl *, unsigned int, int)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) \ ^ ./bfd.h:7521:3: note: in expansion of macro ‘_bfd_noarchive_write_armap’ NAME##_write_armap, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:314:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, bfd *)’ {aka ‘int (*)(struct bfd *, struct bfd *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, bfd *)) bfd_false) ^ ./bfd.h:7523:3: note: in expansion of macro ‘_bfd_noarchive_write_ar_hdr’ NAME##_write_ar_hdr, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:316:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘bfd * (*)(bfd *, bfd *)’ {aka ‘struct bfd * (*)(struct bfd *, struct bfd *)’} [-Werror=cast-function-type] ((bfd *(*) (bfd *, bfd *)) bfd_nullvoidptr) ^ ./bfd.h:7524:3: note: in expansion of macro ‘_bfd_noarchive_openr_next_archived_file’ NAME##_openr_next_archived_file, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:318:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘bfd * (*)(bfd *, symindex)’ {aka ‘struct bfd * (*)(struct bfd *, long unsigned int)’} [-Werror=cast-function-type] ((bfd *(*) (bfd *, symindex)) bfd_nullvoidptr) ^ ./bfd.h:7525:3: note: in expansion of macro ‘_bfd_noarchive_get_elt_at_index’ NAME##_get_elt_at_index, \ ^~~~ /git/binutils-gdb/bfd/binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_ARCHIVE’ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:417:4: error: cast between incompatible function types from ‘void (*)(bfd *)’ {aka ‘void (*)(struct bfd *)’} to ‘void (*)(bfd *, void *, asymbol *, bfd_print_symbol_type)’ {aka ‘void (*)(struct bfd *, void *, struct bfd_symbol *, enum bfd_print_symbol)’} [-Werror=cast-function-type] ((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) bfd_void) ^ /git/binutils-gdb/bfd/binary.c:192:35: note: in expansion of macro ‘_bfd_nosymbols_print_symbol’ #define binary_print_symbol _bfd_nosymbols_print_symbol ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7551:3: note: in expansion of macro ‘binary_print_symbol’ NAME##_print_symbol, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:421:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const char * (*)(bfd *, asymbol *, bfd_boolean *)’ {aka ‘const char * (*)(struct bfd *, struct bfd_symbol *, int *)’} [-Werror=cast-function-type] ((const char *(*) (bfd *, asymbol *, bfd_boolean *)) bfd_nullvoidptr) ^ /git/binutils-gdb/bfd/binary.c:194:3: note: in expansion of macro ‘_bfd_nosymbols_get_symbol_version_string’ _bfd_nosymbols_get_symbol_version_string ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7553:3: note: in expansion of macro ‘binary_get_symbol_version_string’ NAME##_get_symbol_version_string, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/binary.c:214:46: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asymbol *)’ {aka ‘int (*)(struct bfd *, struct bfd_symbol *)’} [-Werror=cast-function-type] #define binary_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) ^ ./bfd.h:7555:3: note: in expansion of macro ‘binary_bfd_is_target_special_symbol’ NAME##_bfd_is_target_special_symbol, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ In file included from /git/binutils-gdb/bfd/binary.c:38: /git/binutils-gdb/bfd/libbfd.h:427:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘alent * (*)(bfd *, asymbol *)’ {aka ‘struct lineno_cache_entry * (*)(struct bfd *, struct bfd_symbol *)’} [-Werror=cast-function-type] ((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr) ^ /git/binutils-gdb/bfd/binary.c:207:31: note: in expansion of macro ‘_bfd_nosymbols_get_lineno’ #define binary_get_lineno _bfd_nosymbols_get_lineno ^~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7556:3: note: in expansion of macro ‘binary_get_lineno’ NAME##_get_lineno, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:429:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *)’ {aka ‘int (*)(struct bfd *, struct bfd_symbol **, struct bfd_section *, long unsigned int, const char **, const char **, unsigned int *, unsigned int *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, asymbol **, asection *, bfd_vma, \ ^ /git/binutils-gdb/bfd/binary.c:208:37: note: in expansion of macro ‘_bfd_nosymbols_find_nearest_line’ #define binary_find_nearest_line _bfd_nosymbols_find_nearest_line ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7557:3: note: in expansion of macro ‘binary_find_nearest_line’ NAME##_find_nearest_line, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:434:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, asymbol **, asymbol *, const char **, unsigned int *)’ {aka ‘int (*)(struct bfd *, struct bfd_symbol **, struct bfd_symbol *, const char **, unsigned int *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, asymbol **, asymbol *, \ ^ /git/binutils-gdb/bfd/binary.c:209:30: note: in expansion of macro ‘_bfd_nosymbols_find_line’ #define binary_find_line _bfd_nosymbols_find_line ^~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7558:3: note: in expansion of macro ‘binary_find_line’ NAME##_find_line, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:438:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, const char **, const char **, unsigned int *)’ {aka ‘int (*)(struct bfd *, const char **, const char **, unsigned int *)’} [-Werror=cast-function-type] ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \ ^ /git/binutils-gdb/bfd/binary.c:210:37: note: in expansion of macro ‘_bfd_nosymbols_find_inliner_info’ #define binary_find_inliner_info _bfd_nosymbols_find_inliner_info ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7559:3: note: in expansion of macro ‘binary_find_inliner_info’ NAME##_find_inliner_info, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:441:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘asymbol * (*)(bfd *, void *, long unsigned int)’ {aka ‘struct bfd_symbol * (*)(struct bfd *, void *, long unsigned int)’} [-Werror=cast-function-type] ((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr) ^ /git/binutils-gdb/bfd/binary.c:211:41: note: in expansion of macro ‘_bfd_nosymbols_bfd_make_debug_symbol’ #define binary_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:7560:3: note: in expansion of macro ‘binary_bfd_make_debug_symbol’ NAME##_bfd_make_debug_symbol, \ ^~~~ /git/binutils-gdb/bfd/binary.c:365:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’ BFD_JUMP_TABLE_SYMBOLS (binary), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:457:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const reloc_howto_type * (*)(bfd *, bfd_reloc_code_real_type)’ {aka ‘const struct reloc_howto_struct * (*)(struct bfd *, enum bfd_reloc_code_real)’} [-Werror=cast-function-type] ((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr) ^ ./bfd.h:7610:3: note: in expansion of macro ‘_bfd_norelocs_bfd_reloc_type_lookup’ NAME##_bfd_reloc_type_lookup, \ ^~~~ /git/binutils-gdb/bfd/binary.c:366:3: note: in expansion of macro ‘BFD_JUMP_TABLE_RELOCS’ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), ^~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:459:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const reloc_howto_type * (*)(bfd *, const char *)’ {aka ‘const struct reloc_howto_struct * (*)(struct bfd *, const char *)’} [-Werror=cast-function-type] ((reloc_howto_type *(*) (bfd *, const char *)) bfd_nullvoidptr) ^ ./bfd.h:7611:3: note: in expansion of macro ‘_bfd_norelocs_bfd_reloc_name_lookup’ NAME##_bfd_reloc_name_lookup ^~~~ /git/binutils-gdb/bfd/binary.c:366:3: note: in expansion of macro ‘BFD_JUMP_TABLE_RELOCS’ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), ^~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:537:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, asymbol **)’ {aka ‘long int (*)(struct bfd *, struct bfd_symbol **)’} [-Werror=cast-function-type] ((long (*) (bfd *, asymbol **)) _bfd_n1) ^ ./bfd.h:7726:3: note: in expansion of macro ‘_bfd_nodynamic_canonicalize_dynamic_symtab’ NAME##_canonicalize_dynamic_symtab, \ ^~~~ /git/binutils-gdb/bfd/binary.c:369:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:539:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, long int, asymbol **, long int, asymbol **, asymbol **)’ {aka ‘long int (*)(struct bfd *, long int, struct bfd_symbol **, long int, struct bfd_symbol **, struct bfd_symbol **)’} [-Werror=cast-function-type] ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1) ^ ./bfd.h:7727:3: note: in expansion of macro ‘_bfd_nodynamic_get_synthetic_symtab’ NAME##_get_synthetic_symtab, \ ^~~~ /git/binutils-gdb/bfd/binary.c:369:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), ^~~~~~~~~~~~~~~~~~~~~~ /git/binutils-gdb/bfd/libbfd.h:542:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, arelent **, asymbol **)’ {aka ‘long int (*)(struct bfd *, struct reloc_cache_entry **, struct bfd_symbol **)’} [-Werror=cast-function-type] ((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1) ^ ./bfd.h:7729:3: note: in expansion of macro ‘_bfd_nodynamic_canonicalize_dynamic_reloc’ NAME##_canonicalize_dynamic_reloc ^~~~ /git/binutils-gdb/bfd/binary.c:369:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[4]: *** [Makefile:1705: binary.lo] Error 1
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=68d206766637a041bbbeb89c8a1bfdd76317e192 commit 68d206766637a041bbbeb89c8a1bfdd76317e192 Author: Nick Clifton <nickc@redhat.com> Date: Tue Feb 13 13:14:47 2018 +0000 Fix compile time warning messages from gcc version 8 about cast between incompatible function types. PR 22823 bfd Fix compile time warnings generated by gcc version 8. * libbfd-in.h: Remove extraneous text from prototypes. Add prototypes for bfd_false_any, bfd_true_any, bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any, bfd_n1_any, bfd_void_any. (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy function. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): New function. Like bfd_false but accepts one or more arguments. (bfd_true_any): Likewise. (bfd_nullvoidptr_any): Likewise. (bfd_0_any): Likewise. (bfd_0u_any): Likewise. (bfd_0l_any): Likewise. (_bfd_n1_any): Likewise. (bfd_void_any): Likewise. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg based dummy function. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. * elf32-arc.c (get_replace_function): Assign replacement function to func pointer. * elf32-i370.c (i370_noop): Update prototype. gas * config/obj-elf.c (elf_pseudo_table): Remove now redundant casts. (obj_elf_vtable_inherit): Rename to obj_elf_get_vtable_inherit. (obj_elf_vtable_inherit): New stub function that calls obj_elf_get_vtable_inherit. (obj_elf_vtable_entry): Rename to obj_elf_get_vtable_entry. (obj_elf_vtable_entry): New stub function that calls obj_elf_get_vtable_entry. * config/obj-elf.h (obj_elf_vtable_inherit): Update prototype. (obj_elf_vtable_entry) Likewise. (obj_elf_get_vtable_inherit) Likewise. (obj_elf_get_vtable_entry) Likewise. * config/tc-arm.c (md_pseudo_table): Remove now redundant cast. * config/tc-i386c (md_pseudo_table): Likewise. * config/tc-hppa.c (pa_vtable_entry): Call obj_elf_get_vtable_entry. (pa_vtable_inherit): Call obj_elf_get_vtable_inherit. * config/tc-mips.c (s_mips_file): Replace call to dwarf2_get_file with call to dwarf2_get_filename. * dwarf2dbg.c (dwarf2_directive_file): Rename to dwarf2_directive_filename. (dwarf2_directive_file): New stub function that calls dwarf2_directive_filename. * dwarf2dbg.h: Prototype dwarf2_directive_filename. opcodes * metag-dis.c (print_fmmov): Double buffer size to avoid warning about truncation of printing.
Hi Dilyan, *sigh* This turns out to need a much more extensive patch than I had originally anticipated. I have now built myself a gcc v8 toolchain, built the binutils with this, encountered the errors you reported - and more, and fixed them. The results have been checked in, so I hope that you will now be able to build a toolchain of your own. Cheers Nick
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=12ef3f5a7c5a6b89964842fd3da047b8d07dec91 commit 12ef3f5a7c5a6b89964842fd3da047b8d07dec91 Author: Nick Clifton <nickc@redhat.com> Date: Wed Feb 14 14:56:21 2018 +0000 Fix compilation of the BFD sub-directory with a gcc v8 compiler by adding extra casts. GCC v8 issues warnings about mis-matching casts of function pointers. A previous patch tried to fix this problem by adding new dummy functions which accepted a variable number of arguments. But this introduces serious problems when compiled with other versions of gcc, (notably gcc 4.4). This patch reverts that previous solution and instead adds extra casts (to function types without a parameter list). For more details see: https://sourceware.org/ml/binutils/2018-02/msg00198.html PR 22823 Revert previous delta. Add extra casts to avoid compile time warnings instead. * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra cast to avoid warning from gcc v8 compiler. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): Delete. (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete. (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Add extra cast to avoid warning from gcc v8 compiler. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.