From 1abf2329fe59afa7490a8c5e5a90ef74fbaab8cd Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Thu, 21 Feb 2019 23:36:22 +1300 Subject: Always expect at least one struct decl. --- decl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'decl.c') diff --git a/decl.c b/decl.c index 8cbb86e..67fbef3 100644 --- a/decl.c +++ b/decl.c @@ -207,8 +207,8 @@ tagspec(struct scope *s) case TYPESTRUCT: case TYPEUNION: end = &t->structunion.members; - while (tok.kind != TRBRACE) - structdecl(s, t, &end); + do structdecl(s, t, &end); + while (tok.kind != TRBRACE); next(); t->size = ALIGNUP(t->size, t->align); t->incomplete = false; -- cgit v1.2.3