aboutsummaryrefslogtreecommitdiff
path: root/semantics.c
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2014-05-03 07:58:13 +0800
committerTeddy <ted.sybil@gmail.com>2014-05-03 07:58:13 +0800
commitf3372f4560faafbbe871efeeb7bf872bac6eeb31 (patch)
tree9a8cb00c29a7fb38d6d576b85cd2e726a1264cbd /semantics.c
parent605a03dfbdf2d018f91a29dad8145a9647e1b10f (diff)
fix struct bug
Diffstat (limited to 'semantics.c')
-rw-r--r--semantics.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/semantics.c b/semantics.c
index 83e4744..75ee872 100644
--- a/semantics.c
+++ b/semantics.c
@@ -1135,6 +1135,7 @@ ExpType exp_check_postfix(CNode *p, CScope_t scope) {
if (!(t1 == CSTRUCT || t1 == CUNION))
ERROR((p, "request for the member in something not a structure or union"));
{
+ calc_size(op1.type);
CVar_t fv = ctable_lookup(op1.type->rec.st.fields,
post->chd->rec.strval);
if (!fv)