aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-10-10 10:48:05 +1030
committerAlan Modra <amodra@gmail.com>2015-10-10 10:51:20 +1030
commitd98007761887582f8ab25414ba5784eb238d06d8 (patch)
treebbb0649e6930dfcc58f0dd26d39efa263add83a6 /gas
parentbd4e004229275568cbd2a9975a4776edcf7650d4 (diff)
downloadgdb-d98007761887582f8ab25414ba5784eb238d06d8.zip
gdb-d98007761887582f8ab25414ba5784eb238d06d8.tar.gz
gdb-d98007761887582f8ab25414ba5784eb238d06d8.tar.bz2
Bug 19113 - read.c stringer assertion
Fails due to signed char promotion. PR gas/19113 * read.c (next_char_of_string): Mask char after escape. Use CHAR_MASK rather than 0xff.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/read.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1d08101..90b358b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-10 Alan Modra <amodra@gmail.com>
+
+ PR gas/19113
+ * read.c (next_char_of_string): Mask char after escape. Use
+ CHAR_MASK rather than 0xff.
+
2015-10-07 Yao Qi <yao.qi@linaro.org>
* config/tc-aarch64.c (md_begin): Access field 'name' rather
diff --git a/gas/read.c b/gas/read.c
index a3e83c3..53440de 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -5415,7 +5415,7 @@ next_char_of_string (void)
#ifndef NO_STRING_ESCAPES
case '\\':
- switch (c = *input_line_pointer++)
+ switch (c = *input_line_pointer++ & CHAR_MASK)
{
case 'b':
c = '\b';
@@ -5466,7 +5466,7 @@ next_char_of_string (void)
number = number * 8 + c - '0';
}
- c = number & 0xff;
+ c = number & CHAR_MASK;
}
--input_line_pointer;
break;
@@ -5488,7 +5488,7 @@ next_char_of_string (void)
number = number * 16 + c - 'a' + 10;
c = *input_line_pointer++;
}
- c = number & 0xff;
+ c = number & CHAR_MASK;
--input_line_pointer;
}
break;