This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: enable -Wformat-truncation with -Og (PR 79691)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Martin Sebor <msebor at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 24 Feb 2017 11:13:53 +0100
- Subject: Re: enable -Wformat-truncation with -Og (PR 79691)
- Authentication-results: sourceware.org; auth=none
- References: <d646bdf4-9401-1648-6038-ce8e826419ad@gmail.com> <CAFiYyc0gWCJPczDWMpgJ5vT9ZCkHVq5h=mu59A7oUe+DE0Vm4A@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Feb 24, 2017 at 11:10:51AM +0100, Richard Biener wrote:
> On Fri, Feb 24, 2017 at 1:35 AM, Martin Sebor <msebor@gmail.com> wrote:
> > Bug 79691 - -Wformat-truncation suppressed by (and only by) -Og
> > points out that the gimple-ssa-sprintf pass doesn't run when
> > this optimization option is used. That's because I forgot to
> > add it to the set of optimization passes that run with that
> > option. The attached trivial patch tested on x86_64 corrects
> > the oversight.
> >
> > Is this okay for 7.0?
>
> Any reason for the placement before copy-prop? I'd have done it
> after pass_late_warn_uninitialized for example.
>
> Also doesn't pass_sprintf_length rely on get_range_info ()? With -Og
> nothing populates those so you'll always get effectively VARYING ranges.
-O0 and -O1 are the same case with that though.
Jakub