mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Improved incomplete enum typed diagnostics.
This commit is contained in:
parent
0d53806490
commit
fe3f726fd6
@ -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:
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user