From: Jeff Law Date: Tue, 22 Sep 2015 18:39:10 +0000 (-0600) Subject: [PATCH] Remove undefined behaviour from hppa backend X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50fa47d9167aa830a911df8f5ba4d52cec79536d;p=gcc.git [PATCH] Remove undefined behaviour from hppa backend * config/pa/pa.h (MIN_LEGIT_64BIT_CONST_INT: Avoid undefined behavior. From-SVN: r228021 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cf3152735b7..53da5896b6d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-09-22 Jeff Law + + * config/pa/pa.h (MIN_LEGIT_64BIT_CONST_INT: Avoid undefined + behavior. + 2015-09-22 Nathan Sidwell * doc/invoke.texi (-Wmultiple-inheritance, -Wvirtual-inheritance, diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 9fd036ff79f..511ea810de6 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -814,7 +814,8 @@ extern int may_call_alloca; this range are forced to the constant pool prior to reload. */ #define MAX_LEGIT_64BIT_CONST_INT ((HOST_WIDE_INT) 32 << 31) -#define MIN_LEGIT_64BIT_CONST_INT ((HOST_WIDE_INT) -32 << 31) +#define MIN_LEGIT_64BIT_CONST_INT \ + ((HOST_WIDE_INT)((unsigned HOST_WIDE_INT) -32 << 31)) #define LEGITIMATE_64BIT_CONST_INT_P(X) \ ((X) >= MIN_LEGIT_64BIT_CONST_INT && (X) < MAX_LEGIT_64BIT_CONST_INT)