aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tccgen.c b/tccgen.c
index 8355aae..f23cd07 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -309,7 +309,7 @@ static void vsetc(CType *type, int r, CValue *vc)
int v;
if (vtop >= vstack + (VSTACK_SIZE - 1))
- tcc_error("memory full");
+ tcc_error("memory full (vstack)");
/* cannot let cpu flags if other instruction are generated. Also
avoid leaving VT_JMP anywhere except on the top of the stack
because it would complicate the code generator. */
@@ -483,7 +483,7 @@ ST_FUNC void vswap(void)
ST_FUNC void vpushv(SValue *v)
{
if (vtop >= vstack + (VSTACK_SIZE - 1))
- tcc_error("memory full");
+ tcc_error("memory full (vstack)");
vtop++;
*vtop = *v;
}
@@ -2348,8 +2348,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 (sbt == VT_VOID || dbt == VT_VOID)
+ tcc_error("cannot cast from/to void");
if (dt->t & VT_CONSTANT)
tcc_warning("assignment of read-only location");
switch(dbt) {