Re: [C++] Mixed scalar-vector operations

2012-10-08 Thread Mike Stump
On Oct 8, 2012, at 8:53 AM, Marc Glisse wrote: > On Fri, 5 Oct 2012, Jason Merrill wrote: > >>> + error_at (loc, "conversion of scalar to vector " >>> + "involves truncation"); >> >> These errors should print the types involved. They also need to be >> suppre

Re: [C++] Mixed scalar-vector operations

2012-10-08 Thread Jason Merrill
OK. Jason

Re: [C++] Mixed scalar-vector operations

2012-10-08 Thread Marc Glisse
On Fri, 5 Oct 2012, Jason Merrill wrote: + error_at (loc, "conversion of scalar to vector " + "involves truncation"); These errors should print the types involved. They also need to be suppressed when !(complain & tf_error). Hello, here is a new

Re: [C++] Mixed scalar-vector operations

2012-10-05 Thread Jason Merrill
On 10/05/2012 07:09 PM, Marc Glisse wrote: [LR]SHIFT_EXPR are special and also accept to have a vector as first argument and a scalar as second argument (but not the reverse). Fair enough. These 2 lines are in a switch in the case where scalar_to_vector returned stv_firstarg, meaning that the

Re: [C++] Mixed scalar-vector operations

2012-10-05 Thread Marc Glisse
On Fri, 5 Oct 2012, Jason Merrill wrote: On 09/21/2012 02:32 PM, Marc Glisse wrote: + gcc_assert (TREE_CODE (type0) == VECTOR_TYPE + || TREE_CODE (type1) == VECTOR_TYPE); + switch (code) +{ + case RSHIFT_EXPR: + case LSHIFT_EXPR: + if (TREE_CODE (type0) == INTE

Re: [C++] Mixed scalar-vector operations

2012-10-05 Thread Jason Merrill
On 09/21/2012 02:32 PM, Marc Glisse wrote: + gcc_assert (TREE_CODE (type0) == VECTOR_TYPE + || TREE_CODE (type1) == VECTOR_TYPE); + switch (code) +{ + case RSHIFT_EXPR: + case LSHIFT_EXPR: + if (TREE_CODE (type0) == INTEGER_TYPE + && TREE_CODE (TREE_TYP

Re: [C++] Mixed scalar-vector operations

2012-10-05 Thread Marc Glisse
Ping http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01557.html On Fri, 21 Sep 2012, Marc Glisse wrote: Hello, this patch adds mixed scalar-vector operations to the C++ front-end. It also adds a few operators to the C front-end (comparisons in particular). This patch is mostly an import from t

[C++] Mixed scalar-vector operations

2012-09-21 Thread Marc Glisse
Hello, this patch adds mixed scalar-vector operations to the C++ front-end. It also adds a few operators to the C front-end (comparisons in particular). This patch is mostly an import from the C front-end (with the maybe_const stuff removed). 2012-09-22 Marc Glisse PR c++/54427