diff options
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2258,6 +2258,8 @@ static void gen_assign_cast(CType *dt) st = &vtop->type; /* source type */ dbt = dt->t & VT_BTYPE; sbt = st->t & VT_BTYPE; + if (sbt == VT_VOID) + tcc_error("Cannot assign void value"); if (dt->t & VT_CONSTANT) tcc_warning("assignment of read-only location"); switch(dbt) { |
