cast_value: remove error-prone redundant argument

The last two arguments of cast_value() are the old expression and
the oldtype which suggest that this oldtype can be distinct from the
type of the old expression.

But this is not the case because internally the type used to retrieve
the value of the expression is the type of the expression itself (old->ctype)
the type which is used and the two types must be the same (or at least
be equivalent).

So, remove the error-prone last argument and always us the type of the
expression itself.

Signed-off-by: Luc Van Oostenryck <>
4 files changed