Commit d101034c by Joseph Myers Committed by Joseph Myers

langhooks.h (truthvalue_conversion): Remove.

	* 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
parent 2e0ea515
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> 2005-03-23 Kazu Hirata <kazu@cs.umass.edu>
* params.def: Fix a typo. * 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> 2005-03-17 Pascal Obry <obry@adacore.com>
* adaint.h, adaint.c (__gnat_waitpid): Moved to expect.c where it is * adaint.h, adaint.c (__gnat_waitpid): Moved to expect.c where it is
......
...@@ -137,8 +137,6 @@ static tree gnat_type_max_size (tree); ...@@ -137,8 +137,6 @@ static tree gnat_type_max_size (tree);
#define LANG_HOOKS_EXPAND_EXPR gnat_expand_expr #define LANG_HOOKS_EXPAND_EXPR gnat_expand_expr
#undef LANG_HOOKS_MARK_ADDRESSABLE #undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE gnat_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 #undef LANG_HOOKS_PRINT_DECL
#define LANG_HOOKS_PRINT_DECL gnat_print_decl #define LANG_HOOKS_PRINT_DECL gnat_print_decl
#undef LANG_HOOKS_PRINT_TYPE #undef LANG_HOOKS_PRINT_TYPE
......
...@@ -52,8 +52,6 @@ extern void c_initialize_diagnostics (diagnostic_context *); ...@@ -52,8 +52,6 @@ extern void c_initialize_diagnostics (diagnostic_context *);
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable #define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_PARSE_FILE #undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_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 #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl #define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl
#undef LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS #undef LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS
......
2005-03-23 Joseph S. Myers <joseph@codesourcery.com> 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. * cp-tree.h (perform_integral_promotions): Remove.
(default_conversion): Add. (default_conversion): Add.
......
...@@ -71,8 +71,6 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t, ...@@ -71,8 +71,6 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#define LANG_HOOKS_PARSE_FILE c_common_parse_file #define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_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 #undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
#undef LANG_HOOKS_MARK_ADDRESSABLE #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> 2005-03-23 Steven Bosscher <stevenb@suse.de>
* convert.c (convert): Replace fold (buildN (...)) with fold_buildN. * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
......
...@@ -114,7 +114,6 @@ static void gfc_expand_function (tree); ...@@ -114,7 +114,6 @@ static void gfc_expand_function (tree);
#undef LANG_HOOKS_POST_OPTIONS #undef LANG_HOOKS_POST_OPTIONS
#undef LANG_HOOKS_PRINT_IDENTIFIER #undef LANG_HOOKS_PRINT_IDENTIFIER
#undef LANG_HOOKS_PARSE_FILE #undef LANG_HOOKS_PARSE_FILE
#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
#undef LANG_HOOKS_MARK_ADDRESSABLE #undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_TYPE_FOR_MODE #undef LANG_HOOKS_TYPE_FOR_MODE
#undef LANG_HOOKS_TYPE_FOR_SIZE #undef LANG_HOOKS_TYPE_FOR_SIZE
...@@ -133,7 +132,6 @@ static void gfc_expand_function (tree); ...@@ -133,7 +132,6 @@ static void gfc_expand_function (tree);
#define LANG_HOOKS_POST_OPTIONS gfc_post_options #define LANG_HOOKS_POST_OPTIONS gfc_post_options
#define LANG_HOOKS_PRINT_IDENTIFIER gfc_print_identifier #define LANG_HOOKS_PRINT_IDENTIFIER gfc_print_identifier
#define LANG_HOOKS_PARSE_FILE gfc_be_parse_file #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_MARK_ADDRESSABLE gfc_mark_addressable
#define LANG_HOOKS_TYPE_FOR_MODE gfc_type_for_mode #define LANG_HOOKS_TYPE_FOR_MODE gfc_type_for_mode
#define LANG_HOOKS_TYPE_FOR_SIZE gfc_type_for_size #define LANG_HOOKS_TYPE_FOR_SIZE gfc_type_for_size
......
...@@ -2073,10 +2073,6 @@ gimple_boolify (tree expr) ...@@ -2073,10 +2073,6 @@ gimple_boolify (tree expr)
if (TREE_CODE (type) == BOOLEAN_TYPE) if (TREE_CODE (type) == BOOLEAN_TYPE)
return expr; 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)) switch (TREE_CODE (expr))
{ {
case TRUTH_AND_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> 2005-03-18 Andrew Haley <aph@redhat.com>
PR java/20522 PR java/20522
......
...@@ -172,8 +172,6 @@ struct language_function GTY(()) ...@@ -172,8 +172,6 @@ struct language_function GTY(())
#define LANG_HOOKS_PARSE_FILE java_parse_file #define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_MARK_ADDRESSABLE #undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE java_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 #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
#undef LANG_HOOKS_DECL_PRINTABLE_NAME #undef LANG_HOOKS_DECL_PRINTABLE_NAME
......
...@@ -267,7 +267,6 @@ extern tree lhd_make_node (enum tree_code); ...@@ -267,7 +267,6 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_EXPAND_CONSTANT, \ LANG_HOOKS_EXPAND_CONSTANT, \
LANG_HOOKS_EXPAND_EXPR, \ LANG_HOOKS_EXPAND_EXPR, \
LANG_HOOKS_EXPAND_DECL, \ LANG_HOOKS_EXPAND_DECL, \
LANG_HOOKS_TRUTHVALUE_CONVERSION, \
LANG_HOOKS_SAFE_FROM_P, \ LANG_HOOKS_SAFE_FROM_P, \
LANG_HOOKS_FINISH_INCOMPLETE_DECL, \ LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
LANG_HOOKS_MARK_ADDRESSABLE, \ LANG_HOOKS_MARK_ADDRESSABLE, \
......
...@@ -277,19 +277,6 @@ struct lang_hooks ...@@ -277,19 +277,6 @@ struct lang_hooks
1 if handled, 0 otherwise. */ 1 if handled, 0 otherwise. */
int (*expand_decl) (tree); 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 /* 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 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 codes that safe_from_p needs to know about. Since same_from_p will
......
...@@ -670,7 +670,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; ...@@ -670,7 +670,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS \ LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS \
LANG_HOOKS_PUSHLEVEL LANG_HOOKS_SET_BLOCK \ LANG_HOOKS_PUSHLEVEL LANG_HOOKS_SET_BLOCK \
LANG_HOOKS_MAYBE_BUILD_CLEANUP LANG_HOOKS_UPDATE_DECL_AFTER_SAVING \ 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. */ /* Libiberty macros that are no longer used in GCC. */
#undef ANSI_PROTOTYPES #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> 2005-03-22 James A. Morrison <phython@gcc.gnu.org>
* treetree.c (tree_code_if_start): Use fold_buildN. * treetree.c (tree_code_if_start): Use fold_buildN.
......
...@@ -85,7 +85,7 @@ convert (tree type, tree expr) ...@@ -85,7 +85,7 @@ convert (tree type, tree expr)
return fold (convert_to_integer (type, e)); return fold (convert_to_integer (type, e));
if (code == BOOLEAN_TYPE) 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 /* If it returns a NOP_EXPR, we must fold it here to avoid
infinite recursion between fold () and convert (). */ infinite recursion between fold () and convert (). */
if (TREE_CODE (t) == NOP_EXPR) if (TREE_CODE (t) == NOP_EXPR)
......
...@@ -124,7 +124,6 @@ struct language_function GTY(()) ...@@ -124,7 +124,6 @@ struct language_function GTY(())
char junk; /* dummy field to ensure struct is not empty */ 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 bool tree_mark_addressable (tree exp);
static tree tree_lang_type_for_size (unsigned precision, int unsignedp); static tree tree_lang_type_for_size (unsigned precision, int unsignedp);
static tree tree_lang_type_for_mode (enum machine_mode mode, int unsignedp); static tree tree_lang_type_for_mode (enum machine_mode mode, int unsignedp);
...@@ -153,8 +152,6 @@ static void treelang_expand_function (tree fndecl); ...@@ -153,8 +152,6 @@ static void treelang_expand_function (tree fndecl);
end). These are not really very language-dependent, i.e. end). These are not really very language-dependent, i.e.
treelang, C, Mercury, etc. can all use almost the same definitions. */ 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 #undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE tree_mark_addressable #define LANG_HOOKS_MARK_ADDRESSABLE tree_mark_addressable
#undef LANG_HOOKS_SIGNED_TYPE #undef LANG_HOOKS_SIGNED_TYPE
...@@ -781,13 +778,6 @@ dt (tree t) ...@@ -781,13 +778,6 @@ dt (tree t)
allocate each of them once. Signed and unsigned types are kept separate. */ 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]; 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 /* Mark EXP saying that we need to be able to take the
address of it; it should not be allocated in a register. address of it; it should not be allocated in a register.
Value is 1 if successful. Value is 1 if successful.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment