aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-09-30 13:47:40 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-09-30 13:47:40 -0400
commit3af07c22a1f0342064cb34594c133e35496f4862 (patch)
tree83ec9420e3c9176f019328a5ca3066797f384eba /gcc/cp
parentac6fb7a4a9785692694731b3d7387ed3ff4ebffd (diff)
downloadgcc-3af07c22a1f0342064cb34594c133e35496f4862.zip
gcc-3af07c22a1f0342064cb34594c133e35496f4862.tar.gz
gcc-3af07c22a1f0342064cb34594c133e35496f4862.tar.bz2
cp-tree.h (TREE_NEGATED_INT): Remove.
* cp-tree.h (TREE_NEGATED_INT): Remove. * semantics.c (finish_unary_op_expr): Don't set it. From-SVN: r179400
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/semantics.c13
3 files changed, 5 insertions, 17 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4cd3ff9..e917305 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 0f7deb6..7e5aac7 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 89c76d5a..7ad1e8d 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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);