Added diagnostic about use of for example union tag as a struct tag

This commit is contained in:
ceriel 1993-01-15 12:41:15 +00:00
parent 7eb7218667
commit ba62ce0edc

View file

@ -248,8 +248,15 @@ apply_struct(fund, idf, tpp)
tgp = &idf->id_tag; tgp = &idf->id_tag;
if (*tgp) if (*tgp) {
if (fund != (*tgp)->tg_type->tp_fund) {
error("tag %s indicates a %s, not a %s",
idf->id_text,
symbol2str((*tgp)->tg_type->tp_fund),
symbol2str(fund));
}
*tpp = (*tgp)->tg_type; *tpp = (*tgp)->tg_type;
}
else else
declare_struct(fund, idf, tpp); declare_struct(fund, idf, tpp);
} }