]> git.gag.com Git - fw/sdcc/commitdiff
int=32 but short=16
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 9 Oct 2001 12:12:51 +0000 (12:12 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 9 Oct 2001 12:12:51 +0000 (12:12 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1381 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCval.c

index 911cbf35db46598ae356eaa86f4f48034e37c1e8..fe15c800b49c63a17e1813aa53fad01ed426fd42 100644 (file)
@@ -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;
            }
        }
     }