From 222d4beb8643b9a26405508c852f6f584d6979cc Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 21 Sep 2012 22:11:24 +0000 Subject: compiler: Better error messages for single- and multiple- value. From-SVN: r191621 --- gcc/go/gofrontend/gogo.cc | 2 +- gcc/go/gofrontend/types.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/go') diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 06f0369..3d542ea 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 16ff750..6661920 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; } } -- cgit v1.1