This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Lawrence Crowl <crowl at google dot com>, Richard Guenther <rguenther at suse dot de>, Richard Henderson <rth at redhat dot com>
- Date: Sun, 12 Aug 2012 23:30:59 +0200 (CEST)
- Subject: Re: Merge C++ conversion into trunk (5/6 - double_int rewrite)
- References: <20120812201515.GA14973@google.com>
- Reply-to: gcc-patches at gcc dot gnu dot org
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.
+ return *this;
+}
--
Marc Glisse