This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58263] [feature request] friend class $UndefinedClass
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Aug 2013 14:51:30 +0000
- Subject: [Bug c++/58263] [feature request] friend class $UndefinedClass
- Auto-submitted: auto-generated
- References: <bug-58263-4 at http dot gcc dot gnu dot org/bugzilla/>
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.