Re: [C++ patch] Allow p->~T() when T is a vector

2012-08-02 Thread Marc Glisse
On Thu, 2 Aug 2012, Jason Merrill wrote: On 08/02/2012 07:42 AM, Marc Glisse wrote: + if (SCALAR_TYPE_P (object_type) + || TREE_CODE (object_type) == VECTOR_TYPE) You can use "scalarish_type_p" for this test. OK with that change. That function was static, so I had t

Re: [C++ patch] Allow p->~T() when T is a vector

2012-08-02 Thread Marc Glisse
On Thu, 2 Aug 2012, Jason Merrill wrote: On 08/02/2012 07:42 AM, Marc Glisse wrote: + if (SCALAR_TYPE_P (object_type) + || TREE_CODE (object_type) == VECTOR_TYPE) You can use "scalarish_type_p" for this test. OK with that change. Wow, I'd missed it, a function that

Re: [C++ patch] Allow p->~T() when T is a vector

2012-08-02 Thread Jason Merrill
On 08/02/2012 07:42 AM, Marc Glisse wrote: + if (SCALAR_TYPE_P (object_type) + || TREE_CODE (object_type) == VECTOR_TYPE) You can use "scalarish_type_p" for this test. OK with that change. Jason

Re: [C++ patch] Allow p->~T() when T is a vector

2012-08-02 Thread Gabriel Dos Reis
On Thu, Aug 2, 2012 at 7:08 AM, Richard Guenther wrote: > On Thu, Aug 2, 2012 at 1:42 PM, Marc Glisse wrote: >> Hello, >> >> this patch allows p->~T() when T is (after substitution) a vector, which is >> necessary for use in std::vector for instance. > > Why not include VECTOR_TYPE in ARITHMETIC_

Re: [C++ patch] Allow p->~T() when T is a vector

2012-08-02 Thread Marc Glisse
On Thu, 2 Aug 2012, Richard Guenther wrote: On Thu, Aug 2, 2012 at 1:42 PM, Marc Glisse wrote: Hello, this patch allows p->~T() when T is (after substitution) a vector, which is necessary for use in std::vector for instance. Why not include VECTOR_TYPE in ARITHMETIC_TYPE_P? I often aim fo

Re: [C++ patch] Allow p->~T() when T is a vector

2012-08-02 Thread Ramana Radhakrishnan
On 08/02/12 13:08, Richard Guenther wrote: On Thu, Aug 2, 2012 at 1:42 PM, Marc Glisse wrote: Hello, this patch allows p->~T() when T is (after substitution) a vector, which is necessary for use in std::vector for instance. Why not include VECTOR_TYPE in ARITHMETIC_TYPE_P? Not really, beca

Re: [C++ patch] Allow p->~T() when T is a vector

2012-08-02 Thread Richard Guenther
On Thu, Aug 2, 2012 at 1:42 PM, Marc Glisse wrote: > Hello, > > this patch allows p->~T() when T is (after substitution) a vector, which is > necessary for use in std::vector for instance. Why not include VECTOR_TYPE in ARITHMETIC_TYPE_P? > gcc/cp/ChangeLog > 2012-08-02 Marc Glisse > >