Hi, > On 10/giu/2014, at 16:32, Jason Merrill <ja...@redhat.com> wrote: > >> On 06/10/2014 05:58 AM, Paolo Carlini wrote: >> && (friendp == 0 || dname == current_class_name)) > > Can't we just drop the dname condition here, rather than clear ctype later? > That seems to be specifically what we're fixing: a friend is not a member > function even if it has the same name as the class.
Back to you in a few hours, but I suspect we would have trouble with the famous struct S { friend S::S(); }; compiled with -fpermissive. If you ask me, assuming the idea otherwise works, I'm certainly in favor of turning the permerror into error and adjusting the testsuite, instead of further fiddling with grokdeclarator and complicating it... Did you consider this special case?!? Thanks, Paolo