From: vijay_ganesh Date: Fri, 28 Aug 2009 19:40:51 +0000 (+0000) Subject: Got rid of the annoying warning in AST.cpp compilation due to more than 64 bit shifti... X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=77374ecb15214e74540c192c6dc394ae0790e8ff;p=francis%2Fstp.git Got rid of the annoying warning in AST.cpp compilation due to more than 64 bit shifting. No error. The compiler was over-zealous git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@152 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/Makefile b/Makefile index 8f9931e..24ddc7c 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ install: all .PHONY: clean clean: - rm -rf *~ + rm -rf *~ scripts/*~ rm -rf *.a rm -rf lib/*.a rm -rf test/*~ diff --git a/src/AST/AST.cpp b/src/AST/AST.cpp index af22539..fa975c9 100644 --- a/src/AST/AST.cpp +++ b/src/AST/AST.cpp @@ -407,12 +407,13 @@ ASTNode BeevMgr::CreateBVConst(unsigned int width, unsigned long long int bvcons //number of bits in unsigned long. The variable "copied" keeps //track of the number of chunks copied so far + int shift_amount = (sizeof(unsigned long) << 3); while (copied + (sizeof(unsigned long) << 3) < width) { - CONSTANTBV::BitVector_Chunk_Store(bv, sizeof(unsigned long) << 3, copied, c_val); - bvconst = bvconst >> (sizeof(unsigned long) << 3); + CONSTANTBV::BitVector_Chunk_Store(bv, shift_amount, copied, c_val); + bvconst = bvconst >> shift_amount; c_val = (~((unsigned long) 0)) & bvconst; - copied += sizeof(unsigned long) << 3; + copied += shift_amount; } CONSTANTBV::BitVector_Chunk_Store(bv, width - copied, copied, c_val); return CreateBVConst(bv, width);