public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Martin Sebor <msebor@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, Aldy Hernandez <aldyh@redhat.com>
Subject: Re: [PATCH] run early sprintf warning after SSA (PR 100325)
Date: Wed, 5 May 2021 09:26:50 +0200	[thread overview]
Message-ID: <CAFiYyc038ZDGA+q6qkhvFMCGXD3qUQVNt0qwz806BAb=7h3FiQ@mail.gmail.com> (raw)
In-Reply-To: <a1923ce5-562a-4a9b-cc4d-e34656d94bc2@gmail.com>

On Wed, May 5, 2021 at 1:32 AM Martin Sebor via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> With no optimization, -Wformat-overflow and -Wformat-truncation
> runs early to detect a subset of simple bugs.  But as it turns out,
> the pass runs just a tad too early, before SSA.  That causes it to
> miss a class of problems that can easily be detected once code is
> in SSA form, and I would expect might also cause false positives.
>
> The attached change moves the sprintf pass just after pass_build_ssa,
> similar to other early flow-sensitive warnings (-Wnonnull-compare and
> -Wuninitialized).

Makes sense.  I suppose walloca might also benefit from SSA - it seems
to do range queries which won't work quite well w/o SSA?

Thus OK.

Thanks,
Richard.

> Martin

  reply	other threads:[~2021-05-05  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 22:15 Martin Sebor
2021-05-05  7:26 ` Richard Biener [this message]
2021-05-06 14:32   ` Aldy Hernandez
2021-05-07  0:12     ` Martin Sebor
2021-05-07  9:34       ` Richard Biener
2021-05-07  9:49         ` Aldy Hernandez

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='CAFiYyc038ZDGA+q6qkhvFMCGXD3qUQVNt0qwz806BAb=7h3FiQ@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=msebor@gmail.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).