diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-04 22:19:58 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-04 22:19:58 +0000 |
commit | aff9e6561ee30f3802fe5993a64cdcd7a53146b4 (patch) | |
tree | 50dc6fe5e989dd9c497bfef9c4a8a5e5f0a8ba33 /gcc/c-convert.c | |
parent | 322fc845e136fcb38a416b552b3e8367388b93a8 (diff) | |
download | gcc-aff9e6561ee30f3802fe5993a64cdcd7a53146b4.tar.gz |
* c-common.c (truthvalue_conversion): Rename, update.
* c-common.h (c_common_truthvalue_conversion): New.
* c-convert.c (convert): Update.
* c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
* c-parse.in (expr_no_commas, if_prefix, select_or_iter_stmt): Update.
* c-typeck.c (build_binary_op, build_unary_op,
build_conditional_expr): Update.
* fold-const.c (constant_boolean_node, fold): Use langhook.
* langhooks-def.h (LANGHOOK_INITIALIZER): Update.
* langhooks.h (struct lang_hooks): New hook.
* stmt.c (expand_decl_cleanup): Use langhook.
* tree.h (truthvalue_conversion): Remove.
ada:
* gigi.h (truthvalue_conversion): Rename.
* misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
* trans.c (tree_transform): Update.
* utils2.c (truthvalue_conversion): Rename, update.
(build_binary_op, build_unary_op): Update.
cp:
* cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
* cvt.c: Update comment.
* init.c (expand_cleanup_for_base): Update.
* semantics.c (finish_parenthesized_expr): Update.
* typeck.c (cp_truthvalue_conversion): Update.
f:
* com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
(truthvalue_conversion): Rename. Update. Make static.
(ffecom_truth_value): Update.
java:
* expr.c (truthvalue_conversion): Rename. Update.
(expand_compare): Update.
* java-tree.h (java_truthvalue_conversion): New.
* lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
objc:
* objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-convert.c')
-rw-r--r-- | gcc/c-convert.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/c-convert.c b/gcc/c-convert.c index 947c79bcadb..b38eab2dbab 100644 --- a/gcc/c-convert.c +++ b/gcc/c-convert.c @@ -42,7 +42,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA Here is a list of all the functions that assume that widening and narrowing is always done with a NOP_EXPR: In convert.c, convert_to_integer. - In c-typeck.c, build_binary_op (boolean ops), and truthvalue_conversion. + In c-typeck.c, build_binary_op (boolean ops), and + c_common_truthvalue_conversion. In expr.c: expand_expr, for operands of a MULT_EXPR. In fold-const.c: fold. In tree.c: get_narrower and get_unwidened. */ @@ -90,9 +91,9 @@ convert (type, expr) return fold (convert_to_integer (type, e)); if (code == BOOLEAN_TYPE) { - tree t = truthvalue_conversion (expr); - /* If truthvalue_conversion returns a NOP_EXPR, we must fold it here - to avoid infinite recursion between fold () and convert (). */ + tree t = c_common_truthvalue_conversion (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) return fold (build1 (NOP_EXPR, type, TREE_OPERAND (t, 0))); else |