apparently GCC doesn't believe that I understand C
authorChris Lattner <sabre@nondot.org>
Sat, 29 Nov 2008 08:36:39 +0000 (08:36 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 29 Nov 2008 08:36:39 +0000 (08:36 +0000)
precedence rules.  Pacify it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60237 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/PointerIntPair.h

index 773dea49c25bb0ccfd304aa9a1e415f6f09333d7..4c4bb7dd081f89b65be532f080018ec218abbb96 100644 (file)
@@ -42,12 +42,12 @@ public:
   }
   
   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();
   }