compiler: Disallow use of unary ^ on booleans.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 25 Aug 2015 23:05:15 +0000 (23:05 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 25 Aug 2015 23:05:15 +0000 (23:05 +0000)
    Fixes golang/go#11529.

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

From-SVN: r227201

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

index c30efd919ecee9575b784bca467b1897f2e6cfc9..ff77fd1e82e25be49700732a25afec68ed7a66c3 100644 (file)
@@ -1,4 +1,4 @@
-f97d579fa8431af5cfde9b0a48604caabfd09377
+d5e6af4e6dd456075a1ec1c03d0dc41cbea5eb36
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index f1873cd396c3f141714dab2dfe5f4607fc9472c0..c9323f5625d5f2f17ee4d8f2bd300d34aff9f203 100644 (file)
@@ -3943,9 +3943,8 @@ Unary_expression::do_check_types(Gogo*)
       break;
 
     case OPERATOR_XOR:
-      if (type->integer_type() == NULL
-         && !type->is_boolean_type())
-       this->report_error(_("expected integer or boolean type"));
+      if (type->integer_type() == NULL)
+       this->report_error(_("expected integer"));
       break;
 
     case OPERATOR_AND: