aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2010-05-05 14:17:50 +0000
committerNathan Sidwell <nathan@codesourcery.com>2010-05-05 14:17:50 +0000
commit847d4311801b81716f9670f25ae97aace2740519 (patch)
tree9c2fe895c155cd4ec40423ce04f6f808de1ddd5b /gas/read.c
parent1412f70bc66429290d396f9b0d19ac0851c019b5 (diff)
downloadgdb-847d4311801b81716f9670f25ae97aace2740519.zip
gdb-847d4311801b81716f9670f25ae97aace2740519.tar.gz
gdb-847d4311801b81716f9670f25ae97aace2740519.tar.bz2
* read.c (cons_worker): Detect and reject unexpected string argument.
testsuite/ * gas/all/byte.s: New. * gas/all/byte.l: New. * gas/all/byte.d: New. * gas/all/gas.exp: Add it.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gas/read.c b/gas/read.c
index 4afb190..32ac5e2 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -3865,7 +3865,15 @@ cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */
parse_mri_cons (&exp, (unsigned int) nbytes);
else
#endif
- TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
+ {
+ if (*input_line_pointer == '"')
+ {
+ as_bad (_("unexpected `\"' in expression"));
+ ignore_rest_of_line ();
+ return;
+ }
+ TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
+ }
if (rva)
{