cp-tree.h (TREE_NEGATED_INT): Remove.
authorJason Merrill <jason@redhat.com>
Fri, 30 Sep 2011 17:47:40 +0000 (13:47 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 30 Sep 2011 17:47:40 +0000 (13:47 -0400)
* cp-tree.h (TREE_NEGATED_INT): Remove.
* semantics.c (finish_unary_op_expr): Don't set it.

From-SVN: r179400

gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/semantics.c

index 7241d666d2242049b25fd83b358ff6df61a6c80f..a1f7ebef4006b9af305360f12cc93c723fdb8bf4 100644 (file)
@@ -43,8 +43,7 @@ never after.
 #include "diagnostic-core.h"
 
 /* Usage of TREE_LANG_FLAG_?:
-   0: TREE_NEGATED_INT (in INTEGER_CST).
-      IDENTIFIER_MARKED (used by search routines).
+   0: IDENTIFIER_MARKED (used by search routines).
       DECL_PRETTY_FUNCTION_P (in VAR_DECL)
       C_MAYBE_CONST_EXPR_INT_OPERANDS (in C_MAYBE_CONST_EXPR, for C)
    1: C_DECLARED_LABEL_FLAG (in LABEL_DECL)
index 4cd3ff9b3aa234e0d836352314ecfb5dd86b10e8..e9173050249c413681711116b6adf7483e68261c 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-30  Jason Merrill  <jason@redhat.com>
+
+       * cp-tree.h (TREE_NEGATED_INT): Remove.
+       * semantics.c (finish_unary_op_expr): Don't set it.
+
 2011-09-30  Janis Johnson  <janisjo@codesourcery.com>
 
        PR c++/44473
index 0f7deb66b603a290762a3ce9d2ca3edbc4c25930..7e5aac750f3d3028f17bf235da944a4ad3e65542 100644 (file)
@@ -2989,10 +2989,6 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
 #define TYPENAME_IS_RESOLVING_P(NODE) \
   (TREE_LANG_FLAG_2 (TYPENAME_TYPE_CHECK (NODE)))
 
-/* Nonzero in INTEGER_CST means that this int is negative by dint of
-   using a twos-complement negated operand.  */
-#define TREE_NEGATED_INT(NODE) TREE_LANG_FLAG_0 (INTEGER_CST_CHECK (NODE))
-
 /* [class.virtual]
 
    A class that declares or inherits a virtual function is called a
index 89c76d5a12645cca62bd8549b833ff0cf9ec0025..7ad1e8d5ebd170ad99d48c990250e84a41df4814 100644 (file)
@@ -2312,19 +2312,6 @@ tree
 finish_unary_op_expr (enum tree_code code, tree expr)
 {
   tree result = build_x_unary_op (code, expr, tf_warning_or_error);
-  /* Inside a template, build_x_unary_op does not fold the
-     expression. So check whether the result is folded before
-     setting TREE_NEGATED_INT.  */
-  if (code == NEGATE_EXPR && TREE_CODE (expr) == INTEGER_CST
-      && TREE_CODE (result) == INTEGER_CST
-      && !TYPE_UNSIGNED (TREE_TYPE (result))
-      && INT_CST_LT (result, integer_zero_node))
-    {
-      /* RESULT may be a cached INTEGER_CST, so we must copy it before
-        setting TREE_NEGATED_INT.  */
-      result = copy_node (result);
-      TREE_NEGATED_INT (result) = 1;
-    }
   if (TREE_OVERFLOW_P (result) && !TREE_OVERFLOW_P (expr))
     overflow_warning (input_location, result);