From 225c40c9145118d3865b6f7380ebe1e61dd11c4e Mon Sep 17 00:00:00 2001 From: johanknol Date: Tue, 9 Oct 2001 12:12:51 +0000 Subject: [PATCH] int=32 but short=16 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1381 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCval.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SDCCval.c b/src/SDCCval.c index 911cbf35..fe15c800 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -1435,15 +1435,15 @@ valCastLiteral (sym_link * dtype, double fval) { if (SPEC_USIGN (val->etype)) if (SPEC_NOUN (val->etype)==V_CHAR) { - SPEC_CVAL (val->etype).v_uint = (unsigned char) fval; + SPEC_CVAL (val->etype).v_uint = (unsigned char)fval; } else { - SPEC_CVAL (val->etype).v_uint = (unsigned int) fval; + SPEC_CVAL (val->etype).v_uint = (unsigned short)fval; } else if (SPEC_NOUN (val->etype)==V_CHAR) { - SPEC_CVAL (val->etype).v_int = (char) fval; + SPEC_CVAL (val->etype).v_int = (char)fval; } else { - SPEC_CVAL (val->etype).v_int = (int) fval; + SPEC_CVAL (val->etype).v_int = (short)fval; } } } -- 2.30.2