Re: gmp's c++ interface / mpz_class

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 2022-10-17 11:44 a.m., Luis Machado wrote:
> On 10/14/22 19:11, Pedro Alves wrote:
>> Hi!
>>
>> Zoran and I found a potential need for an integer type with precision of 64-bit + 8-bit, in order to
>> store bit offsets that can span a whole 64-bits address space.  Instead of rolling our own,
>> I guess it makes sense to use libgmp, since, well, we already depend on it.  I see that we have:
> 
> Is uint128_t an option (at least temporarily)?

That is not portable, unfortunately.  It doesn't exist in all compilers, and/or all architectures.

So it's useful to prototype things, but it's not something we can use, because we need this in
core code (DWARF expression evaluation).

We may end up with something like a typedef that maps to int128_t when available,
and to a C++ class emulation when not available, though.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.