* langhooks.h (truthvalue_conversion): Remove.
* langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
LANG_HOOKS_TRUTHVALUE_CONVERSION.
* system.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Poison.
* gimplify.c (gimple_boolify): Don't use truthvalue_conversion.
* c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
ada:
* misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
cp:
* cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
fortran:
* f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
java:
* lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
treelang:
* treetree.c (LANG_HOOKS_TRUTHVALUE_CONVERSION,
tree_lang_truthvalue_conversion): Remove.
* tree-convert.c: Don't call truthvalue_conversion.
From-SVN: r96947
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * langhooks.h (truthvalue_conversion): Remove.
+ * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
+ LANG_HOOKS_TRUTHVALUE_CONVERSION.
+ * system.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Poison.
+ * gimplify.c (gimple_boolify): Don't use truthvalue_conversion.
+ * c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
2005-03-23 Kazu Hirata <kazu@cs.umass.edu>
* params.def: Fix a typo.
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
2005-03-17 Pascal Obry <obry@adacore.com>
* adaint.h, adaint.c (__gnat_waitpid): Moved to expect.c where it is
#define LANG_HOOKS_EXPAND_EXPR gnat_expand_expr
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE gnat_mark_addressable
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION gnat_truthvalue_conversion
#undef LANG_HOOKS_PRINT_DECL
#define LANG_HOOKS_PRINT_DECL gnat_print_decl
#undef LANG_HOOKS_PRINT_TYPE
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion
#undef LANG_HOOKS_FINISH_INCOMPLETE_DECL
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl
#undef LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
* cp-tree.h (perform_integral_promotions): Remove.
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
#undef LANG_HOOKS_MARK_ADDRESSABLE
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
2005-03-23 Steven Bosscher <stevenb@suse.de>
* convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
#undef LANG_HOOKS_POST_OPTIONS
#undef LANG_HOOKS_PRINT_IDENTIFIER
#undef LANG_HOOKS_PARSE_FILE
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_TYPE_FOR_MODE
#undef LANG_HOOKS_TYPE_FOR_SIZE
#define LANG_HOOKS_POST_OPTIONS gfc_post_options
#define LANG_HOOKS_PRINT_IDENTIFIER gfc_print_identifier
#define LANG_HOOKS_PARSE_FILE gfc_be_parse_file
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION gfc_truthvalue_conversion
#define LANG_HOOKS_MARK_ADDRESSABLE gfc_mark_addressable
#define LANG_HOOKS_TYPE_FOR_MODE gfc_type_for_mode
#define LANG_HOOKS_TYPE_FOR_SIZE gfc_type_for_size
if (TREE_CODE (type) == BOOLEAN_TYPE)
return expr;
- /* If this is the predicate of a COND_EXPR, it might not even be a
- truthvalue yet. */
- expr = lang_hooks.truthvalue_conversion (expr);
-
switch (TREE_CODE (expr))
{
case TRUTH_AND_EXPR:
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
2005-03-18 Andrew Haley <aph@redhat.com>
PR java/20522
#define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION java_truthvalue_conversion
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
LANG_HOOKS_EXPAND_CONSTANT, \
LANG_HOOKS_EXPAND_EXPR, \
LANG_HOOKS_EXPAND_DECL, \
- LANG_HOOKS_TRUTHVALUE_CONVERSION, \
LANG_HOOKS_SAFE_FROM_P, \
LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
LANG_HOOKS_MARK_ADDRESSABLE, \
1 if handled, 0 otherwise. */
int (*expand_decl) (tree);
- /* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
- operation.
-
- This preparation consists of taking the ordinary representation
- of an expression expr and producing a valid tree boolean
- expression describing whether expr is nonzero. We could simply
- always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1),
- but we optimize comparisons, &&, ||, and !.
-
- The result should be an expression of boolean type (if not an
- error_mark_node). */
- tree (*truthvalue_conversion) (tree);
-
/* Hook called by safe_from_p for language-specific tree codes. It is
up to the language front-end to install a hook if it has any such
codes that safe_from_p needs to know about. Since same_from_p will
LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS \
LANG_HOOKS_PUSHLEVEL LANG_HOOKS_SET_BLOCK \
LANG_HOOKS_MAYBE_BUILD_CLEANUP LANG_HOOKS_UPDATE_DECL_AFTER_SAVING \
- LANG_HOOKS_POPLEVEL
+ LANG_HOOKS_POPLEVEL LANG_HOOKS_TRUTHVALUE_CONVERSION
/* Libiberty macros that are no longer used in GCC. */
#undef ANSI_PROTOTYPES
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * treetree.c (LANG_HOOKS_TRUTHVALUE_CONVERSION,
+ tree_lang_truthvalue_conversion): Remove.
+ * tree-convert.c: Don't call truthvalue_conversion.
+
2005-03-22 James A. Morrison <phython@gcc.gnu.org>
* treetree.c (tree_code_if_start): Use fold_buildN.
return fold (convert_to_integer (type, e));
if (code == BOOLEAN_TYPE)
{
- tree t = (*lang_hooks.truthvalue_conversion) (expr);
+ tree t = expr;
/* If it returns a NOP_EXPR, we must fold it here to avoid
infinite recursion between fold () and convert (). */
if (TREE_CODE (t) == NOP_EXPR)
char junk; /* dummy field to ensure struct is not empty */
};
-static tree tree_lang_truthvalue_conversion (tree expr);
static bool tree_mark_addressable (tree exp);
static tree tree_lang_type_for_size (unsigned precision, int unsignedp);
static tree tree_lang_type_for_mode (enum machine_mode mode, int unsignedp);
end). These are not really very language-dependent, i.e.
treelang, C, Mercury, etc. can all use almost the same definitions. */
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION tree_lang_truthvalue_conversion
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE tree_mark_addressable
#undef LANG_HOOKS_SIGNED_TYPE
allocate each of them once. Signed and unsigned types are kept separate. */
static GTY(()) tree signed_and_unsigned_types[MAX_BITS_PER_WORD + 1][2];
-/* XXX is this definition OK? */
-static tree
-tree_lang_truthvalue_conversion (tree expr)
-{
- return expr;
-}
-
/* Mark EXP saying that we need to be able to take the
address of it; it should not be allocated in a register.
Value is 1 if successful.