aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2009-08-04 14:56:10 +0000
committerNathan Sidwell <nathan@codesourcery.com>2009-08-04 14:56:10 +0000
commitf86adc0752c2c939c5889ec7ed6ee2d3f20f1fb2 (patch)
tree662a3a6626ad83143d7187177fda05bcbc793d00 /gas/config
parent07088e95873628decec7b00b769486e6252873b9 (diff)
downloadgdb-f86adc0752c2c939c5889ec7ed6ee2d3f20f1fb2.zip
gdb-f86adc0752c2c939c5889ec7ed6ee2d3f20f1fb2.tar.gz
gdb-f86adc0752c2c939c5889ec7ed6ee2d3f20f1fb2.tar.bz2
* config/tc-arm.c (my_get_expression): Detect missing expressions.
testsuite/ * gas/arm/missing.s: New. * gas/arm/missing.d: New. * gas/arm/missing.l: New.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 1fe7f4c..b843b62 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -913,13 +913,14 @@ my_get_expression (expressionS * ep, char ** str, int prefix_mode)
seg = expression (ep);
in_my_get_expression = 0;
- if (ep->X_op == O_illegal)
+ if (ep->X_op == O_illegal || ep->X_op == O_absent)
{
- /* We found a bad expression in md_operand(). */
+ /* We found a bad or missing expression in md_operand(). */
*str = input_line_pointer;
input_line_pointer = save_in;
if (inst.error == NULL)
- inst.error = _("bad expression");
+ inst.error = (ep->X_op == O_absent
+ ? _("missing expression") :_("bad expression"));
return 1;
}