Patchwork wide-int branch now up for public comment and review

login
register
mail settings
Submitter Mike Stump
Date Aug. 24, 2013, 1:06 a.m.
Message ID <BF1A673B-0305-4247-99A4-AD5E05C9D81F@comcast.net>
Download mbox | patch
Permalink /patch/269597/
State New
Headers show

Comments

Mike Stump - Aug. 24, 2013, 1:06 a.m.
On Aug 23, 2013, at 8:02 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
>> #define addr_max_bitsize (64)
>> #define addr_max_precision \
> 
> These should either be lower-case C++ constants or upper-case macros.

Fixed:

Patch

diff --git a/gcc/wide-int.h b/gcc/wide-int.h
index 9ccdf7c..b40962c 100644
--- a/gcc/wide-int.h
+++ b/gcc/wide-int.h
@@ -247,15 +247,15 @@  along with GCC; see the file COPYING3.  If not see
    on any platform is 64 bits.  When that changes, then it is likely
    that a target hook should be defined so that targets can make this
    value larger for those targets.  */
-#define addr_max_bitsize (64)
+const int addr_max_bitsize = 64;
 
 /* This is the internal precision used when doing any address
    arithmetic.  The '4' is really 3 + 1.  Three of the bits are for
    the number of extra bits needed to do bit addresses and single bit is
    allow everything to be signed without loosing any precision.  Then
    everything is rounded up to the next HWI for efficiency.  */
-#define addr_max_precision \
-  ((addr_max_bitsize + 4 + HOST_BITS_PER_WIDE_INT - 1) & ~(HOST_BITS_PER_WIDE_INT - 1))
+const int addr_max_precision
+  = ((addr_max_bitsize + 4 + HOST_BITS_PER_WIDE_INT - 1) & ~(HOST_BITS_PER_WIDE_INT - 1));
 
 enum ShiftOp {
   NONE,