From: Ian Lance Taylor Date: Wed, 15 Dec 2010 21:39:40 +0000 (+0000) Subject: Add statements to type switch even if there are no valid types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3870e7a5da2125d7be402a7b7b4d3749d7e245d5;p=gcc.git Add statements to type switch even if there are no valid types. From-SVN: r167874 --- diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index ef63754dc8e..29ea7e9afa9 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"