On 9/12/18 6:37 AM, 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  <mli...@suse.cz>
> 
>       * coverage.c (get_coverage_counts): Use warning_at
>       with current_function_decl location. Use %qD in warning
>       message.
OK.
jeff

Reply via email to