From 50fa47d9167aa830a911df8f5ba4d52cec79536d Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 22 Sep 2015 12:39:10 -0600 Subject: [PATCH] [PATCH] Remove undefined behaviour from hppa backend * config/pa/pa.h (MIN_LEGIT_64BIT_CONST_INT: Avoid undefined behavior. From-SVN: r228021 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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) -- 2.30.2