public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eb7218
)
Added diagnostic about use of for example union tag as a struct tag
author
ceriel
<none@none>
Fri, 15 Jan 1993 12:41:15 +0000
(12:41 +0000)
committer
ceriel
<none@none>
Fri, 15 Jan 1993 12:41:15 +0000
(12:41 +0000)
lang/cem/cemcom.ansi/struct.c
patch
|
blob
|
history
diff --git
a/lang/cem/cemcom.ansi/struct.c
b/lang/cem/cemcom.ansi/struct.c
index
5c2083e
..
06a3094
100644
(file)
--- a/
lang/cem/cemcom.ansi/struct.c
+++ b/
lang/cem/cemcom.ansi/struct.c
@@
-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);
}