diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-08-25 23:05:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-08-25 23:05:15 +0000 |
commit | fd1b493945637c44444f4a079dc35254da5cdd60 (patch) | |
tree | d2fa1a124c46aa09c738f54b9b979d58b2c0b374 | |
parent | de26e2393aec04a14dd98fb7eb87214b73da6a81 (diff) | |
download | gcc-fd1b493945637c44444f4a079dc35254da5cdd60.zip gcc-fd1b493945637c44444f4a079dc35254da5cdd60.tar.gz gcc-fd1b493945637c44444f4a079dc35254da5cdd60.tar.bz2 |
compiler: Disallow use of unary ^ on booleans.
Fixes golang/go#11529.
Reviewed-on: https://go-review.googlesource.com/13790
From-SVN: r227201
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index c30efd9..ff77fd1 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index f1873cd..c9323f5 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -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: |