aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tcc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcc.c b/tcc.c
index 16920eb..3da2068 100644
--- a/tcc.c
+++ b/tcc.c
@@ -6581,7 +6581,9 @@ static void gfunc_param_typed(Sym *func, Sym *arg)
} else if (arg == NULL) {
error("too many arguments to function");
} else {
- gen_assign_cast(&arg->type);
+ type = arg->type;
+ type.t &= ~VT_CONSTANT; /* need to do that to avoid false warning */
+ gen_assign_cast(&type);
}
}