Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: src/cmd/gc/select.c

Issue 1871057: code review 1871057: gc: empty select (Closed)
Patch Set: code review 1871057: gc: empty select Created 14 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pkg/runtime/chan.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/gc/select.c
===================================================================
--- a/src/cmd/gc/select.c
+++ b/src/cmd/gc/select.c
@@ -68,8 +68,6 @@
typechecklist(ncase->nbody, Etop);
}
sel->xoffset = count;
- if(count == 0)
- yyerror("empty select");
lineno = lno;
}
@@ -91,7 +89,7 @@
typecheck(&r, Etop);
init = list(init, r);
- if(sel->list == nil)
+ if(sel->list == nil && sel->xoffset != 0)
fatal("double walkselect"); // already rewrote
// register cases
« no previous file with comments | « no previous file | src/pkg/runtime/chan.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b