This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 19200


Hi,

> On 10/giu/2014, at 16:32, Jason Merrill <jason@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]