This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)
- From: Jeff Law <law at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 14 Dec 2017 12:32:05 -0700
- Subject: Re: [PATCH] have -Wnonnull print inlining stack (PR 83369)
- Authentication-results: sourceware.org; auth=none
- References: <07d67ec3-918f-ba7c-08cf-6c523b09b086@gmail.com>
On 12/11/2017 09:51 AM, Martin Sebor wrote:
> Bug 83369 - Missing diagnostics during inlining, notes that when
> -Wnonnull is issued for an inlined call to a built-in function,
> GCC doesn't print the inlining stack, making it hard to debug
> where the problem comes from.
>
> When the -Wnonnull warning was introduced into the middle-end
> the diagnostic machinery provided no way to print the inlining
> stack (analogous to %K for trees). Since then GCC has gained
> support for the %G directive which does just that. The attached
> patch makes use of the directive to print the inlining context
> for -Wnonnull.
>
> The patch doesn't include a test because the DejaGnu framework
> provides no mechanism to validate this part of GCC output (see
> also bug 83336).
>
> Tested on x86_64-linux with no regressions.
So thinking more about this, I don't see a strong reason not to move
forward with this fix in the immediate term.
If we ultimately remove %K/%G, then obviously we'll revisit this chunk
of code in the process.
OK for the trunk.
jeff