summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-08 21:03:47 +0200
committerAraq <rumpf_a@web.de>2012-07-08 21:03:47 +0200
commit4fbba0a65ad310ba9498f1cf9f79eb0826b19f81 (patch)
treedece3596fbdf153263f5672b4011139f70a4df6a /compiler/ccgexprs.nim
parent36247e0947699a56d5bc51d48188b6dda1815587 (diff)
downloadNim-4fbba0a65ad310ba9498f1cf9f79eb0826b19f81.tar.gz
changed integer promotion rules; breaks bootstrapping and lots of code
Diffstat (limited to 'compiler/ccgexprs.nim')
-rwxr-xr-xcompiler/ccgexprs.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 1e1bf8072..78a107bbb 100755
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1037,8 +1037,9 @@ proc genRepr(p: BProc, e: PNode, d: var TLoc) =
   InitLocExpr(p, e.sons[1], a)
   var t = skipTypes(e.sons[1].typ, abstractVarRange)
   case t.kind
-  of tyInt..tyInt64:
-    putIntoDest(p, d, e.typ, ropecg(p.module, "#reprInt($1)", [rdLoc(a)]))
+  of tyInt..tyInt64, tyUInt..tyUInt64:
+    putIntoDest(p, d, e.typ, 
+                ropecg(p.module, "#reprInt((NI64)$1)", [rdLoc(a)]))
   of tyFloat..tyFloat128:
     putIntoDest(p, d, e.typ, ropecg(p.module, "#reprFloat($1)", [rdLoc(a)]))
   of tyBool: