cgen opcodes/asm patch
Frank Ch. Eigler
fche@redhat.com
Thu Dec 28 11:51:00 GMT 2000
Hi -
I'm about to commit a small patch to opcodes/cgen-asm.in, intended to
improve the error message for an instruction that lacks required operands.
2000-12-28 Frank Ch. Eigler <fche@redhat.com>
* cgen-asm.in (parse_insn_normal): Print better error message for
instructions with missing operands.
Index: cgen-asm.in
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-asm.in,v
retrieving revision 1.2
diff -c -p -r1.2 cgen-asm.in
*** cgen-asm.in 2000/12/13 18:55:02 1.2
--- cgen-asm.in 2000/12/28 19:49:49
*************** parse_insn_normal (cd, insn, strp, field
*** 127,139 ****
++ syn;
++ str;
}
! else
{
/* Syntax char didn't match. Can't be this insn. */
static char msg [80];
/* xgettext:c-format */
sprintf (msg, _("syntax error (expected char `%c', found `%c')"),
*syn, *str);
return msg;
}
continue;
--- 127,148 ----
++ syn;
++ str;
}
! else if (*str)
{
/* Syntax char didn't match. Can't be this insn. */
static char msg [80];
/* xgettext:c-format */
sprintf (msg, _("syntax error (expected char `%c', found `%c')"),
*syn, *str);
+ return msg;
+ }
+ else
+ {
+ /* Ran out of input. */
+ static char msg [80];
+ /* xgettext:c-format */
+ sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"),
+ *syn);
return msg;
}
continue;
More information about the Binutils
mailing list