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 <mli...@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(-)
>
>
>