aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index 0937883..9076da5 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -2441,6 +2441,8 @@ static void gen_assign_cast(CType *dt)
if (sbt == VT_PTR || sbt == VT_FUNC) {
tcc_warning("assignment makes integer from pointer without a cast");
}
+ if (sbt == VT_STRUCT)
+ goto error;
/* XXX: more tests */
break;
case VT_STRUCT: