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: wide-int branch now up for public comment and review


On Aug 25, 2013, at 11:29 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
> Looks like wide-int is just using BITS_PER_UNIT to get the number of
> bits in "char".  That's a host thing, so it should be CHAR_BIT instead.

Oh, Kenny did point out one sin:

diff --git a/gcc/wide-int.cc b/gcc/wide-int.cc
index 37ce5b3..891c227 100644
--- a/gcc/wide-int.cc
+++ b/gcc/wide-int.cc
@@ -2056,7 +2056,7 @@ wide_int_ro::mul_internal (bool high, bool full,
 
   /* The 2 is for a full mult.  */
   memset (r, 0, half_blocks_needed * 2
-         * HOST_BITS_PER_HALF_WIDE_INT / BITS_PER_UNIT);
+         * HOST_BITS_PER_HALF_WIDE_INT / CHAR_BIT);
 
   for (j = 0; j < half_blocks_needed; j++)
     {

which I fixed.

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