langhooks.h (truthvalue_conversion): Remove.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 23 Mar 2005 19:47:09 +0000 (19:47 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 23 Mar 2005 19:47:09 +0000 (19:47 +0000)
* 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

17 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/misc.c
gcc/c-objc-common.h
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.h
gcc/fortran/ChangeLog
gcc/fortran/f95-lang.c
gcc/gimplify.c
gcc/java/ChangeLog
gcc/java/lang.c
gcc/langhooks-def.h
gcc/langhooks.h
gcc/system.h
gcc/treelang/ChangeLog
gcc/treelang/tree-convert.c
gcc/treelang/treetree.c

index 66bece7d1bd7c9f6e30ecdce9faf66cdb3065ecd..081b91a62d7988aad42158b88e78b4cbdc55d972 100644 (file)
@@ -1,3 +1,12 @@
+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.
index bcd2cba05403b98a7eb1e72a1e8cab921915b358..d0e73d327f4a0ab5b1b2376f19dca4d5a241fb50 100644 (file)
@@ -1,3 +1,7 @@
+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
index 03b156c25a3caea87a19ff1c9bc426d452ac1fc2..39feb1cc9c275ed9e4dc799704af216549a5ba85 100644 (file)
@@ -137,8 +137,6 @@ static tree gnat_type_max_size              (tree);
 #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
index c6cca43d3c0f9c800ca2eafe0d8944dff5751a33..de8c175c5c2159b04eb3b466537621b61ed67e32 100644 (file)
@@ -52,8 +52,6 @@ extern void c_initialize_diagnostics (diagnostic_context *);
 #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
index c242a87dd3418b92e8fff2a608e5662a0ed16713..2b3a99b1cf0d700debb89bc7c18c03cdd230852f 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 210a383e4613a7e3597f62368fb9c78e8d25b543..65a01c367f674b040a228432f1d39066cea0a709 100644 (file)
@@ -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
 #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
index aa990eb616a35107c262f9a6e5185afd23efbc48..7a6962159fed0e756c16ea4acccef0d693bee737 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 7f04b7ca2614442374249f559cfeef181e4f2c5c..e0c22daad5d4820d5d36479153ce591c5f512f43 100644 (file)
@@ -114,7 +114,6 @@ static void gfc_expand_function (tree);
 #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
@@ -133,7 +132,6 @@ static void gfc_expand_function (tree);
 #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
index b902ce1c97fb539044cbde7c18a49302f3affc7d..9191baea26a8f19280d32df8be4fef25970bc654 100644 (file)
@@ -2073,10 +2073,6 @@ gimple_boolify (tree expr)
   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:
index bcf9156598106df30df7387c3f35cef029df12e9..70ad11c36476bdc8ce69751234d9651782e93b09 100644 (file)
@@ -1,3 +1,7 @@
+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
index 67bc0e48e1ee9f74466a8f53167a479a9d57d01b..553e20cf57f3afdfc7f23bbafcea9ab949302ff1 100644 (file)
@@ -172,8 +172,6 @@ struct language_function GTY(())
 #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
index fc6decaaf8598335490996988277b5583379cc07..67ea0f325dc3aee1ef3953923ad1100962274255 100644 (file)
@@ -267,7 +267,6 @@ extern tree lhd_make_node (enum tree_code);
   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, \
index 97b8f5e1ce4fa543f8678fbf18adac75dadb3093..e3ff6724eff60a2776c1df310ad204d02563e3c1 100644 (file)
@@ -277,19 +277,6 @@ struct lang_hooks
      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
index d45e56afb337c4ccbfd2504a93dafbf80068cae7..f285e87674c899bdc284c22c9682a62b9c21e964 100644 (file)
@@ -670,7 +670,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
        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
index ae07033fec251dbd9200cc80c4d2d981aea05643..dbf1bdc3e90e867222abeb3998c88950784e5e16 100644 (file)
@@ -1,3 +1,9 @@
+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. 
index 77741453f40c804361db52a2dad636a7ecccf4cf..929fbd5506caf82ade85649e9ef1ba56d20e1f77 100644 (file)
@@ -85,7 +85,7 @@ convert (tree type, tree expr)
     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)
index 6f22298c151b11d897fbeb5f9b0d5b58dac7146f..6d98e23502246ae388de5693ad46b4637569c75b 100644 (file)
@@ -124,7 +124,6 @@ struct language_function GTY(())
   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);
@@ -153,8 +152,6 @@ static void treelang_expand_function (tree fndecl);
    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
@@ -781,13 +778,6 @@ dt (tree t)
    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.