From f3372f4560faafbbe871efeeb7bf872bac6eeb31 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sat, 3 May 2014 07:58:13 +0800 Subject: fix struct bug --- semantics.c | 1 + 1 file changed, 1 insertion(+) (limited to 'semantics.c') 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) -- cgit v1.2.3