aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2007-01-10 19:28:39 +0000
committerTom Tromey <tromey@gcc.gnu.org>2007-01-10 19:28:39 +0000
commit08f0e79ed931917b74221563e09d85e4804c4293 (patch)
tree722fcda144ee1c967294ec48adf52843af50195d /gcc/fold-const.c
parente0ae13896e72fdc6d0cf2a93452ecbb8a7993860 (diff)
downloadgcc-08f0e79ed931917b74221563e09d85e4804c4293.zip
gcc-08f0e79ed931917b74221563e09d85e4804c4293.tar.gz
gcc-08f0e79ed931917b74221563e09d85e4804c4293.tar.bz2
fold-const.c (fold_truthop): Don't check can_use_bit_fields_p.
gcc * fold-const.c (fold_truthop): Don't check can_use_bit_fields_p. (fold_binary): Likewise. * langhooks.c (lhd_can_use_bit_fields_p): Removed. * langhooks-def.h (lhd_can_use_bit_fields_p): Removed. (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed. (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CAN_USE_BIT_FIELDS_P. * langhooks.h (struct lang_hooks): Removed field 'can_use_bit_fields_p'. gcc/java * lang.c (java_can_use_bit_fields_p): Removed. (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed. From-SVN: r120647
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 9e1eae3..3a3c1f9 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1,6 +1,6 @@
/* Fold a constant sub-tree into a single node for C-compiler
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC.
@@ -5117,11 +5117,6 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs)
return 0;
}
- /* After this point all optimizations will generate bit-field
- references, which we might not want. */
- if (! lang_hooks.can_use_bit_fields_p ())
- return 0;
-
/* See if we can find a mode that contains both fields being compared on
the left. If we can't, fail. Otherwise, update all constants and masks
to be relative to a field of that size. */
@@ -10947,8 +10942,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
}
/* If this is a comparison of a field, we may be able to simplify it. */
- if (((TREE_CODE (arg0) == COMPONENT_REF
- && lang_hooks.can_use_bit_fields_p ())
+ if ((TREE_CODE (arg0) == COMPONENT_REF
|| TREE_CODE (arg0) == BIT_FIELD_REF)
/* Handle the constant case even without -O
to make sure the warnings are given. */