This is the mail archive of the gcc-bugs@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]

[Bug c++/58263] [feature request] friend class $UndefinedClass


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58263

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|trivial                     |enhancement

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to vova7890 from comment #0)
> Maybe need to check, have we declaration or not. If not - got a warning
> about missing declaration.

That can't work, consider:

// A.h
class A {
  A();
  friend class B;
};

// B.h
#include "A.h"
class B { };

// A.cc
#include "A.h"
A::A() {}

Do we warn in A.cc that B is not defined? It is defined in another header, but
that isn't included by A.cc because it isn't needed.


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