From 8d225c32b194f1bb3e2c1606ec55b41b3eca6c76 Mon Sep 17 00:00:00 2001 From: acqn Date: Sat, 22 Aug 2020 05:57:12 +0800 Subject: [PATCH] Fixed checks on assignment to incomplete types. --- src/cc65/assignment.c | 5 +++++ 1 file changed, 5 insertions(+) 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 ();