[llvm-commits] [llvm] r60237 - /llvm/trunk/include/llvm/ADT/PointerIntPair.h
Chris Lattner
sabre at nondot.org
Sat Nov 29 00:36:41 PST 2008
Author: lattner
Date: Sat Nov 29 02:36:39 2008
New Revision: 60237
URL: http://llvm.org/viewvc/llvm-project?rev=60237&view=rev
Log:
apparently GCC doesn't believe that I understand C
precedence rules. Pacify it.
Modified:
llvm/trunk/include/llvm/ADT/PointerIntPair.h
Modified: llvm/trunk/include/llvm/ADT/PointerIntPair.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerIntPair.h?rev=60237&r1=60236&r2=60237&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerIntPair.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerIntPair.h Sat Nov 29 02:36:39 2008
@@ -42,12 +42,12 @@
}
IntType getInt() const {
- return (IntType)(Value & (1 << IntBits)-1);
+ return (IntType)(Value & ((1 << IntBits)-1));
}
void setPointer(PointerTy Ptr) {
intptr_t PtrVal = reinterpret_cast<intptr_t>(Ptr);
- assert((PtrVal & (1 << IntBits)-1) == 0 &&
+ assert((PtrVal & ((1 << IntBits)-1)) == 0 &&
"Pointer is not sufficiently aligned");
Value = PtrVal | (intptr_t)getInt();
}
More information about the llvm-commits
mailing list