From bb89d84ac7d7b5090ebdf8c9b7ca9b8b8906c6fd Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Thu, 20 Aug 1998 16:10:35 +0000 Subject: * expr.c (operand): Check correctly that there is no advance in operand after atof_generic in order to decide "is it label 0f or floating point number". PR16670 --- gas/ChangeLog | 6 ++++++ gas/expr.c | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 5766ee6..ee63e9f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +1998-08-20 Vladimir N. Makarov + + * expr.c (operand): Check correctly that there is no advance in + operand after atof_generic in order to decide "is it label 0f or + floating point number". + Wed Aug 19 09:30:16 1998 Nick Clifton * config/tc-m32r.c: Replace double dash prefix to M32R specific diff --git a/gas/expr.c b/gas/expr.c index 6d99f16..dfa7393 100644 --- a/gas/expr.c +++ b/gas/expr.c @@ -64,6 +64,7 @@ symbolS * make_expr_symbol (expressionP) expressionS *expressionP; { + expressionS zero; const char *fake; symbolS *symbolP; struct expr_symbol_line *n; @@ -72,6 +73,22 @@ make_expr_symbol (expressionP) && expressionP->X_add_number == 0) return expressionP->X_add_symbol; + if (expressionP->X_op == O_big) + { + /* This won't work, because the actual value is stored in + generic_floating_point_number or generic_bignum, and we are + going to lose it if we haven't already. */ + if (expressionP->X_add_number > 0) + as_bad (_("bignum invalid; zero assumed")); + else + as_bad (_("floating point number invalid; zero assumed")); + zero.X_op = O_constant; + zero.X_add_number = 0; + zero.X_unsigned = 0; + clean_up_expression (&zero); + expressionP = &zero; + } + fake = FAKE_LABEL_NAME; /* Putting constant symbols in absolute_section rather than @@ -907,7 +924,7 @@ operand (expressionP) { case 0: case ERROR_EXPONENT_OVERFLOW: - if (*cp == 'f' || *cp == 'b') + if (cp[-1] == 'f' || cp[-1] == 'b') /* looks like a difference expression */ goto is_0f_label; else -- cgit v1.1