Commit 525cbc6e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make error details conditional on there being details to show.

parent 4d3c70c7
......@@ -163,6 +163,7 @@ parse_new(struct vcc *tl)
VSB_printf(tl->sb, "Object name '%.*s' already used.\n",
PF(tl->t));
if (sy1->def_b) {
VSB_printf(tl->sb, "First usage:\n");
AN(sy1->def_b);
if (sy1->def_e != NULL)
......@@ -171,6 +172,7 @@ parse_new(struct vcc *tl)
vcc_ErrWhere(tl, sy1->def_b);
VSB_printf(tl->sb, "Redefinition:\n");
vcc_ErrWhere(tl, tl->t);
}
return;
}
......
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