public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Alexander Monakov <amonakov@ispras.ru>, gcc-patches@gcc.gnu.org
Subject: Re: Fix for PR sanitize/65000 introduces an unusual gcc_assert
Date: Wed, 28 Oct 2015 18:09:00 -0000	[thread overview]
Message-ID: <56310EFA.3010509@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.20.1510282036530.13239@monopod.intra.ispras.ru>

On 10/28/2015 10:47 AM, Alexander Monakov wrote:
> Hello Richard,
>
> Your commit to fix PR 65000 (pasted below) introduced
>    gcc_assert (ri = (int)ri);
>
> I'm unclear what is meant there; if equality test was meant, that looks
> suspicious to me because truncating conversion is implementation-defined.

Of course equality was meant.  And since the argument to bitmap_set_bit is of 
type int, the same truncation would happen there.  So this just verifies that 
we don't lose information during the conversion.

Since implementation defined doesn't mean undefined, I see no problem.


r~

  reply	other threads:[~2015-10-28 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 17:51 Alexander Monakov
2015-10-28 18:09 ` Richard Henderson [this message]
2015-10-28 19:18   ` Richard Biener
2015-10-28 19:43     ` Richard Henderson

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=56310EFA.3010509@redhat.com \
    --to=rth@redhat.com \
    --cc=amonakov@ispras.ru \
    --cc=gcc-patches@gcc.gnu.org \
    /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).