From 7cb9e39bd8f84867f913232904b4b36c0aea539c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 24 Jul 2015 09:05:33 -0700 Subject: [PATCH] Use 0xffffffffffffffffLL to silence GCC 6 warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit GCC 6 warns: error: result of ‘4294967295ll << 32’ requires 65 bits to represent, but ‘long long int’ only has 64 bits [-Werror=shift-overflow=] on ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff). This patch replaces it with bfd_signed_vma) 0xffffffffffffffffLL. * stabs.c (parse_stab_range_type): Use 0xffffffffffffffffLL. --- binutils/ChangeLog | 4 ++++ binutils/stabs.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4679498d190..bbaf93785a5 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2015-07-24 H.J. Lu + + * stabs.c (parse_stab_range_type): Use 0xffffffffffffffffLL. + 2015-07-22 Alan Modra * readelf.c (dump_relocations): Show MIN_INT addends as negative. diff --git a/binutils/stabs.c b/binutils/stabs.c index 4f1730896ac..5b4c8a3a858 100644 --- a/binutils/stabs.c +++ b/binutils/stabs.c @@ -1774,7 +1774,7 @@ parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *type else if (n3 == (bfd_signed_vma) 0xffffffff) return debug_make_int_type (dhandle, 4, TRUE); #ifdef BFD64 - else if (n3 == ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff)) + else if (n3 == (bfd_signed_vma) 0xffffffffffffffffLL) return debug_make_int_type (dhandle, 8, TRUE); #endif } -- 2.30.2