Patches to remove truthvalue_conversion langhook

Ian Lance Taylor ian@airs.com
Tue Mar 29 01:31:00 GMT 2005


"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



More information about the Gcc-patches mailing list