Improved incomplete enum typed diagnostics.
This commit is contained in:
@@ -976,7 +976,7 @@ unsigned TypeOf (const Type* T)
|
|||||||
|
|
||||||
case T_ENUM:
|
case T_ENUM:
|
||||||
/* Incomplete enum type */
|
/* Incomplete enum type */
|
||||||
Error ("Incomplete enum type");
|
Error ("Incomplete type '%s'", GetFullTypeName (T));
|
||||||
return CF_INT;
|
return CF_INT;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -2543,6 +2543,12 @@ static unsigned ParseInitInternal (Type* T, int *Braces, int AllowFlexibleMember
|
|||||||
case T_UNION:
|
case T_UNION:
|
||||||
return ParseStructInit (T, Braces, AllowFlexibleMembers);
|
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:
|
case T_VOID:
|
||||||
if (IS_Get (&Standard) == STD_CC65) {
|
if (IS_Get (&Standard) == STD_CC65) {
|
||||||
/* Special cc65 extension in non-ANSI mode */
|
/* Special cc65 extension in non-ANSI mode */
|
||||||
|
|||||||
Reference in New Issue
Block a user