diff options
author | Frank Ch. Eigler <fche@redhat.com> | 2000-12-28 19:53:54 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 2000-12-28 19:53:54 +0000 |
commit | 691a20423219898fc37ec269bac68f9db7c715ee (patch) | |
tree | 0d950608dd41bc5d9e085ffa0df9ec4be00e410b /opcodes/cgen-asm.in | |
parent | e551de6e720789b7f574efd72884ee529ec26fdc (diff) | |
download | binutils-redhat-691a20423219898fc37ec269bac68f9db7c715ee.tar.gz |
* error msg tweak
2000-12-28 Frank Ch. Eigler <fche@redhat.com>
* cgen-asm.in (parse_insn_normal): Print better error message for
instructions with missing operands.
Diffstat (limited to 'opcodes/cgen-asm.in')
-rw-r--r-- | opcodes/cgen-asm.in | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/opcodes/cgen-asm.in b/opcodes/cgen-asm.in index ad6d1722fa..9915f065b7 100644 --- a/opcodes/cgen-asm.in +++ b/opcodes/cgen-asm.in @@ -127,7 +127,7 @@ parse_insn_normal (cd, insn, strp, fields) ++ syn; ++ str; } - else + else if (*str) { /* Syntax char didn't match. Can't be this insn. */ static char msg [80]; @@ -136,6 +136,15 @@ parse_insn_normal (cd, insn, strp, fields) *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; } |