summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 22:42:30 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 22:42:30 +0000
commit73487f1ebc9ea83725076c7e95b6afbca56e54f4 (patch)
treeaf3a72490347cd578163039081077647535cdf3f /gcc
parent97d2b658622fb09c02d5ae58b10f94d839640b8a (diff)
downloadgcc-73487f1ebc9ea83725076c7e95b6afbca56e54f4.tar.gz
Tweak handling of invalid function signature for function literal.
From-SVN: r167879
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/parse.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc
index 29ea7e9afa9..a0d87dc8c6a 100644
--- a/gcc/go/gofrontend/parse.cc
+++ b/gcc/go/gofrontend/parse.cc
@@ -2513,10 +2513,7 @@ Parse::function_lit()
Function_type* type = this->signature(NULL, location);
if (type == NULL)
- {
- this->block();
- return Expression::make_error(location);
- }
+ type = Type::make_function_type(NULL, NULL, NULL, location);
// For a function literal, the next token must be a '{'. If we
// don't see that, then we may have a type expression.