diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index 65a0c0cbb..5794bf5a6 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -976,7 +976,7 @@ unsigned TypeOf (const Type* T) case T_ENUM: /* Incomplete enum type */ - Error ("Incomplete enum type"); + Error ("Incomplete type '%s'", GetFullTypeName (T)); return CF_INT; default: diff --git a/src/cc65/declare.c b/src/cc65/declare.c index f6aa9c430..9539a09b6 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -2543,6 +2543,12 @@ static unsigned ParseInitInternal (Type* T, int *Braces, int AllowFlexibleMember case T_UNION: return ParseStructInit (T, Braces, AllowFlexibleMembers); + case T_ENUM: + /* Incomplete enum type must have already raised errors. + ** Just proceed to consume the value. + */ + return ParseScalarInit (T); + case T_VOID: if (IS_Get (&Standard) == STD_CC65) { /* Special cc65 extension in non-ANSI mode */