From d7d830fa295b940b75fd64ba8297d00f2a24b2fc Mon Sep 17 00:00:00 2001 From: johanknol Date: Tue, 25 Sep 2001 13:10:28 +0000 Subject: [PATCH] small improvements :( git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1310 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCicode.c | 4 ++-- src/ds390/gen.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SDCCicode.c b/src/SDCCicode.c index aa4af9c2..94c0a3e9 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -131,7 +131,7 @@ iCodeTable codeTable[] = pedantic>1: "char c=200" is not allowed (evaluates to -56) */ -void checkConstantRange(sym_link *ltype, long v, char *msg, int pedantic) { +void checkConstantRange(sym_link *ltype, double v, char *msg, int pedantic) { LONG_LONG max = (LONG_LONG) 1 << bitsForType(ltype); char message[132]=""; int warnings=0; @@ -2548,7 +2548,7 @@ geniCodeAssign (operand * left, operand * right, int nosupdate) if (IS_INTEGRAL (ltype) && right->type == VALUE && IS_LITERAL (rtype)) { checkConstantRange(ltype, - (long)operandLitValue(right), "= operation", 0); + operandLitValue(right), "= operation", 0); } /* if the left & right type don't exactly match */ diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 38c748e7..44699fdd 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -9491,8 +9491,7 @@ genAssign (iCode * ic) goto release; /* if the result is a bit */ - // if (AOP_TYPE (result) == AOP_CRY) /* works only for true symbols */ - if (IS_BITVAR(OP_SYMBOL(result)->type)) + if (AOP_TYPE (result) == AOP_CRY) /* works only for true symbols */ { /* if the right size is a literal then we know what the value is */ @@ -9624,7 +9623,8 @@ genCast (iCode * ic) aopOp (result, ic, FALSE, AOP_TYPE (right) == AOP_DPTR); /* if the result is a bit */ - if (AOP_TYPE (result) == AOP_CRY) + // if (AOP_TYPE (result) == AOP_CRY) /* works only for true symbols */ + if (IS_BITVAR(OP_SYMBOL(result)->type)) { /* if the right size is a literal then we know what the value is */ -- 2.47.2