This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Provide inlining context in strict-overflow warnings
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 May 2014 11:34:40 +0200
- Subject: Re: [PATCH] Provide inlining context in strict-overflow warnings
- Authentication-results: sourceware.org; auth=none
- References: <5372720C dot 20404 at redhat dot com>
On Tue, May 13, 2014 at 9:27 PM, Florian Weimer <fweimer@redhat.com> wrote:
> Patterns that trigger the optimization and warning can form after inlining,
> and it can be rather difficult to figure out what exactly is causing the
> warning. The inlining context at least provides additional hints, enabling
> developers to substitute the arguments and discover what, precisely, is
> happening.
>
> More context is provided with -g than without, but I think this is
> acceptable.
>
> I bootstrapped and tested the attached patch on x86_64-redhat-linux-gnu,
> with no new regressions.
I think that your block walking code is bogus in that it looks at
only BLOCK_SOURCE_LOCATION, exposing an implementation
detail that should be hidden by using inlined_function_outer_scope_p.
It also will print an unlimited call stack - isn't that too verbose?
Thanks,
Richard.
> --
> Florian Weimer / Red Hat Product Security Team