Re: vector conditional expression with scalar arguments

2013-09-13 Thread Marc Glisse
Ping http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01381.html On Fri, 23 Aug 2013, Marc Glisse wrote: On Sun, 4 Aug 2013, Gerald Pfeifer wrote: On Sat, 13 Jul 2013, Marc Glisse wrote: 2013-07-14 Marc Glisse gcc/cp/ * call.c (build_conditional_expr_1): Handle the case with 1 vector

Re: vector conditional expression with scalar arguments

2013-08-23 Thread Marc Glisse
On Sun, 4 Aug 2013, Gerald Pfeifer wrote: On Sat, 13 Jul 2013, Marc Glisse wrote: 2013-07-14 Marc Glisse gcc/cp/ * call.c (build_conditional_expr_1): Handle the case with 1 vector and 2 scalars. Call save_expr before building a vector. * typeck.c (cp_build_binary_op)

Re: vector conditional expression with scalar arguments

2013-08-04 Thread Gerald Pfeifer
On Sat, 13 Jul 2013, Marc Glisse wrote: 2013-07-14 Marc Glisse gcc/cp/ * call.c (build_conditional_expr_1): Handle the case with 1 vector and 2 scalars. Call save_expr before building a vector. * typeck.c (cp_build_binary_op): Check complain before complaining. Shoul

Re: vector conditional expression with scalar arguments

2013-07-13 Thread Jason Merrill
OK. Jason

Re: vector conditional expression with scalar arguments

2013-07-13 Thread Marc Glisse
On Mon, 8 Jul 2013, Jason Merrill wrote: On 07/08/2013 05:28 PM, Marc Glisse wrote: Perhaps the most conservative rule would be to only accept the case where the sizes match and reject the others for now, so whatever is decided later for other cases is unlikely to require a breaking change. Tho

Re: vector conditional expression with scalar arguments

2013-07-08 Thread Jason Merrill
On 07/08/2013 05:28 PM, Marc Glisse wrote: Perhaps the most conservative rule would be to only accept the case where the sizes match and reject the others for now, so whatever is decided later for other cases is unlikely to require a breaking change. Though I would like the general case to be acc

Re: vector conditional expression with scalar arguments

2013-07-08 Thread Marc Glisse
On Mon, 8 Jul 2013, Jason Merrill wrote: On 07/07/2013 08:02 AM, Marc Glisse wrote: + error_at (loc, "could not find an integer type " + "of the same size as %qT", ctype); Now that I think of it, if a?b:c fails for this reason, it would also

Re: vector conditional expression with scalar arguments

2013-07-08 Thread Jason Merrill
On 07/07/2013 08:02 AM, Marc Glisse wrote: + error_at (loc, "could not find an integer type " + "of the same size as %qT", ctype); Why try to find a result element type the same size as the condition element type? For scalars the condition is

vector conditional expression with scalar arguments

2013-07-07 Thread Marc Glisse
Hello, this patch lets us write (vec<0)?-1:1 without having to manually construct a vector of 1s. It seems preferable to the hacks we can currently use, like (vec!=vec)+1. The patch also fixes a few bugs along the way. Bootstrap+testsuite on x86_64-unknown-linux-gnu. 2013-07-07 Marc Glisse