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

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

Issue 9033043: code review 9033043: cmd/gc: fix some overflows in the compiler (Closed)
Patch Set: diff -r 3cbb458c93cf https://code.google.com/p/go/ Created 11 years, 10 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 | « src/cmd/gc/subr.c ('k') | src/cmd/gc/typecheck.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/gc/swt.c
===================================================================
--- a/src/cmd/gc/swt.c
+++ b/src/cmd/gc/swt.c
@@ -358,6 +358,8 @@
c = c1;
ord++;
+ if((uint16)ord != ord)
+ fatal("too many cases in switch");
c->ordinal = ord;
c->node = n;
« no previous file with comments | « src/cmd/gc/subr.c ('k') | src/cmd/gc/typecheck.c » ('j') | no next file with comments »

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