Commit 63fb2ecb authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Polish an error message

parent 8b702027
......@@ -135,6 +135,7 @@ parse_set(struct vcc *tl)
} else {
vcc_Expr(tl, fmt);
}
ERRCHK(tl);
tl->indent -= INDENT;
Fb(tl, 1, ");\n");
SkipToken(tl, ';');
......
......@@ -692,6 +692,10 @@ vcc_expr4(struct vcc *tl, struct expr **e, vcc_type_t fmt)
"Symbol type (%s) can not be used in expression.\n",
VCC_SymKind(tl, sym));
vcc_ErrWhere(tl, tl->t);
if (sym->def_b != NULL) {
VSB_printf(tl->sb, "That symbol was defined here:\n");
vcc_ErrWhere(tl, sym->def_b);
}
return;
case CSTR:
assert(fmt != VOID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment