diff options
author | Alan Modra <amodra@gmail.com> | 2000-06-23 10:12:48 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-06-23 10:12:48 +0000 |
commit | f7c8887211f063c41e16da38a881b9bf6203f300 (patch) | |
tree | e12996a433efe1d7b080537827ee8ff6a9fdcac0 /gas/expr.c | |
parent | 97c3646ff2a8b36e658651abdc0cd8f3c893dc44 (diff) | |
download | gdb-f7c8887211f063c41e16da38a881b9bf6203f300.zip gdb-f7c8887211f063c41e16da38a881b9bf6203f300.tar.gz gdb-f7c8887211f063c41e16da38a881b9bf6203f300.tar.bz2 |
(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.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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; |