diff options
author | Nick Clifton <nickc@redhat.com> | 2015-12-21 08:23:35 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2015-12-21 08:23:35 +0000 |
commit | f8e663301f8b51d033b87d974b04fa431a18227a (patch) | |
tree | 11a19346b09f50655be92f03a9139ace2127867e /libiberty | |
parent | de4b6238e7501adbb9cec02005d7605c1dbeb398 (diff) | |
download | gcc-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')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/regex.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 673123c..0bda40e 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2015-12-21 Nick Clifton <nickc@redhat.com> + + PR 66827 + * regex.c (EXTRACT_NUMBER): Cast sign byte to unsigned before left + shifting. + 2015-11-27 Pedro Alves <palves@redhat.com> PR other/61321 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 |