bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/22823] bfd/libbfd.h:268:4: error: cast between incompatibl


From: dilyan.palauzov at aegee dot org
Subject: [Bug binutils/22823] 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 *)’}
Date: Mon, 12 Feb 2018 12:51:40 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22823

--- Comment #3 from dilyan.palauzov at aegee dot org <dilyan.palauzov at aegee 
dot org> ---
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]