This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve location information of -Wcoverage-mismatch.
- From: Martin Liška <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 21 Sep 2018 11:04:50 +0200
- Subject: Re: [PATCH] Improve location information of -Wcoverage-mismatch.
- References: <2068f6e1-5f4a-6ae5-e298-1bd3b86666b0@suse.cz>
PING^1
On 9/12/18 2:37 PM, Martin Liška wrote:
> Hi.
>
> The patch improves locations of the warning in following way:
>
> sample.c: In function ‘main’:
> sample.c:16:1: error: source locations for function ‘main’ have changed, the profile data may be out of date [-Werror=coverage-mismatch]
> 16 | }
> | ^
> sample.c:16:1: error: source locations for function ‘main’ have changed, the profile data may be out of date [-Werror=coverage-mismatch]
> cc1: some warnings being treated as errors
>
> into:
>
> sample.c: In function ‘main’:
> sample.c:10:5: error: source locations for function ‘main’ have changed, the profile data may be out of date [-Werror=coverage-mismatch]
> 10 | int main()
> | ^~~~
> sample.c:10:5: error: source locations for function ‘main’ have changed, the profile data may be out of date [-Werror=coverage-mismatch]
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2018-09-12 Martin Liska <mliska@suse.cz>
>
> * coverage.c (get_coverage_counts): Use warning_at
> with current_function_decl location. Use %qD in warning
> message.
> ---
> gcc/coverage.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
>
>