
GMP's C++ interface currently does not support constructors and accessors taking long-longs and long-doubles. Are there any plans to relax this limitation, at least as far as long-longs are concerned? Cheers,
Roberto

Roberto Bagnara bagnara@cs.unipr.it writes:
GMP's C++ interface currently does not support constructors and accessors taking long-longs and long-doubles. Are there any plans to relax this limitation, at least as far as long-longs are concerned?
The problem for the C functions is outlined in tasks.html. I'd like to add longlong conversions for gcc, and worry later about other possible compilers with or without that type.
For C++ is longlong is always available? If there's no risk of a missing type then I guess we could do something about conversions for mpz_class etc, even if initially they come out as slightly bloated code.

On Sun, 19 Oct 2003, Kevin Ryde wrote:
For C++ is longlong is always available? If there's no risk of a missing type then I guess we could do something about conversions for mpz_class etc, even if initially they come out as slightly bloated code.
long long (two words) was added to the C99 standard- one of my beefs with said standard. Most conformant C89 compilers don't support long long, or at least didn't last time I checked (it's been a couple of years since I had an account on a non-Linux box).
So now the question is: what does the GMP development community feel about these older compilers?
Brian

Brian Hurt bhurt@spnz.org writes:
So now the question is: what does the GMP development community feel about these older compilers?
We try to go pretty far back on the C side of things. c89 definitely.

Kevin Ryde wrote:
Roberto Bagnara bagnara@cs.unipr.it writes:
GMP's C++ interface currently does not support constructors and accessors taking long-longs and long-doubles. Are there any plans to relax this limitation, at least as far as long-longs are concerned?
The problem for the C functions is outlined in tasks.html. I'd like to add longlong conversions for gcc, and worry later about other possible compilers with or without that type.
For C++ is longlong is always available? If there's no risk of a missing type then I guess we could do something about conversions for mpz_class etc, even if initially they come out as slightly bloated code.
All the compilers I use (i.e., g++, Comeau and Intel C++ compiler) do have longlong. I don't know about other compilers. I am pretty sure that longlong will become standard in C++ as is now in C (there is a rather strong consensus on this). I really think it would be nice for GMP to support longlongs. Cheers,
Roberto

Roberto Bagnara bagnara@cs.unipr.it writes:
All the compilers I use (i.e., g++, Comeau and Intel C++ compiler) do have longlong. I don't know about other compilers. I am pretty sure that longlong will become standard in C++ as is now in C (there is a rather strong consensus on this).
One possibility would be to put some conversions routines in libgmpxx, with C linkage so they can move to libgmp one day. But perhaps it's a bit nasty to have what should be C stuff in with the C++.
participants (3)
-
Brian Hurt
-
Kevin Ryde
-
Roberto Bagnara