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]

RFA: Warning or error for PR c++/22293?


The code snippet

  struct A
  {
      friend ~A();
  };

from PR22293 used to give a warning:

  PR22293.cc:3: warning: member functions are implicitly friends of their class

We now have an ICE that I want to fix.
The question is: Should I restore the previous situation, or should I
issue an error like:

  PR22293.cc:3: error: unqualified destructor '~A' cannot be declared friend

Btw, for the same situation with a constructor

  struct A
  {
      friend A();
  };

we used to give the same warning as above before GCC 3.4.0, but since
GCC 3.4.0 it's a hard (thought not very helpful) error:

  PR22293.cc:3: error: expected unqualified-id before ')' token

What are the preferences?

Regards,
Volker



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