diff --git a/src/cc65/assignment.c b/src/cc65/assignment.c index 6acab3fe8..633083669 100644 --- a/src/cc65/assignment.c +++ b/src/cc65/assignment.c @@ -156,6 +156,11 @@ void Assignment (ExprDesc* Expr) Error ("Assignment to const"); } + /* Check for assignment to incomplete type */ + if (IsIncompleteESUType (ltype)) { + Error ("Assignment to incomplete type '%s'", GetFullTypeName (ltype)); + } + /* Skip the '=' token */ NextToken ();