This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] use fallback location for warning (PR 91599)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Sebor <msebor at gmail dot com>, David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Aug 2019 09:30:31 +0200
- Subject: Re: [PATCH] use fallback location for warning (PR 91599)
- References: <3c552e86-f26e-5b98-44b5-cae3f361721a@gmail.com>
On Fri, Aug 30, 2019 at 3:58 AM Martin Sebor <msebor@gmail.com> wrote:
>
> warning_at() calls with the %G directive rely on the gimple statement
> for both their location and the inlining context. When the statement
> is not associated with a location, the warning doesn't point at any
> line even if the location argument passed to the call was valid.
> The attached patch changes the percent_G_percent handler to fall back
> on the provided location in that case, and the recently added warning
> for char assignments to pass to the function a fallback location if
> the statement doesn't have one.
>
> Tested on x86_64-linux.
OK unless David has any further comments.
Richard.
>
> Martin