projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small fix for constant range check
[fw/sdcc]
/
src
/
SDCCicode.c
diff --git
a/src/SDCCicode.c
b/src/SDCCicode.c
index ea4f48d5cab440e51eddf7a1b91bce73fdc8d5fd..44403c9f610f3176216d7b4c9165eb84aeea001c 100644
(file)
--- a/
src/SDCCicode.c
+++ b/
src/SDCCicode.c
@@
-2394,7
+2394,7
@@
geniCodeLogic (operand * left, operand * right, int op)
int nbits = bitsForType (ltype);
long v = (long) operandLitValue (right);
int nbits = bitsForType (ltype);
long v = (long) operandLitValue (right);
- if (v > ((LONG_LONG) 1 << nbits) && v > 0)
+ if (v >
=
((LONG_LONG) 1 << nbits) && v > 0)
werror (W_CONST_RANGE, " compare operation ");
}
werror (W_CONST_RANGE, " compare operation ");
}
@@
-2490,7
+2490,7
@@
geniCodeAssign (operand * left, operand * right, int nosupdate)
int nbits = bitsForType (ltype);
long v = (long) operandLitValue (right);
int nbits = bitsForType (ltype);
long v = (long) operandLitValue (right);
- if (v > ((LONG_LONG) 1 << nbits) && v > 0)
+ if (v >
=
((LONG_LONG) 1 << nbits) && v > 0)
werror (W_CONST_RANGE, " = operation");
}
werror (W_CONST_RANGE, " = operation");
}