summaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2000-06-23 10:12:48 +0000
committerAlan Modra <amodra@bigpond.net.au>2000-06-23 10:12:48 +0000
commit80bca52f3c9e77f559b671364022db8ac0cd3be5 (patch)
tree59cb7f5a9a5e9ce4fda22306a2f2610d8914f253 /gas/expr.c
parent49966e25026f807a920bd95ddef050a827d6160a (diff)
downloadbinutils-redhat-80bca52f3c9e77f559b671364022db8ac0cd3be5.tar.gz
(operand): Do not as_bad() if RELAX_PAREN_GROUPING is
defined. Fix error message and double increment of input_line_pointer for `[' grouping.
Diffstat (limited to 'gas/expr.c')
-rw-r--r--gas/expr.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gas/expr.c b/gas/expr.c
index e12c4b04b9..d082469610 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -1004,12 +1004,16 @@ operand (expressionP)
/* didn't begin with digit & not a name */
segment = expression (expressionP);
/* Expression() will pass trailing whitespace */
- if ((c == '(' && *input_line_pointer++ != ')')
- || (c == '[' && *input_line_pointer++ != ']'))
+ if ((c == '(' && *input_line_pointer != ')')
+ || (c == '[' && *input_line_pointer != ']'))
{
- as_bad (_("Missing ')' assumed"));
- input_line_pointer--;
+#ifdef RELAX_PAREN_GROUPING
+ if (c != '(')
+#endif
+ as_bad (_("Missing '%c' assumed"), c == '(' ? ')' : ']');
}
+ else
+ input_line_pointer++;
SKIP_WHITESPACE ();
/* here with input_line_pointer->char after "(...)" */
return segment;