public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey via Gdb <gdb@sourceware.org>
Cc: Pedro Alves <pedro@palves.net>,
	"Zaric, Zoran (Zare)" <Zoran.Zaric@amd.com>,
	Joel Brobecker <brobecker@adacore.com>
Subject: Re: gmp's c++ interface / mpz_class
Date: Mon, 24 Oct 2022 09:34:54 -0400	[thread overview]
Message-ID: <Y1aUfuRM/Vf+KY4Q@adacore.com> (raw)
In-Reply-To: <87mt9ujrgw.fsf@tromey.com>

> Pedro> In gdb/gmp-utils.h.  However, we need do to arithmetic on the type, and this wrapper
> Pedro> type doesn't implement operator+, operator-, etc, etc.  I guess we could add those,
> Pedro> as wrappers around mpz_add, etc.  Or use raw mpz_add, etc. directly.  However, I just found
> Pedro> out that GMP already has its own C++ interface:
> 
> Pedro>  https://gmplib.org/manual/C_002b_002b-Interface-General
> 
> Pedro> Before we explore this further, is there an already known reason we shouldn't be using
> Pedro> that interface?
> 
> I feel sure Joel and I have talked about it, but I don't remember what
> reason there was any more.

Yes, we talked about it for sure, and decided against it, but I don't
remember the reasons, unfortunately :-(.

> The warning in the manual is a bit
> off-putting, though:
> 
>        *Everything described in this chapter is to be considered preliminary
>     and might be subject to incompatible changes if some unforeseen
>     difficulty reveals itself.*

I do remember this comment played a part.

-- 
Joel

      reply	other threads:[~2022-10-24 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 18:11 Pedro Alves
2022-10-14 20:42 ` Pedro Alves
2022-10-19 10:28   ` Florian Weimer
2022-10-17 10:44 ` Luis Machado
2022-10-17 11:29   ` Pedro Alves
2022-10-17 17:21 ` Tom Tromey
2022-10-24 13:34   ` Joel Brobecker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1aUfuRM/Vf+KY4Q@adacore.com \
    --to=brobecker@adacore.com \
    --cc=Zoran.Zaric@amd.com \
    --cc=gdb@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).