OSDN Git Service

compiler: Better error messages for single- and multiple- value.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Sep 2012 22:11:36 +0000 (22:11 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Sep 2012 22:11:36 +0000 (22:11 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@191622 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 06f0369..3d542ea 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 ebf2ed9..a03d265 100644 (file)
@@ -430,7 +430,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:
@@ -636,8 +636,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;
        }
     }