public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Rewrite gdb_mpz::operator==
Date: Fri, 21 Apr 2023 09:13:58 -0400	[thread overview]
Message-ID: <a90b6fb1-39da-8204-0352-92fb8ee40b6a@simark.ca> (raw)
In-Reply-To: <875y9p2xvg.fsf@tromey.com>

On 4/21/23 09:00, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
> 
> Simon> It's a bit hard to understand what the intent is, if you don't know the
> Simon> problematic already.  Could you add a comment explaining that?
> 
> Sure.
> 
> Simon> Also, wouldn't it work to compare size?  Like:
> Simon>   if (sizeof (T) <= sizeof (long))
> 
> Yeah, though I was concerned that the compiler might emit warnings about
> always-true conditions in this case.

Well, that would be surprising for code in a template, where T is not
know in advance.

Simon

  reply	other threads:[~2023-04-21 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 15:09 Tom Tromey
2023-04-19 16:23 ` Simon Marchi
2023-04-21 13:00   ` Tom Tromey
2023-04-21 13:13     ` Simon Marchi [this message]
2023-04-21 15:02       ` Tom Tromey
2023-04-24 16:31         ` Tom Tromey
2023-04-25 18:55           ` Simon Marchi

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=a90b6fb1-39da-8204-0352-92fb8ee40b6a@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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).