diff dmd/optimize.c @ 305:2b72433d5c8c trunk

[svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support. Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its Identifier, which should be useful elsewhere too. Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
author lindquist
date Fri, 27 Jun 2008 22:04:35 +0200
parents 61615fa85940
children aaade6ded589
line wrap: on
line diff
--- a/dmd/optimize.c	Wed Jun 25 23:42:38 2008 +0200
+++ b/dmd/optimize.c	Fri Jun 27 22:04:35 2008 +0200
@@ -234,7 +234,7 @@
 		TypeSArray *ts = (TypeSArray *)ve->type;
 		integer_t dim = ts->dim->toInteger();
 		if (index < 0 || index >= dim)
-		    error("array index %jd is out of bounds [0..%jd]", index, dim);
+		    error("array index %lld is out of bounds [0..%lld]", index, dim);
 		e = new SymOffExp(loc, ve->var, index * ts->next->size());
 		e->type = type;
 		return e;
@@ -380,7 +380,8 @@
 	    integer_t i2 = e2->toInteger();
 	    d_uns64 sz = e1->type->size() * 8;
 	    if (i2 < 0 || i2 > sz)
-	    {   error("shift assign by %jd is outside the range 0..%zu", i2, sz);
+	    {
+        error("shift assign by %lld is outside the range 0..%"PRIuSIZE, i2, sz);
 		e2 = new IntegerExp(0);
 	    }
 	}
@@ -475,7 +476,8 @@
 	integer_t i2 = e->e2->toInteger();
 	d_uns64 sz = e->e1->type->size() * 8;
 	if (i2 < 0 || i2 > sz)
-	{   error("shift by %jd is outside the range 0..%zu", i2, sz);
+	{
+        error("shift by %lld is outside the range 0..%"PRIuSIZE, i2, sz);
 	    e->e2 = new IntegerExp(0);
 	}
 	if (e->e1->isConst() == 1)