[PATCH] use fallback location for warning (PR 91599)

Richard Biener richard.guenther@gmail.com
Fri Aug 30 08:02:00 GMT 2019


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



More information about the Gcc-patches mailing list