From 78404dfb84a70bbbe0134e3aa63038c9b4cd146e Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 19 Feb 2014 15:50:50 -0500 Subject: [PATCH] cmd/gc: fix printf format in typecheck.c There are probably more of these, but bound and len are 64 bits so use %lld in message about array index out of bounds. Fixes the 386 build. LGTM=bradfitz, rsc R=rsc, bradfitz CC=golang-codereviews, rickarnoldjr https://golang.org/cl/66110043 --- src/cmd/gc/typecheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/typecheck.c b/src/cmd/gc/typecheck.c index 6b5ad81886..ac2e8a4559 100644 --- a/src/cmd/gc/typecheck.c +++ b/src/cmd/gc/typecheck.c @@ -2503,7 +2503,7 @@ typecheckcomplit(Node **np) len = i; if(t->bound >= 0 && len > t->bound) { setlineno(l); - yyerror("array index %d out of bounds [0:%d]", len-1, t->bound); + yyerror("array index %lld out of bounds [0:%lld]", len-1, t->bound); t->bound = -1; // no more errors } } -- 2.48.1