File t_assign.diff of Package mpir
From: Jan Engelhardt <jengelh@inai.de>
Date: 2014-10-15 12:38:30.296690020 +0200
Let building the testsuite succeed on SLE11SP3's gcc 4.3 on x86.
g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../tests -march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fexceptions -c -o t-assign.o t-assign.cc
t-assign.cc:124: error: integer constant is too large for 'long' type
t-assign.cc:127: error: integer constant is too large for 'long' type
t-assign.cc:132: error: integer constant is too large for 'long' type
t-assign.cc:135: error: integer constant is too large for 'long' type
---
tests/cxx/t-assign.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: mpir-2.6.0/tests/cxx/t-assign.cc
===================================================================
--- mpir-2.6.0.orig/tests/cxx/t-assign.cc
+++ mpir-2.6.0/tests/cxx/t-assign.cc
@@ -121,18 +121,18 @@ check_mpz (void)
#ifdef MPIRXX_HAVE_LLONG
// operator=(unsigned long int)
{
- unsigned long long int a = 0x1234567812345678;
+ unsigned long long int a = 0x1234567812345678ULL;
mpz_class b;
b = a;
- ASSERT_ALWAYS(b == 0x1234567812345678);
+ ASSERT_ALWAYS(b == 0x1234567812345678ULL);
}
// operator=(unsigned long int)
{
- long long int a = 0xfedcba9876543210;
+ long long int a = 0xfedcba9876543210ULL;
mpz_class b;
b = a;
- ASSERT_ALWAYS(b == (mpir_si)0xfedcba9876543210);
+ ASSERT_ALWAYS(b == (mpir_si)0xfedcba9876543210ULL);
}
#endif