public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH V3] Add warning options -W[no-]compare-distinct-pointer-types
Date: Tue, 30 Aug 2022 22:09:07 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2208302207420.446383@digraph.polyomino.org.uk> (raw)
In-Reply-To: <87pmgl94l2.fsf@oracle.com>

On Sat, 27 Aug 2022, Jose E. Marchesi via Gcc-patches wrote:

> +  if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer types" } */

> +  if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer types" } */

> +  if (metadata + 1 > data) /* There shouldn't be a warning here.  */

It seems the tests are only testing the '>' comparison operator.  I think 
all six comparison operators should be tested (in particular, you're 
changing two pedwarns - separate code paths for ordered and equality 
comparisons - but the tests only appear to cover one of the two).

-- 
Joseph S. Myers
joseph@codesourcery.com

      reply	other threads:[~2022-08-30 22:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27 13:52 Jose E. Marchesi
2022-08-30 22:09 ` Joseph Myers [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=alpine.DEB.2.22.394.2208302207420.446383@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jose.marchesi@oracle.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).