aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorbellard <bellard>2003-06-02 20:32:30 +0000
committerbellard <bellard>2003-06-02 20:32:30 +0000
commit21d2d99bdc115e1a1944bc0dff9d487103f5799f (patch)
tree4803d2227bf0bb65252d268057f1f16822f0b73b /tcc.c
parent277e01cd643af71bd6e962f303747f7857ca23c1 (diff)
downloadtinycc-21d2d99bdc115e1a1944bc0dff9d487103f5799f.tar.gz
tinycc-21d2d99bdc115e1a1944bc0dff9d487103f5799f.tar.bz2
suppressed warning for const function parameters
Diffstat (limited to 'tcc.c')
-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);
}
}