2006-04-07 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (parse_operands): Set default error message.
This commit is contained in:
parent
ab1eb5fea7
commit
d252fddeb1
|
@ -1,3 +1,7 @@
|
||||||
|
2006-04-07 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* config/tc-arm.c (parse_operands): Set default error message.
|
||||||
|
|
||||||
2006-04-07 Paul Brook <paul@codesourcery.com>
|
2006-04-07 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* config/tc-arm.c (parse_tb): Set inst.error before returning FAIL.
|
* config/tc-arm.c (parse_tb): Set inst.error before returning FAIL.
|
||||||
|
|
|
@ -4139,7 +4139,13 @@ parse_operands (char *str, const unsigned char *pattern)
|
||||||
|
|
||||||
failure:
|
failure:
|
||||||
if (!backtrack_pos)
|
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
|
/* Do not backtrack over a trailing optional argument that
|
||||||
absorbed some text. We will only fail again, with the
|
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. */
|
probably less helpful than the current one. */
|
||||||
if (backtrack_index == i && backtrack_pos != str
|
if (backtrack_index == i && backtrack_pos != str
|
||||||
&& upat[i+1] == OP_stop)
|
&& 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. */
|
/* Try again, skipping the optional argument at backtrack_pos. */
|
||||||
str = backtrack_pos;
|
str = backtrack_pos;
|
||||||
|
|
Loading…
Reference in New Issue