aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-16 09:58:17 -0400
committerRuss Cox <rsc@golang.org>2014-09-16 09:58:17 -0400
commit337fe4134fe733377db6025d67cfe01a9608099a (patch)
treea750948b8f191590192e4080053960ce7eafa0be /src
parentc3dbf56a14e8d9dffab7330c203a82a66cf9722e (diff)
downloadgo-337fe4134fe733377db6025d67cfe01a9608099a.tar.xz
cmd/gc: make runtime escape an error, not a fatal error
It is more useful to report all the errors instead of just the first. LGTM=dave, khr R=khr, dave CC=golang-codereviews https://golang.org/cl/143940043
Diffstat (limited to 'src')
-rw-r--r--src/cmd/gc/gen.c2
-rw-r--r--src/cmd/gc/walk.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/gc/gen.c b/src/cmd/gc/gen.c
index 86acd88259..83c46c6504 100644
--- a/src/cmd/gc/gen.c
+++ b/src/cmd/gc/gen.c
@@ -585,7 +585,7 @@ cgen_dcl(Node *n)
if(!(n->class & PHEAP))
return;
if(compiling_runtime)
- fatal("%N escapes to heap, not allowed in runtime.", n);
+ yyerror("%N escapes to heap, not allowed in runtime.", n);
if(n->alloc == nil)
n->alloc = callnew(n->type);
cgen_as(n->heapaddr, n->alloc);
diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c
index a30fa62a6b..713348c0c0 100644
--- a/src/cmd/gc/walk.c
+++ b/src/cmd/gc/walk.c
@@ -2505,7 +2505,7 @@ paramstoheap(Type **argin, int out)
// generate allocation & copying code
if(compiling_runtime)
- fatal("%N escapes to heap, not allowed in runtime.", v);
+ yyerror("%N escapes to heap, not allowed in runtime.", v);
if(v->alloc == nil)
v->alloc = callnew(v->type);
nn = list(nn, nod(OAS, v->heapaddr, v->alloc));