aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2019-10-11 19:18:13 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2019-10-11 19:18:13 +0000
commit436103a09831b2924d3262c13a17da530f90da92 (patch)
tree3822df6c171320b873c424d26b71dfd5f44d7839
parente0365bd388bac7641e1767222b9ddc683dbf057a (diff)
downloadgcc-436103a09831b2924d3262c13a17da530f90da92.zip
gcc-436103a09831b2924d3262c13a17da530f90da92.tar.gz
gcc-436103a09831b2924d3262c13a17da530f90da92.tar.bz2
typeck.c (cp_build_binary_op): Do not handle RROTATE_EXPR and LROTATE_EXPR.
2019-10-10 Paolo Carlini <paolo.carlini@oracle.com> * typeck.c (cp_build_binary_op): Do not handle RROTATE_EXPR and LROTATE_EXPR. * constexpr.c (cxx_eval_constant_expression): Likewise. (potential_constant_expression_1): Likewise. * cp-gimplify.c (cp_fold): Likewise. * pt.c (tsubst_copy): Likewise. From-SVN: r276903
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/constexpr.c4
-rw-r--r--gcc/cp/pt.c4
-rw-r--r--gcc/cp/typeck.c29
4 files changed, 8 insertions, 37 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a925f7e..49fb50d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2019-10-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * typeck.c (cp_build_binary_op): Do not handle RROTATE_EXPR and
+ LROTATE_EXPR.
+ * constexpr.c (cxx_eval_constant_expression): Likewise.
+ (potential_constant_expression_1): Likewise.
+ * pt.c (tsubst_copy): Likewise.
+
2019-10-11 Jason Merrill <jason@redhat.com>
* decl2.c (mark_used): Don't clobber DECL_SOURCE_LOCATION on
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index ea50234..46d41ec 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -5115,8 +5115,6 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
case MAX_EXPR:
case LSHIFT_EXPR:
case RSHIFT_EXPR:
- case LROTATE_EXPR:
- case RROTATE_EXPR:
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
@@ -7103,8 +7101,6 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
case MAX_EXPR:
case LSHIFT_EXPR:
case RSHIFT_EXPR:
- case LROTATE_EXPR:
- case RROTATE_EXPR:
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 8446443..7fecc03 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -16308,8 +16308,6 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
case TRUTH_OR_EXPR:
case RSHIFT_EXPR:
case LSHIFT_EXPR:
- case RROTATE_EXPR:
- case LROTATE_EXPR:
case EQ_EXPR:
case NE_EXPR:
case MAX_EXPR:
@@ -18913,8 +18911,6 @@ tsubst_copy_and_build (tree t,
case TRUTH_OR_EXPR:
case RSHIFT_EXPR:
case LSHIFT_EXPR:
- case RROTATE_EXPR:
- case LROTATE_EXPR:
case EQ_EXPR:
case NE_EXPR:
case MAX_EXPR:
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 74ff885..141d86f 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -4899,35 +4899,6 @@ cp_build_binary_op (const op_location_t &location,
}
break;
- case RROTATE_EXPR:
- case LROTATE_EXPR:
- if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)
- {
- result_type = type0;
- if (TREE_CODE (op1) == INTEGER_CST)
- {
- if (tree_int_cst_lt (op1, integer_zero_node))
- {
- if (complain & tf_warning)
- warning (0, (code == LROTATE_EXPR)
- ? G_("left rotate count is negative")
- : G_("right rotate count is negative"));
- }
- else if (compare_tree_int (op1, TYPE_PRECISION (type0)) >= 0)
- {
- if (complain & tf_warning)
- warning (0, (code == LROTATE_EXPR)
- ? G_("left rotate count >= width of type")
- : G_("right rotate count >= width of type"));
- }
- }
- /* Convert the shift-count to an integer, regardless of
- size of value being shifted. */
- if (TYPE_MAIN_VARIANT (TREE_TYPE (op1)) != integer_type_node)
- op1 = cp_convert (integer_type_node, op1, complain);
- }
- break;
-
case EQ_EXPR:
case NE_EXPR:
if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)