This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patches to remove truthvalue_conversion langhook


Ian Lance Taylor <ian@airs.com> writes:

> "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));

Except of course it should be NE_EXPR.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]