static segT operand (expressionS *, enum expr_mode);
static operatorT operatorf (int *);
-extern const char EXP_CHARS[], FLT_CHARS[];
-
/* We keep a mapping of expression symbols to file positions, so that
we can provide better error messages. */
if (expressionP->X_op == O_constant)
resolve_symbol_value (symbolP);
- n = (struct expr_symbol_line *) xmalloc (sizeof *n);
+ n = XNEW (struct expr_symbol_line);
n->sym = symbolP;
n->file = as_where (&n->line);
n->next = expr_symbol_lines;
&& input_line_pointer - 1 == suffix)
c = *input_line_pointer++;
+#ifndef tc_allow_U_suffix
+#define tc_allow_U_suffix 1
+#endif
+ /* PR 19910: Look for, and ignore, a U suffix to the number. */
+ if (tc_allow_U_suffix && (c == 'U' || c == 'u'))
+ c = * input_line_pointer++;
+
if (small)
{
/* Here with number, in correct radix. c is the next char.
if (md_need_index_operator())
goto de_fault;
# endif
- /* FALLTHROUGH */
#endif
+ /* Fall through. */
case '(':
/* Didn't begin with digit & not a name. */
segment = expr (0, expressionP, mode);
/* expression () will pass trailing whitespace. */
if ((c == '(' && *input_line_pointer != ')')
|| (c == '[' && *input_line_pointer != ']'))
- as_bad (_("missing '%c'"), c == '(' ? ')' : ']');
+ {
+ if (* input_line_pointer)
+ as_bad (_("found '%c', expected: '%c'"),
+ * input_line_pointer, c == '(' ? ')' : ']');
+ else
+ as_bad (_("missing '%c'"), c == '(' ? ')' : ']');
+ }
else
input_line_pointer++;
SKIP_WHITESPACE ();
if (! flag_m68k_mri || *input_line_pointer != '\'')
goto de_fault;
++input_line_pointer;
- /* Fall through. */
#endif
+ /* Fall through. */
case '\'':
if (! flag_m68k_mri)
{
/* Double quote is the bitwise not operator in MRI mode. */
if (! flag_m68k_mri)
goto de_fault;
- /* Fall through. */
#endif
+ /* Fall through. */
case '~':
/* '~' is permitted to start a label on the Delta. */
if (is_name_beginner (c))
goto isname;
+ /* Fall through. */
case '!':
case '-':
case '+':
SKIP_WHITESPACE ();
c = get_symbol_name (& name);
- buf = (char *) xmalloc (strlen (name) + 10);
- if (start)
- sprintf (buf, ".startof.%s", name);
- else
- sprintf (buf, ".sizeof.%s", name);
+ buf = concat (start ? ".startof." : ".sizeof.", name,
+ (char *) NULL);
symbolP = symbol_make (buf);
free (buf);
c = get_symbol_name (& name);
- buf = (char *) xmalloc (strlen (name) + 10);
- if (start)
- sprintf (buf, ".startof.%s", name);
- else
- sprintf (buf, ".sizeof.%s", name);
+ buf = concat (start ? ".startof." : ".sizeof.", name,
+ (char *) NULL);
symbolP = symbol_make (buf);
free (buf);