From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id CBA153857B85 for ; Mon, 24 Oct 2022 13:34:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CBA153857B85 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wr1-x431.google.com with SMTP id o4so8037546wrq.6 for ; Mon, 24 Oct 2022 06:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Ug2gbh2lpGI755PyBQgImQ4IE0sR5mj7J6CKuMjiF2U=; b=T74WWrLl4+QC5vjWgMAYGVlN1IpRmx7omLX4mLsxu26sixacGtudX8POtLm+xEfQhU tn7uJa+i3FZ5i/qDaa1qVfg9zFUCQiDImxEYP0qtvrxAQi0m9zPsKaaWzOQSgeXyusKg 0YClyWXVY935Z+2d7KDbr+x0c10SK6pnzSZ4rfNMRt4HmQJRwM1xpwvk9yf3wZ2E+BJv iZ0xr7r2NATC/iLCQ31infnV2VCmUarlFkEpiu98zekaPQULhEJyvYREso7O+/sZmddJ gahJk9VxpeROHq+rLqvmPXa/O9AO2nGag12uMgSAgSI5B3yXzv/l0SF1z8VBjhEQ/35k J+bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ug2gbh2lpGI755PyBQgImQ4IE0sR5mj7J6CKuMjiF2U=; b=LwDb0h1KKKxbZsQUua4eE6mzZ/fUzQTDHO0L2JjFLylJKiXloddXzRS1dFg9wggo9O p/mIeaV0n5SWA/kej+rUspoHabiIZ7+YZUAgRbzBYceKgyL6jzdItP6N0Z2CFvrITZhk h/Srsck90oEmsbCb3AnZgVRbUBhewP++z1KX/57mXkkR20XLxl1P0O3aEJEwNrWRRF/H ArSxdmcGFuC/I3ysuqkQUaqJ3Wx27Jt2QbSj5PgO0wLlTYhJtEICeGs7T9U4UI/rDj2s gDD6Bfnx+0l2gF+zzI1VtjdTt/wXS8DM164lSflGhnZlKT1xjeGeVg3F62tCGjC8sCiP Hsiw== X-Gm-Message-State: ACrzQf1Zrtn6XGBZuU8l91+wnXKK3iT/R/3kVnytq2HbPaPMhXGf+BPy dRhzmpBARQqkQgzWk2dWIEkX X-Google-Smtp-Source: AMsMyM7AJwwh/MoN14xNOGbKTnQwQbupZnH/LzpJ3mE3DQp3WDHPuj0rItUF2RRAooOe7eYfD0pzRg== X-Received: by 2002:a5d:5c04:0:b0:234:88dc:3d19 with SMTP id cc4-20020a5d5c04000000b0023488dc3d19mr16121784wrb.681.1666618497365; Mon, 24 Oct 2022 06:34:57 -0700 (PDT) Received: from takamaka.gnat.com ([37.171.29.48]) by smtp.gmail.com with ESMTPSA id r18-20020a05600c35d200b003c6c182bef9sm10832389wmq.36.2022.10.24.06.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:34:56 -0700 (PDT) Received: by takamaka.gnat.com (Postfix, from userid 1000) id 55AAE81B3A; Mon, 24 Oct 2022 09:34:54 -0400 (EDT) Date: Mon, 24 Oct 2022 09:34:54 -0400 From: Joel Brobecker To: Tom Tromey via Gdb Cc: Pedro Alves , "Zaric, Zoran (Zare)" , Joel Brobecker Subject: Re: gmp's c++ interface / mpz_class Message-ID: References: <87mt9ujrgw.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mt9ujrgw.fsf@tromey.com> X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > 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