summaryrefslogtreecommitdiff
path: root/src/cmd/gc/const.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-12 13:59:02 -0800
committerRuss Cox <rsc@golang.org>2010-02-12 13:59:02 -0800
commit204981ee3318598e010e0b2f767de1dec48371c9 (patch)
tree89800386c58ed35c132637ac1a81c8c10c6e996b /src/cmd/gc/const.c
parent59755ed0298917529a72310b09a4061de7fd8f13 (diff)
downloadgolang-204981ee3318598e010e0b2f767de1dec48371c9.tar.gz
gc: diagnose invalid array bounds
Fixes issue 587. R=ken2 CC=golang-dev http://codereview.appspot.com/207085
Diffstat (limited to 'src/cmd/gc/const.c')
-rw-r--r--src/cmd/gc/const.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cmd/gc/const.c b/src/cmd/gc/const.c
index a78c122fe..d541c60c5 100644
--- a/src/cmd/gc/const.c
+++ b/src/cmd/gc/const.c
@@ -6,9 +6,7 @@
#define TUP(x,y) (((x)<<16)|(y))
static Val toflt(Val);
-static Val toint(Val);
static Val tostr(Val);
-static void overflow(Val, Type*);
static Val copyval(Val);
/*
@@ -236,7 +234,7 @@ toflt(Val v)
return v;
}
-static Val
+Val
toint(Val v)
{
Mpint *i;
@@ -251,7 +249,7 @@ toint(Val v)
return v;
}
-static void
+void
overflow(Val v, Type *t)
{
// v has already been converted