From: John David Anglin Date: Sun, 13 Sep 2015 15:05:57 +0000 (+0000) Subject: fptr.c (SIGN_EXTEND): Cast -1 to unsigned. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a84bf7192780875adc0faab6df1b49bbaa926cb;p=gcc.git fptr.c (SIGN_EXTEND): Cast -1 to unsigned. * config/pa/fptr.c (SIGN_EXTEND): Cast -1 to unsigned. From-SVN: r227717 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index bca8328b831..10fd462fd29 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2015-09-13 John David Anglin + + * config/pa/fptr.c (SIGN_EXTEND): Cast -1 to unsigned. + 2015-09-03 Sebastian Huber * config/gthr-rtems.h (__GTHREADS_CXX0X): New. diff --git a/libgcc/config/pa/fptr.c b/libgcc/config/pa/fptr.c index 303672754cd..e81dcabfee7 100644 --- a/libgcc/config/pa/fptr.c +++ b/libgcc/config/pa/fptr.c @@ -45,7 +45,7 @@ static int fixup_branch_offset[NOFFSETS] = { 32, -4 }; #define GET_FIELD(X, FROM, TO) \ ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1)) #define SIGN_EXTEND(VAL,BITS) \ - ((int) ((VAL) >> ((BITS) - 1) ? (-1 << (BITS)) | (VAL) : (VAL))) + ((int) ((VAL) >> ((BITS) - 1) ? ((unsigned)(-1) << (BITS)) | (VAL) : (VAL))) struct link_map; typedef int (*fptr_t) (void);