about summary refs log tree commit diff stats
path: root/001help.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-13 20:26:47 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-13 20:26:47 -0700
commitb24eb4766ad12eceaafa2ee0d620e070e21a3293 (patch)
treed7efc84bce7cf75fa18792d02bceb15480690a2d /001help.cc
parent95b2a140094697dec176167154f9b3b31c2ef70f (diff)
downloadmu-b24eb4766ad12eceaafa2ee0d620e070e21a3293.tar.gz
2773 - switch to 'int'
This should eradicate the issue of 2771.
Diffstat (limited to '001help.cc')
-rw-r--r--001help.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/001help.cc b/001help.cc
index 26f17893..06beab82 100644
--- a/001help.cc
+++ b/001help.cc
@@ -85,8 +85,13 @@ bool is_equal(char* s, const char* lit) {
 //: unsigned and that'll cause warnings about mixing signed and unsigned,
 //: yadda-yadda. Instead use this macro below to perform an unsafe cast to
 //: signed. We'll just give up immediately if a container's ever too large.
+//:
+//: Addendum to corollary: We're going to uniformly avoid long long int
+//: everywhere, since Clang on 32-bit platforms doesn't yet support
+//: multiplication over 64-bit integers, and since that seems like a more
+//: common situation to end up in than integer overflow.
 :(before "End Includes")
-#define SIZE(X) (assert((X).size() < (1LL<<(sizeof(long long int)*8-2))), static_cast<long long int>((X).size()))
+#define SIZE(X) (assert((X).size() < (1LL<<(sizeof(int)*8-2))), static_cast<int>((X).size()))
 //:
 //: 5. Integer overflow is still impossible to guard against. Maybe after
 //: reading http://www.cs.utah.edu/~regehr/papers/overflow12.pdf