diff options
author | Teddy <[email protected]> | 2014-04-07 03:00:06 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2014-04-07 03:00:06 +0800 |
commit | 9c760b0907df4f5ec7c28dd109b5ded8dddbfe93 (patch) | |
tree | 2b9d82bd568af2a9bc74f0509e44d19fb545eaf0 /semantics.c | |
parent | 6d4fff31616fdc96da20898d39d7cba95a9cda0a (diff) |
...
Diffstat (limited to 'semantics.c')
-rw-r--r-- | semantics.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/semantics.c b/semantics.c index 1d9e329..39ca0c1 100644 --- a/semantics.c +++ b/semantics.c @@ -596,7 +596,7 @@ CVar_t semantics_decl(CNode *p, CScope_t scope) { { /* TODO: initializer checking */ CVar_t var = semantics_declr(p->chd, type, scope, 0); - if (!type_is_complete(var->type)) + if (scope->lvl && !type_is_complete(var->type)) { sprintf(err_buff, "storage size of '%s' isn’t known", var->name); ERROR(var->ast); |