OSDN Git Service

Permit new of a function type.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 May 2011 19:56:39 +0000 (19:56 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 May 2011 19:56:39 +0000 (19:56 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173672 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/expressions.cc

index 005173b..c7b8ca0 100644 (file)
@@ -10624,9 +10624,6 @@ class Allocation_expression : public Expression
   do_determine_type(const Type_context*)
   { }
 
-  void
-  do_check_types(Gogo*);
-
   Expression*
   do_copy()
   { return new Allocation_expression(this->type_, this->location()); }
@@ -10639,15 +10636,6 @@ class Allocation_expression : public Expression
   Type* type_;
 };
 
-// Check the type of an allocation expression.
-
-void
-Allocation_expression::do_check_types(Gogo*)
-{
-  if (this->type_->function_type() != NULL)
-    this->report_error(_("invalid new of function type"));
-}
-
 // Return a tree for an allocation expression.
 
 tree