From: Ken Thompson Date: Thu, 11 Sep 2008 22:44:45 +0000 (-0700) Subject: function wo return is an error - not warning X-Git-Tag: weekly.2009-11-06~3237 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ff65872fbfebf292ca0067a00b7879d98472f5b8;p=gostls13.git function wo return is an error - not warning R=r OCL=15169 CL=15169 --- diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index abb7ce0bd8..8850867db7 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -54,7 +54,7 @@ walk(Node *fn) } if(curfn->type->outtuple) if(walkret(curfn->nbody)) - warn("function ends without a return statement"); + yyerror("function ends without a return statement"); walkstate(curfn->nbody); if(debug['W']) { snprint(s, sizeof(s), "after %S", curfn->nname->sym);