projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89ca9e6
)
Add statements to type switch even if there are no valid types.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 15 Dec 2010 21:39:40 +0000
(21:39 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 15 Dec 2010 21:39:40 +0000
(21:39 +0000)
From-SVN: r167874
gcc/go/gofrontend/parse.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/parse.cc
b/gcc/go/gofrontend/parse.cc
index ef63754dc8e493e8cb7eb571093c68e0739b4f78..29ea7e9afa9b1bfef2120aee6ab76648da7b0228 100644
(file)
--- a/
gcc/go/gofrontend/parse.cc
+++ b/
gcc/go/gofrontend/parse.cc
@@
-3982,6
+3982,8
@@
Parse::type_case_clause(Named_object* switch_no, Type_case_clauses* clauses)
clauses->add(*p, true, false, NULL, location);
clauses->add(types.back(), false, false, statements, location);
}
+ else
+ clauses->add(Type::make_error_type(), false, false, statements, location);
}
// TypeSwitchCase = "case" type | "default"