From 8b580e1191cad7d6da0ef97be60105d659514d6e Mon Sep 17 00:00:00 2001 From: acqn Date: Sun, 30 Aug 2020 02:31:09 +0800 Subject: [PATCH] Disabled struct/union fields of 'void' type. --- src/cc65/declare.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc65/declare.c b/src/cc65/declare.c index e32c880cc..f65702e91 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -942,8 +942,8 @@ static SymEntry* ParseUnionDecl (const char* Name, unsigned* DSFlags) } } - /* Check for incomplete type */ - if (IsIncompleteESUType (Decl.Type)) { + /* Check for incomplete types including 'void' */ + if (IsClassIncomplete (Decl.Type)) { Error ("Field '%s' has incomplete type '%s'", Decl.Ident, GetFullTypeName (Decl.Type)); @@ -1142,8 +1142,8 @@ static SymEntry* ParseStructDecl (const char* Name, unsigned* DSFlags) } } - /* Check for incomplete type */ - if (IsIncompleteESUType (Decl.Type)) { + /* Check for incomplete types including 'void' */ + if (IsClassIncomplete (Decl.Type)) { Error ("Field '%s' has incomplete type '%s'", Decl.Ident, GetFullTypeName (Decl.Type));