From: Ian Lance Taylor Date: Fri, 21 Sep 2012 22:11:24 +0000 (+0000) Subject: compiler: Better error messages for single- and multiple- value. X-Git-Tag: misc/gccgo-go1_1_2~698 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=222d4beb8643b9a26405508c852f6f584d6979cc;p=thirdparty%2Fgcc.git compiler: Better error messages for single- and multiple- value. From-SVN: r191621 --- diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 06f0369b2eb6..3d542eae058e 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -4224,7 +4224,7 @@ Variable::determine_type() else if (type->is_call_multiple_result_type()) { error_at(this->location_, - "single variable set to multiple value function call"); + "single variable set to multiple-value function call"); type = Type::make_error_type(); } diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 16ff75058765..666192025edf 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -421,7 +421,7 @@ Type::are_identical(const Type* t1, const Type* t2, bool errors_are_identical, case TYPE_CALL_MULTIPLE_RESULT: if (reason != NULL) - *reason = "invalid use of multiple value function call"; + *reason = "invalid use of multiple-value function call"; return false; default: @@ -627,8 +627,8 @@ Type::are_assignable_check_hidden(const Type* lhs, const Type* rhs, if (rhs->is_call_multiple_result_type()) { if (reason != NULL) - reason->assign(_("multiple value function call in " - "single value context")); + reason->assign(_("multiple-value function call in " + "single-value context")); return false; } }