diff options
author | Russ Cox <rsc@golang.org> | 2014-09-16 09:58:17 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-09-16 09:58:17 -0400 |
commit | 5560be89ea0ef280ce0ff547e50ced11059682d7 (patch) | |
tree | 3c9443ac1f11f7b626d11b41fcf732c5c5c13016 /src/cmd | |
parent | 098282cf4c91c0e85997633520bec4aed8766044 (diff) | |
download | go-5560be89ea0ef280ce0ff547e50ced11059682d7.tar.gz |
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://codereview.appspot.com/143940043
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/gc/gen.c | 2 | ||||
-rw-r--r-- | src/cmd/gc/walk.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/gc/gen.c b/src/cmd/gc/gen.c index 86acd8825..83c46c650 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 a30fa62a6..713348c0c 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)); |