]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
compiler: Better error messages for single- and multiple- value.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 21 Sep 2012 22:11:24 +0000 (22:11 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 21 Sep 2012 22:11:24 +0000 (22:11 +0000)
From-SVN: r191621

gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/types.cc

index 06f0369b2eb62a0e9a075c03ecde60073b271bce..3d542eae058e7298d14cd25652040dd2b21e504e 100644 (file)
@@ -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();
            }
 
index 16ff7505876513b542d5ff22229608ff9110bd1d..666192025edf68ada78333b5c5007b35a0e8956f 100644 (file)
@@ -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;
        }
     }