aboutsummaryrefslogtreecommitdiff
path: root/libiberty/regex.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-12-21 08:23:35 +0000
committerNick Clifton <nickc@gcc.gnu.org>2015-12-21 08:23:35 +0000
commitf8e663301f8b51d033b87d974b04fa431a18227a (patch)
tree11a19346b09f50655be92f03a9139ace2127867e /libiberty/regex.c
parentde4b6238e7501adbb9cec02005d7605c1dbeb398 (diff)
downloadgcc-f8e663301f8b51d033b87d974b04fa431a18227a.zip
gcc-f8e663301f8b51d033b87d974b04fa431a18227a.tar.gz
gcc-f8e663301f8b51d033b87d974b04fa431a18227a.tar.bz2
re PR other/66827 (left shifts of negative value warnings due to C++14 switch)
PR 66827 * regex.c (EXTRACT_NUMBER): Cast sign byte to unsigned before left shifting. From-SVN: r231873
Diffstat (limited to 'libiberty/regex.c')
-rw-r--r--libiberty/regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libiberty/regex.c b/libiberty/regex.c
index 16338cb..9ffc3f4 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -685,7 +685,7 @@ typedef enum
# define EXTRACT_NUMBER(destination, source) \
do { \
(destination) = *(source) & 0377; \
- (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \
+ (destination) += ((unsigned) SIGN_EXTEND_CHAR (*((source) + 1))) << 8; \
} while (0)
# endif