From f7c8887211f063c41e16da38a881b9bf6203f300 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 23 Jun 2000 10:12:48 +0000 Subject: [PATCH] (operand): Do not as_bad() if RELAX_PAREN_GROUPING is defined. Fix error message and double increment of input_line_pointer for `[' grouping. --- gas/ChangeLog | 6 ++++++ gas/expr.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index d463a9aef2d..cd13e01753c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2000-06-23 matthew green + + * expr.c (operand): Do not as_bad() if RELAX_PAREN_GROUPING is + defined. Fix error message and double increment of + input_line_pointer for `[' grouping. + 2000-06-22 Kazu Hirata * config/tc-h8300.c: Fix formatting and comment typos. diff --git a/gas/expr.c b/gas/expr.c index e12c4b04b91..d082469610b 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; -- 2.30.2