diff dmd/constfold.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 3cfcb944304e
children aaade6ded589
line wrap: on
line diff
--- a/dmd/constfold.c	Wed Jun 25 23:42:38 2008 +0200
+++ b/dmd/constfold.c	Fri Jun 27 22:04:35 2008 +0200
@@ -1160,7 +1160,7 @@
 	uinteger_t i = e2->toInteger();
 
 	if (i >= es1->len)
-	    e1->error("string index %ju is out of bounds [0 .. %zu]", i, es1->len);
+        e1->error("string index %llu is out of bounds [0 .. %"PRIuSIZE"]", i, es1->len);
 	else
 	{   unsigned value = es1->charAt(i);
 	    e = new IntegerExp(loc, value, type);
@@ -1172,7 +1172,8 @@
 	uinteger_t i = e2->toInteger();
 
 	if (i >= length)
-	{   e2->error("array index %ju is out of bounds %s[0 .. %ju]", i, e1->toChars(), length);
+	{
+        e2->error("array index %llu is out of bounds %s[0 .. %llu]", i, e1->toChars(), length);
 	}
 	else if (e1->op == TOKarrayliteral && !e1->checkSideEffect(2))
 	{   ArrayLiteralExp *ale = (ArrayLiteralExp *)e1;
@@ -1187,7 +1188,8 @@
 	if (e1->op == TOKarrayliteral && !e1->checkSideEffect(2))
 	{   ArrayLiteralExp *ale = (ArrayLiteralExp *)e1;
 	    if (i >= ale->elements->dim)
-	    {   e2->error("array index %ju is out of bounds %s[0 .. %u]", i, e1->toChars(), ale->elements->dim);
+	    {
+            e2->error("array index %llu is out of bounds %s[0 .. %u]", i, e1->toChars(), ale->elements->dim);
 	    }
 	    else
 	    {	e = (Expression *)ale->elements->data[i];
@@ -1237,7 +1239,7 @@
 	uinteger_t iupr = upr->toInteger();
 
 	if (iupr > es1->len || ilwr > iupr)
-	    e1->error("string slice [%ju .. %ju] is out of bounds", ilwr, iupr);
+        e1->error("string slice [%llu .. %llu] is out of bounds", ilwr, iupr);
 	else
 	{   integer_t value;
 	    void *s;
@@ -1264,7 +1266,7 @@
 	uinteger_t iupr = upr->toInteger();
 
 	if (iupr > es1->elements->dim || ilwr > iupr)
-	    e1->error("array slice [%ju .. %ju] is out of bounds", ilwr, iupr);
+        e1->error("array slice [%llu .. %llu] is out of bounds", ilwr, iupr);
 	else
 	{
 	    Expressions *elements = new Expressions();