mirror of
https://github.com/Z3Prover/z3
synced 2025-06-14 18:06:15 +00:00
fixes for #1296, removing COMPILE_TIME_ASSERT
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f359f23885
commit
cae414e575
13 changed files with 27 additions and 28 deletions
|
@ -558,7 +558,7 @@ void mpz_manager<SYNCH>::big_rem(mpz const & a, mpz const & b, mpz & c) {
|
|||
|
||||
template<bool SYNCH>
|
||||
void mpz_manager<SYNCH>::gcd(mpz const & a, mpz const & b, mpz & c) {
|
||||
COMPILE_TIME_ASSERT(sizeof(a.m_val) == sizeof(int));
|
||||
static_assert(sizeof(a.m_val) == sizeof(int), "size mismatch");
|
||||
if (is_small(a) && is_small(b) && a.m_val != INT_MIN && b.m_val != INT_MIN) {
|
||||
int _a = a.m_val;
|
||||
int _b = b.m_val;
|
||||
|
@ -724,7 +724,7 @@ void mpz_manager<SYNCH>::gcd(mpz const & a, mpz const & b, mpz & c) {
|
|||
|
||||
#ifdef LEHMER_GCD
|
||||
// For now, it only works if sizeof(digit_t) == sizeof(unsigned)
|
||||
COMPILE_TIME_ASSERT(sizeof(digit_t) == sizeof(unsigned));
|
||||
static_assert(sizeof(digit_t) == sizeof(unsigned), "");
|
||||
|
||||
int64 a_hat, b_hat, A, B, C, D, T, q, a_sz, b_sz;
|
||||
mpz a1, b1, t, r, tmp;
|
||||
|
@ -1754,7 +1754,7 @@ void mpz_manager<SYNCH>::mul2k(mpz & a, unsigned k) {
|
|||
}
|
||||
|
||||
#ifndef _MP_GMP
|
||||
COMPILE_TIME_ASSERT(sizeof(digit_t) == 4 || sizeof(digit_t) == 8);
|
||||
static_assert(sizeof(digit_t) == 4 || sizeof(digit_t) == 8, "");
|
||||
#endif
|
||||
|
||||
template<bool SYNCH>
|
||||
|
@ -1821,7 +1821,7 @@ unsigned mpz_manager<SYNCH>::log2(mpz const & a) {
|
|||
if (is_small(a))
|
||||
return ::log2((unsigned)a.m_val);
|
||||
#ifndef _MP_GMP
|
||||
COMPILE_TIME_ASSERT(sizeof(digit_t) == 8 || sizeof(digit_t) == 4);
|
||||
static_assert(sizeof(digit_t) == 8 || sizeof(digit_t) == 4, "");
|
||||
mpz_cell * c = a.m_ptr;
|
||||
unsigned sz = c->m_size;
|
||||
digit_t * ds = c->m_digits;
|
||||
|
@ -1843,7 +1843,7 @@ unsigned mpz_manager<SYNCH>::mlog2(mpz const & a) {
|
|||
if (is_small(a))
|
||||
return ::log2((unsigned)-a.m_val);
|
||||
#ifndef _MP_GMP
|
||||
COMPILE_TIME_ASSERT(sizeof(digit_t) == 8 || sizeof(digit_t) == 4);
|
||||
static_assert(sizeof(digit_t) == 8 || sizeof(digit_t) == 4, "");
|
||||
mpz_cell * c = a.m_ptr;
|
||||
unsigned sz = c->m_size;
|
||||
digit_t * ds = c->m_digits;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue