Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-24 Thread Mike Stump
On Aug 12, 2012, at 1:15 PM, Diego Novillo wrote: > + Second, the GCC conding conventions prefer explicit conversion, Spelling... coding

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-15 Thread Richard Guenther
On Wed, 15 Aug 2012, Richard Guenther wrote: > On Wed, Aug 15, 2012 at 12:31 PM, Jakub Jelinek wrote: > > On Wed, Aug 15, 2012 at 12:28:58PM +0200, Richard Guenther wrote: > >> the function names make no sense - they should be talking about > >> host-wide-ints, because that is what they are about

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-15 Thread Richard Guenther
On Wed, Aug 15, 2012 at 12:31 PM, Jakub Jelinek wrote: > On Wed, Aug 15, 2012 at 12:28:58PM +0200, Richard Guenther wrote: >> the function names make no sense - they should be talking about >> host-wide-ints, because that is what they are about. Thus, >> >> /* Conversion functions. */ >> >>

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-15 Thread Jakub Jelinek
On Wed, Aug 15, 2012 at 12:28:58PM +0200, Richard Guenther wrote: > the function names make no sense - they should be talking about > host-wide-ints, because that is what they are about. Thus, > > /* Conversion functions. */ > > HOST_WIDE_INT to_signed_hwi () const; > unsigned HOST_WIDE_I

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-15 Thread Richard Guenther
On Tue, Aug 14, 2012 at 10:04 AM, Richard Guenther wrote: > On Mon, 13 Aug 2012, Lawrence Crowl wrote: > >> On 8/13/12, Richard Guenther wrote: >> > Increment/decrement operations did not exist, please do not add >> > them at this point. >> >> Note that I have also added +=, -= and *= operations.

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-14 Thread Richard Guenther
On Mon, 13 Aug 2012, Lawrence Crowl wrote: > On 8/13/12, Richard Guenther wrote: > > Increment/decrement operations did not exist, please do not add > > them at this point. > > Note that I have also added +=, -= and *= operations. Having them > has three advantages. First, it matches expectati

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/13/12, Richard Henderson wrote: > On 08/13/2012 01:22 PM, Lawrence Crowl wrote: >>> > yes, it is just as confusing and a bug as >>> > >>> > 2.3 + 1; >>> > >>> > is in plain C. >> Yes, it is a bug. It's a bit disturbing that it wasn't caught >> in bootstrap. > > You'll recall that I pointed i

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Richard Henderson
On 08/13/2012 01:22 PM, Lawrence Crowl wrote: >> > yes, it is just as confusing and a bug as >> > >> > 2.3 + 1; >> > >> > is in plain C. > Yes, it is a bug. It's a bit disturbing that it wasn't caught > in bootstrap. > You'll recall that I pointed it out last time around as well. r~

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Diego Novillo
On Mon, Aug 13, 2012 at 5:41 AM, Richard Guenther wrote: >> *this += double_int_one; >> would be less confusing. > > Increment/decrement operations did not exist, please do not add them > at this point. But they are going to be used when the call-sites are converted. There is no point in leaving

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/13/12, Richard Guenther wrote: > Increment/decrement operations did not exist, please do not add > them at this point. Note that I have also added +=, -= and *= operations. Having them has three advantages. First, it matches expectations on what numeric types allow. Second, it results in

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/12/12, Marc Glisse wrote: > On Sun, 12 Aug 2012, Diego Novillo wrote: > > This implements the double_int rewrite. > > > > See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00711.html for > > details. > > I am taking it as a chance to ask a couple questions about the coding > conventions. > > >

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Lawrence Crowl
On 8/13/12, Gabriel Dos Reis wrote: > On Aug 13, 2012 Marc Glisse wrote: > > On Mon, 13 Aug 2012, Jakub Jelinek wrote: > > > On Sun, Aug 12, 2012 at 11:30:59PM +0200, Marc Glisse wrote: > > > > > +inline double_int & > > > > > +double_int::operator ++ () > > > > > +{ > > > > > + *this + double_i

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Gabriel Dos Reis
On Mon, Aug 13, 2012 at 5:32 AM, Marc Glisse wrote: > On Mon, 13 Aug 2012, Jakub Jelinek wrote: > >> On Sun, Aug 12, 2012 at 11:30:59PM +0200, Marc Glisse wrote: +inline double_int & +double_int::operator ++ () +{ + *this + double_int_one; >>> >>> >>> *this += double_int_

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Marc Glisse
On Mon, 13 Aug 2012, Jakub Jelinek wrote: On Sun, Aug 12, 2012 at 11:30:59PM +0200, Marc Glisse wrote: +inline double_int & +double_int::operator ++ () +{ + *this + double_int_one; *this += double_int_one; would be less confusing. Do you mean that *this + double_int_one; alone also works,

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Jakub Jelinek
On Sun, Aug 12, 2012 at 11:30:59PM +0200, Marc Glisse wrote: > >+inline double_int & > >+double_int::operator ++ () > >+{ > >+ *this + double_int_one; > > *this += double_int_one; > would be less confusing. Do you mean that *this + double_int_one; alone also works, just is confusing? That would

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-13 Thread Richard Guenther
On Sun, Aug 12, 2012 at 11:30 PM, Marc Glisse wrote: > On Sun, 12 Aug 2012, Diego Novillo wrote: > >> This implements the double_int rewrite. >> >> See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00711.html for >> details. >> >> Diego. > > > I am taking it as a chance to ask a couple questions ab

Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)

2012-08-12 Thread Marc Glisse
On Sun, 12 Aug 2012, Diego Novillo wrote: This implements the double_int rewrite. See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00711.html for details. Diego. I am taking it as a chance to ask a couple questions about the coding conventions. 2012-08-12 Lawrence Crowl * hash