a ppc endian fix
[fw/sdcc] / src / SDCCicode.c
index 0adff9fbe2ad7778f8e4e96716570cbabd115a75..62b3a119b11e94d8141a84a725a0f57bac9940f2 100644 (file)
@@ -136,7 +136,14 @@ void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) {
   char message[132]="";
   int warnings=0;
   int negative=0;
-  long v=SPEC_CVAL(val->type).v_long;
+  long v;
+
+  if (SPEC_LONG(val->type)) {
+    v=SPEC_CVAL(val->type).v_long;
+  } else {
+    v=SPEC_CVAL(val->type).v_int;
+  }
+
 
 #if 0
   // this could be a good idea