aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 21:39:40 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 21:39:40 +0000
commit3870e7a5da2125d7be402a7b7b4d3749d7e245d5 (patch)
tree8f92706d978459ee27b34a5b563163ddf5f9c537
parent89ca9e60205b72cc77abf5ca085f088dbe69a58f (diff)
downloadgcc-3870e7a5da2125d7be402a7b7b4d3749d7e245d5.zip
gcc-3870e7a5da2125d7be402a7b7b4d3749d7e245d5.tar.gz
gcc-3870e7a5da2125d7be402a7b7b4d3749d7e245d5.tar.bz2
Add statements to type switch even if there are no valid types.
From-SVN: r167874
-rw-r--r--gcc/go/gofrontend/parse.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc
index ef63754..29ea7e9 100644
--- 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"