HPUX 11 Build Problems with cc Compiler
tg at gmplib.org
Tue Feb 23 22:29:22 CET 2010
Warren Gray <ve3wwg at gmail.com> writes:
I was trying to build libgmp under HPUX 11 using the old cc compiler,
for +DA2.0N architecture. This (32-bits) is required because another
project (Postgres) doesn't seem to like +DA2.0W.
The libgmp build problems boil down to two things:
1. The switch() statement cannot handle values > 32 bits. This comes up in
"cc: "mod_1_3.c", line 89: error 1654: Expression type is too
large for switch
expression". This is simple to fix (the result can safely be
reduced to 32-bits).
2. The other problem that comes up in "cc: "sqrtrem.c", line 124: warning 602:
Integer constant exceeds its storage", which is a bit trickier.
Also the value
MAGIC is a problem in line 131.
If the attachment doesn't make the list, email me and I'll be glad to
fwd it to you.
In the 2nd case, it was necessary for me to declare a temp of type
mp_limb_signed_t and use smaller constants and shifting to compensate
for the compiler deficiency.
Thanks for the report!
I have checked in fixes to the public GMP repo.
Could you please test it?
More information about the gmp-bugs