From: Ian Lance Taylor Date: Thu, 4 Aug 2011 04:08:29 +0000 (+0000) Subject: re PR go/49889 (Calling a function whose name is obscured by a local variable does... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=22508caed3ac82df7826ca23e9dd8ad0e3474cc7;p=gcc.git re PR go/49889 (Calling a function whose name is obscured by a local variable does not produce an error) PR go/49889 gccgo : Fixed bug 49889. Now the compiler emits a proper error when a function called in a tuple assignment statement can not be typed as a function. From-SVN: r177310 --- diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index fbd716ab8e9..8053456ef3b 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9682,6 +9682,8 @@ Call_result_expression::do_type() Function_type* fntype = ce->get_function_type(); if (fntype == NULL) { + if (ce->issue_error()) + this->report_error(_("expected function")); this->set_is_error(); return Type::make_error_type(); }