compiler: Remove unnecessary check for GCC-specific issue.
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 20 Jul 2015 16:47:24 +0000 (16:47 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 20 Jul 2015 16:47:24 +0000 (16:47 +0000)
    Reviewed-on: https://go-review.googlesource.com/11800

    compiler: remove name of unused parameter to avoid warning

    Reviewed-on: https://go-review.googlesource.com/12367

From-SVN: r226007

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc

index 9a5a2f9df5044400b0ca2fcdf4acb0b59cf64c9a..1b1e3cdc04548dff54cebe4b2e977bf8995e0fbd 100644 (file)
@@ -1,4 +1,4 @@
-2c985e4781691fea3eb4171de85265bfbc4e4997
+19ff97ed3eb07d902bc4b3f97b21c4b6df834ad2
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 76b83286c0922fec7f945894e43b1705d1348e6b..23511292e5b86e5f5e1f7686dca46ecb9bb0e67a 100644 (file)
@@ -133,7 +133,7 @@ Expression::determine_type_no_context()
 // assignment.
 
 Expression*
-Expression::convert_for_assignment(Gogo* gogo, Type* lhs_type,
+Expression::convert_for_assignment(Gogo*, Type* lhs_type,
                                   Expression* rhs, Location location)
 {
   Type* rhs_type = rhs->type();
@@ -177,17 +177,6 @@ Expression::convert_for_assignment(Gogo* gogo, Type* lhs_type,
            || (lhs_type->array_type() != NULL
                && rhs_type->array_type() != NULL))
     {
-      // Avoid confusion from zero sized variables which may be
-      // represented as non-zero-sized.
-      // TODO(cmang): This check is for a GCC-specific issue, and should be
-      // removed from the frontend.  FIXME.
-      int64_t lhs_size =
-       gogo->backend()->type_size(lhs_type->get_backend(gogo));
-      int64_t rhs_size =
-       gogo->backend()->type_size(rhs_type->get_backend(gogo));
-      if (rhs_size == 0 || lhs_size == 0)
-       return rhs;
-
       // This conversion must be permitted by Go, or we wouldn't have
       // gotten here.
       return Expression::make_unsafe_cast(lhs_type, rhs, location);