https://sourceware.org/bugzilla/show_bug.cgi?id=19577
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> --- Still doesn't work: g++ -DHAVE_CONFIG_H -I. -I/export/gnu/import/git/sources/binutils-gdb/gold -I/export/gnu/import/git/sources/binutils-gdb/gold -I/export/gnu/import/git/sources/binutils-gdb/gold/../include -I/export/gnu/import/git/sources/binutils-gdb/gold/../elfcpp -DLOCALEDIR="\"/usr/local/share/locale\"" -DBINDIR="\"/usr/local/bin\"" -DTOOLBINDIR="\"/usr/local/x86_64-pc-linux-gnu/bin\"" -DTOOLLIBDIR="\"/usr/local/x86_64-pc-linux-gnu/lib\"" -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=x86_64.o -g -O2 -MT x86_64.o -MD -MP -MF .deps/x86_64.Tpo -c -o x86_64.o /export/gnu/import/git/sources/binutils-gdb/gold/x86_64.cc In file included from /export/gnu/import/git/sources/binutils-gdb/gold/x86_64.cc:30:0: /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h: In instantiation of ‘static bool gold::Bits<valsize>::has_overflow32(uint32_t) [with int bits = 32; uint32_t = unsigned int]’: /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:366:41: required from ‘static gold::Relocate_functions<size, big_endian>::Reloc_status gold::Relocate_functions<size, big_endian>::check_overflow(gold::Relocate_functions<size, big_endian>::Address, gold::Relocate_functions<size, big_endian>::Overflow_check) [with int valsize = 32; int size = 32; bool big_endian = false; gold::Relocate_functions<size, big_endian>::Address = unsigned int]’ /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:442:35: required from ‘static gold::Relocate_functions<size, big_endian>::Reloc_status gold::Relocate_functions<size, big_endian>::rel(unsigned char*, const gold::Sized_relobj_file<size, big_endian>*, const gold::Symbol_value<size>*, gold::Relocate_functions<size, big_endian>::Overflow_check) [with int valsize = 32; int size = 32; bool big_endian = false]’ /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:808:27: required from ‘static void gold::Relocate_functions<size, big_endian>::rel32(unsigned char*, const gold::Sized_relobj_file<size, big_endian>*, const gold::Symbol_value<size>*) [with int size = 32; bool big_endian = false]’ /export/gnu/import/git/sources/binutils-gdb/gold/target-reloc.h:915:51: required from ‘void gold::relocate_relocs(const gold::Relocate_info<size, big_endian>*, const unsigned char*, size_t, gold::Output_section*, typename elfcpp::Elf_types<size>::Elf_Off, unsigned char*, typename elfcpp::Elf_types<size>::Elf_Addr, gold::section_size_type, unsigned char*, gold::section_size_type) [with int size = 32; bool big_endian = false; Classify_reloc = gold::Default_classify_reloc<4, 32, false>; size_t = long unsigned int; typename elfcpp::Elf_types<size>::Elf_Off = unsigned int; typename elfcpp::Elf_types<size>::Elf_Addr = unsigned int; gold::section_size_type = long unsigned int]’ /export/gnu/import/git/sources/binutils-gdb/gold/x86_64.cc:4461:53: required from ‘void {anonymous}::Target_x86_64<size>::relocate_relocs(const gold::Relocate_info<size, false>*, unsigned int, const unsigned char*, size_t, gold::Output_section*, typename elfcpp::Elf_types<size>::Elf_Off, unsigned char*, typename elfcpp::Elf_types<size>::Elf_Addr, gold::section_size_type, unsigned char*, gold::section_size_type) [with int size = 32; size_t = long unsigned int; typename elfcpp::Elf_types<size>::Elf_Off = unsigned int; typename elfcpp::Elf_types<size>::Elf_Addr = unsigned int; gold::section_size_type = long unsigned int]’ /export/gnu/import/git/sources/binutils-gdb/gold/target-select.h:39:7: required from here /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:1009:37: error: integer overflow in expression [-Werror=overflow] int32_t max = (1 << (bits - 1)) - 1; ^ /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h: In instantiation of ‘static bool gold::Bits<valsize>::has_unsigned_overflow32(uint32_t) [with int bits = 32; uint32_t = unsigned int]’: /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:375:50: required from ‘static gold::Relocate_functions<size, big_endian>::Reloc_status gold::Relocate_functions<size, big_endian>::check_overflow(gold::Relocate_functions<size, big_endian>::Address, gold::Relocate_functions<size, big_endian>::Overflow_check) [with int valsize = 32; int size = 32; bool big_endian = false; gold::Relocate_functions<size, big_endian>::Address = unsigned int]’ /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:442:35: required from ‘static gold::Relocate_functions<size, big_endian>::Reloc_status gold::Relocate_functions<size, big_endian>::rel(unsigned char*, const gold::Sized_relobj_file<size, big_endian>*, const gold::Symbol_value<size>*, gold::Relocate_functions<size, big_endian>::Overflow_check) [with int valsize = 32; int size = 32; bool big_endian = false]’ /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:808:27: required from ‘static void gold::Relocate_functions<size, big_endian>::rel32(unsigned char*, const gold::Sized_relobj_file<size, big_endian>*, const gold::Symbol_value<size>*) [with int size = 32; bool big_endian = false]’ /export/gnu/import/git/sources/binutils-gdb/gold/target-reloc.h:915:51: required from ‘void gold::relocate_relocs(const gold::Relocate_info<size, big_endian>*, const unsigned char*, size_t, gold::Output_section*, typename elfcpp::Elf_types<size>::Elf_Off, unsigned char*, typename elfcpp::Elf_types<size>::Elf_Addr, gold::section_size_type, unsigned char*, gold::section_size_type) [with int size = 32; bool big_endian = false; Classify_reloc = gold::Default_classify_reloc<4, 32, false>; size_t = long unsigned int; typename elfcpp::Elf_types<size>::Elf_Off = unsigned int; typename elfcpp::Elf_types<size>::Elf_Addr = unsigned int; gold::section_size_type = long unsigned int]’ /export/gnu/import/git/sources/binutils-gdb/gold/x86_64.cc:4461:53: required from ‘void {anonymous}::Target_x86_64<size>::relocate_relocs(const gold::Relocate_info<size, false>*, unsigned int, const unsigned char*, size_t, gold::Output_section*, typename elfcpp::Elf_types<size>::Elf_Off, unsigned char*, typename elfcpp::Elf_types<size>::Elf_Addr, gold::section_size_type, unsigned char*, gold::section_size_type) [with int size = 32; size_t = long unsigned int; typename elfcpp::Elf_types<size>::Elf_Off = unsigned int; typename elfcpp::Elf_types<size>::Elf_Addr = unsigned int; gold::section_size_type = long unsigned int]’ /export/gnu/import/git/sources/binutils-gdb/gold/target-select.h:39:7: required from here /export/gnu/import/git/sources/binutils-gdb/gold/reloc.h:1023:46: error: left shift count >= width of type [-Werror=shift-count-overflow] uint32_t max = static_cast<uint32_t>((1U << bits) - 1); ^ -- 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