On 6/5/19 2:09 PM, Paolo Carlini wrote:
Hi,
On 05/06/19 19:45, Jason Merrill wrote:
On 6/4/19 11:57 AM, Paolo Carlini wrote:
Hi,
On 04/06/19 16:50, Jason Merrill wrote:
On 6/4/19 10:31 AM, Paolo Carlini wrote:
+ permerror (loc, "member functions are implicitly "
+ "friends of their class");
Wouldn't it be better to use the location of "friend" in this
diagnostic?
Yes, however doing that fully correctly seems a bit tricky
Why tricky? Doesn't declspecs->locations[ds_friend] work?
To be honest, here I wasn't considering ds_friend at all. Indeed it
gives us the location of 'friend', but, say, for a testcase like
parse/friend4.C:
struct A
{
friend void A::foo(); // { dg-error "implicitly friends" }
friend A::~A(); // { dg-error "implicitly friends" }
};
I thought we wanted a precise caret under the 'f' of 'foo' and the '~'
of the destructor - both clang and icc do that - I wasn't even
considering pointing at 'friend'. If you think that would be an
improvement wrt the current closed parenthesis - I agreee it would! - I
can do that!
Please do.
Jason