This is the mail archive of the gcc@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: RFC: PR 19650


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.


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