public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization/107561 - reduce -Wstringop-overflow false positives
Date: Fri, 31 Mar 2023 08:13:02 -0600	[thread overview]
Message-ID: <52a18588-e22f-6cf2-c3b0-712efbdb3082@gmail.com> (raw)
In-Reply-To: <20230329121203.002E43858434@sourceware.org>



On 3/29/23 06:11, Richard Biener via Gcc-patches wrote:
> The following tells pointer-query to prefer a zero size when we
> are querying for the size range for a write into an object we've
> determined is of zero size.  That avoids diagnostics about really
> varying size arguments that just get a meaningful range for example
> because they are multiplied by an element size.
> 
> I've adjusted only one call to get_size_range since that's what
> I have a testcase for.  I think this is the most sensible
> "workaround" for some of the false positives we see.
> 
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> 
> OK if it succeeds?
> 
> Thanks,
> Richard.
> 
> 	PR tree-optimization/107561
> 	* gimple-ssa-warn-access.cc (get_size_range): Add flags
> 	argument and pass it on.
> 	(check_access): When querying for the size range pass
> 	SR_ALLOW_ZERO when the known destination size is zero.
> 
> 	* g++.dg/pr71488.C: Remove XFAILed bogus diagnostic again.
> 	* g++.dg/warn/Warray-bounds-16.C: Likewise.
OK.
jeff

       reply	other threads:[~2023-03-31 14:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230329121203.002E43858434@sourceware.org>
2023-03-31 14:13 ` Jeff Law [this message]
2023-03-30 11:16 Richard Biener
  -- strict thread matches above, loose matches on Subject: below --
2023-03-29 12:11 Richard Biener

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=52a18588-e22f-6cf2-c3b0-712efbdb3082@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --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).