On Mon, Sep 9, 2013 at 5:38 AM, Paolo Carlini <paolo.carl...@oracle.com> wrote: > On 09/09/2013 11:37 AM, Richard Biener wrote: >> >> That said, grepping for %q+D reveals quite some uses and it looks like >> all of them expect the location being used to be that of the decl passed >> to the diagnostic call, not some random other location. > > If the decl is *not* a PARM_DECL, I expect %q+D to be often accurate. In > fact, even when *is* a PARM_DECL what we have now is pretty decent, because > normally the location of the corresponding FUNCTION_DECL isn't that far. The > point is whether we want to be *more* accurate and point to the specific > unused parameter, for C and C++, as clang and icc do.
I think the logic is simpler if we use the xxx_at form in these cases. -- Gaby