This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patches to remove truthvalue_conversion langhook
- From: Ian Lance Taylor <ian at airs dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 28 Mar 2005 20:29:40 -0500
- Subject: Re: Patches to remove truthvalue_conversion langhook
- References: <Pine.LNX.4.61.0503230132480.18254@digraph.polyomino.org.uk>
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> This pair of patches remove the truthvalue_conversion langhook. It is
> called in only one place in language-independent code, in
> gimple_boolify, and it seems to me that front ends should ensure that
> COND_EXPRs have a proper truthvalue condition rather than using a
> langhook like this; in fact it seems they already do.
This patch breaks the MIPS compiler, which calls
truthvalue_conversion.
../../gcc/gcc/config/mips/mips.c: In function `mips_gimplify_va_arg_expr':
../../gcc/gcc/config/mips/mips.c:3976: error: structure has no member named `truthvalue_conversion'
Probably the fix is to change
t = lang_hooks.truthvalue_conversion (off);
to something like
t = build (EQ_EXPR, boolean_type_node, off,
build_int_cst (TREE_TYPE (off), 0));
Ian