aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-04-16 10:16:52 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-04-16 10:16:52 +0000
commit586388fd723b7c59d97304607357ca13dd3d20d9 (patch)
treed130186b36c958b0c3d54ab01e172031d9308604 /gcc/ada/gcc-interface/utils.c
parentf0c6475aeaa426c110cdc4df6c63c0ee63e5776e (diff)
downloadgcc-586388fd723b7c59d97304607357ca13dd3d20d9.zip
gcc-586388fd723b7c59d97304607357ca13dd3d20d9.tar.gz
gcc-586388fd723b7c59d97304607357ca13dd3d20d9.tar.bz2
uintp.adb (UI_From_Dint): Remove useless code.
* uintp.adb (UI_From_Dint): Remove useless code. (UI_From_Int): Likewise. * uintp.h: Reorder declarations. (UI_From_gnu): Declare. (UI_Base): Likewise. (Vector_Template): Likewise. (Vector_To_Uint): Likewise. (Uint_0): Remove. (Uint_1): Likewise. * gcc-interface/gigi.h: Tweak comments. * gcc-interface/cuintp.c (UI_From_gnu): New global function. * gcc-interface/decl.c (maybe_pad_type): Do not warn if either size overflows. (annotate_value) <INTEGER_CST>: Call UI_From_gnu. * gcc-interface/trans.c (post_error_ne_num): Call post_error_ne. (post_error_ne_tree): Call UI_From_gnu and post_error_ne. * gcc-interface/utils.c (max_size) <tcc_binary>: Do not special-case TYPE_MAX_VALUE. From-SVN: r158408
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 27959ea..68a0d0f 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -2228,8 +2228,7 @@ max_size (tree exp, bool max_p)
In that case, if one side overflows, return the other.
sizetype is signed, but we know sizes are non-negative.
Likewise, handle a MINUS_EXPR or PLUS_EXPR with the LHS
- overflowing or the maximum possible value and the RHS
- a variable. */
+ overflowing and the RHS a variable. */
if (max_p
&& code == MIN_EXPR
&& TREE_CODE (rhs) == INTEGER_CST
@@ -2241,9 +2240,8 @@ max_size (tree exp, bool max_p)
&& TREE_OVERFLOW (lhs))
return rhs;
else if ((code == MINUS_EXPR || code == PLUS_EXPR)
- && ((TREE_CODE (lhs) == INTEGER_CST
- && TREE_OVERFLOW (lhs))
- || operand_equal_p (lhs, TYPE_MAX_VALUE (type), 0))
+ && TREE_CODE (lhs) == INTEGER_CST
+ && TREE_OVERFLOW (lhs)
&& !TREE_CONSTANT (rhs))
return lhs;
else