- /* if it says '0f' and the line ends or it doesn't look like
- a floating point #, its a local label ref. dtrt */
- /* likewise for the b's. xoxorich. */
- if (c == 'f'
- && (!input_line_pointer[1]
- || (!strchr ("+-.0123456789", input_line_pointer[1])
- && !strchr (EXP_CHARS, input_line_pointer[1]))))
- {
- input_line_pointer -= 1;
- integer_constant (10, expressionP);
- break;
- }
+ /* If it says "0f" and it could possibly be a floating point
+ number, make it one. Otherwise, make it a local label,
+ and try to deal with parsing the rest later. */
+ if (!input_line_pointer[1]
+ || (is_end_of_line[0xff & input_line_pointer[1]]))
+ goto is_0f_label;
+ {
+ char *cp = input_line_pointer + 1;
+ int r = atof_generic (&cp, ".", EXP_CHARS,
+ &generic_floating_point_number);
+ switch (r)
+ {
+ case 0:
+ case ERROR_EXPONENT_OVERFLOW:
+ if (*cp == 'f' || *cp == 'b')
+ /* looks like a difference expression */
+ goto is_0f_label;
+ else
+ goto is_0f_float;
+ default:
+ as_fatal ("expr.c(operand): bad atof_generic return val %d",
+ r);
+ }
+ }
+
+ /* Okay, now we've sorted it out. We resume at one of these
+ two labels, depending on what we've decided we're probably
+ looking at. */
+ is_0f_label:
+ input_line_pointer--;
+ integer_constant (10, expressionP);
+ break;
+
+ is_0f_float:
+ /* fall through */