On 12/01/2015 01:34 PM, Jakub Jelinek wrote:
Hi!

get_parm_info right now uses input_location as the diagnostics locus, but as
can be seen on the testcase, that is pretty random location at that point,
often the type of the last parameter.

This patch changes it to use the locus from the binding info.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2015-12-01  Jakub Jelinek  <ja...@redhat.com>

        PR c/68533
        * c-decl.c (get_parm_info): Use b->locus instead of input_location
        for diagnostics.

        * gcc.dg/pr68533.c: New test.
I think the change itself is fine. My question is whether or not the C++ front-end gets this right. ISTM we ought to be running the test on both the C & C++ front-ends. The C++ front-end may emit different messages, but we ought to be able to account for that and ensure that we're getting them on the right lines.

Jeff


Reply via email to