This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]