1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-15 02:29:32 +00:00

Improved incomplete enum typed diagnostics.

This commit is contained in:
acqn 2020-08-08 07:04:29 +08:00 committed by Oliver Schmidt
parent 0d53806490
commit fe3f726fd6
2 changed files with 7 additions and 1 deletions

View File

@ -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:

View File

@ -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 */