Fix implicit cast to float
commit801c6d64cae47d0c7ffc55c53a0f3c599bc0dcaf
authorThomas Schmid <Thomas.Schmid@br-automation.com>
Fri, 6 Feb 2009 12:51:34 +0000 (6 12:51 +0000)
committerChristopher Li <sparse@chrisli.org>
Fri, 17 Jul 2009 23:06:22 +0000 (17 23:06 +0000)
tree71b3020dd5aafcc6c66898923d70bd56f0dd5ea7
parentc121815ecdcefdb735e92fae6ba9eedca88fe289
Fix implicit cast to float

Was:Re: Initializing float variables without type suffix)

> cast_to() seems fine.
>
> In expanding stage, cast_value() did not cast the constant
> correctly.

You're right, I also noticed this in the meantime.

The decision, whether newtype is int_type or fp_type is not made
correctly.

The following patch seems to work:

Fix implicit cast to float

Patch modified by Chris.

Signed-Off-By: Thomas Schmid <Thomas.Schmid@br-automation.com>
Signed-Off-By: Christopher Li <sparse@chrisli.org>
evaluate.c
expand.c
symbol.h