* 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
This commit is contained in:
Vladimir Makarov 1998-08-20 16:10:35 +00:00
parent c0ca074b5d
commit bb89d84ac7
2 changed files with 24 additions and 1 deletions

View File

@ -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

View File

@ -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