]> git.gag.com Git - fw/sdcc/blobdiff - src/SDCCicode.c
%lf doesn't recognize 0x1234
[fw/sdcc] / src / SDCCicode.c
index 62b3a119b11e94d8141a84a725a0f57bac9940f2..0caa5b2f9643a03d7bfa94523173ded256709600 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "common.h"
 #include "newalloc.h"
+#include "math.h"
 
 /*-----------------------------------------------------------------*/
 /* global variables       */
@@ -41,12 +42,6 @@ int scopeLevel;
 symbol *returnLabel;           /* function return label */
 symbol *entryLabel;            /* function entry  label */
 
-#if defined(__BORLANDC__) || defined(_MSC_VER)
-#define LONG_LONG __int64
-#else
-#define LONG_LONG long long
-#endif
-
 /*-----------------------------------------------------------------*/
 /* forward definition of some functions */
 operand *geniCodeDivision (operand *, operand *);
@@ -132,12 +127,14 @@ iCodeTable codeTable[] =
 */
 
 void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) {
-  LONG_LONG max = (LONG_LONG) 1 << bitsForType(ltype);
+  double max;
   char message[132]="";
   int warnings=0;
   int negative=0;
   long v;
 
+  max = pow ((double)2.0, (double)bitsForType(ltype));
+
   if (SPEC_LONG(val->type)) {
     v=SPEC_CVAL(val->type).v_long;
   } else {