diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 1998-08-20 16:10:35 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@redhat.com> | 1998-08-20 16:10:35 +0000 |
commit | bb89d84ac7d7b5090ebdf8c9b7ca9b8b8906c6fd (patch) | |
tree | 574b60da0ef1ebb3d3c87142e393027901273b94 | |
parent | c0ca074b5d71a817f6a063f7b7eb79c9cf9080a5 (diff) | |
download | gdb-bb89d84ac7d7b5090ebdf8c9b7ca9b8b8906c6fd.zip gdb-bb89d84ac7d7b5090ebdf8c9b7ca9b8b8906c6fd.tar.gz gdb-bb89d84ac7d7b5090ebdf8c9b7ca9b8b8906c6fd.tar.bz2 |
* 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
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/expr.c | 19 |
2 files changed, 24 insertions, 1 deletions
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 <vmakarov@cygnus.com> + + * 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 <nickc@cygnus.com> * config/tc-m32r.c: Replace double dash prefix to M32R specific @@ -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 |