Added diagnostic about use of for example union tag as a struct tag
This commit is contained in:
parent
7eb7218667
commit
ba62ce0edc
|
@ -248,8 +248,15 @@ apply_struct(fund, idf, tpp)
|
|||
|
||||
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;
|
||||
}
|
||||
else
|
||||
declare_struct(fund, idf, tpp);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue