From: Paul Brook Date: Fri, 7 Apr 2006 15:11:19 +0000 (+0000) Subject: 2006-04-07 Paul Brook X-Git-Tag: insight_6_8-branchpoint~3553 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=df1d61c034a0b236eb48d77feb00e727bcd0ddc6;p=pf3gnuchains%2Fpf3gnuchains4x.git 2006-04-07 Paul Brook * config/tc-arm.c (parse_operands): Set default error message. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index a63e8be3ad..f6a33a5ef2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2006-04-07 Paul Brook + * config/tc-arm.c (parse_operands): Set default error message. + +2006-04-07 Paul Brook + * config/tc-arm.c (parse_tb): Set inst.error before returning FAIL. 2006-04-07 Paul Brook diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index a37e0f69e1..5af2cd4efb 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;