summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-03-20 20:55:46 +0000
committerPaul Brook <paul@codesourcery.com>2006-03-20 20:55:46 +0000
commitde9d7d2668104038a0c6744c9508d7e07f59a2c6 (patch)
tree0326f47bb7dcaedbd290d0d8fbee271a3b46e460
parent0365379fcb427b937d62e1439f73621392e112a4 (diff)
downloadbinutils-gdb-de9d7d2668104038a0c6744c9508d7e07f59a2c6.tar.gz
2006-03-20 Paul Brook <paul@codesourcery.com>
* gas/config/tc-arm.c (parse_operands): Set default error message.
-rw-r--r--ChangeLog.csl4
-rw-r--r--gas/config/tc-arm.c14
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 255c0c52e63..d5b9fa247db 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,5 +1,9 @@
2006-03-20 Paul Brook <paul@codesourcery.com>
+ * gas/config/tc-arm.c (parse_operands): Set default error message.
+
+2006-03-20 Paul Brook <paul@codesourcery.com>
+
* gas/config/tc-arm.c (parse_tb): Set inst.error before returning FAIL.
2006-03-20 Paul Brook <paul@codesourcery.com>
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index afe65223cb0..1d655e7e1ad 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -4139,7 +4139,13 @@ parse_operands (char *str, const unsigned char *pattern)
failure:
if (!backtrack_pos)
- return FAIL;
+ {
+ /* The parse routine should already have set inst.error, but set a
+ defaut here just in case. */
+ if (!inst.error)
+ inst.error = _("syntax error");
+ return FAIL;
+ }
/* Do not backtrack over a trailing optional argument that
absorbed some text. We will only fail again, with the
@@ -4147,7 +4153,11 @@ parse_operands (char *str, const unsigned char *pattern)
probably less helpful than the current one. */
if (backtrack_index == i && backtrack_pos != str
&& upat[i+1] == OP_stop)
- return FAIL;
+ {
+ if (!inst.error)
+ inst.error = _("syntax error");
+ return FAIL;
+ }
/* Try again, skipping the optional argument at backtrack_pos. */
str = backtrack_pos;