This is the mail archive of the gcc-patches@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: Merge C++ conversion into trunk (5/6 - double_int rewrite)


On Sun, Aug 12, 2012 at 11:30 PM, Marc Glisse <marc.glisse@inria.fr> 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 about the coding
> conventions.
>
>
>> 2012-08-12   Lawrence Crowl  <crowl@google.com>
>>
>>         * hash-table.h
>>         (typedef double_int): Change to struct (POD).
>>         (double_int::make): New overloads for int to double-int
>> conversion.
>
>
> Isn't that double_int::from_* now?
>
>> +typedef struct double_int
>> {
>
> [...]
>>
>> } double_int;
>
>
> Does the coding convention say something about this verbosity?
>
>
>> +  HOST_WIDE_INT to_signed () const;
>> +  unsigned HOST_WIDE_INT to_unsigned () const;
>> +
>> +  /* Conversion query functions.  */
>> +
>> +  bool fits_unsigned() const;
>> +  bool fits_signed() const;
>
>
> Space before the parentheses or not?
>
>
>> +inline double_int &
>> +double_int::operator ++ ()
>> +{
>> +  *this + double_int_one;
>
>
> *this += double_int_one;
> would be less confusing.

Increment/decrement operations did not exist, please do not add them
at this point.

Richard.

>> +  return *this;
>> +}
>
>
> --
> Marc Glisse


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