RFC: PR 19650

Dale Johannesen dalej@apple.com
Fri Jan 28 03:18:00 GMT 2005


On Jan 27, 2005, at 2:19 PM, Roger Sayle wrote:
>     if (lhs == 0)
> +     {
> +	true_value = fold_convert (type, true_value);
> !       lhs = fold (cond_first_p ? build2 (code, type, true_value, arg)
> !                                 : build2 (code, type, arg, 
> true_value));
> +     }
>     if (rhs == 0)
> +     {
> +       false_value = fold_convert (type, false_value);
> !       rhs = fold (cond_first_p ? build2 (code, type, false_value, 
> arg)
> !                                : build2 (code, type, arg, 
> false_value));
> +     }
>
>
> This should avoid potential problems with true_value or false_value
> being "void" in a COND_EXPR, and matches the intended semantics.
>
> Could you see if this untested suggestion works for you?

Yes, it does.  Thanks.
It will take a couple days to get a properly tested patch together.



More information about the Gcc mailing list