This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19200] New: Friend declaration misinterpreted as constructor
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Dec 2004 11:53:03 -0000
- Subject: [Bug c++/19200] New: Friend declaration misinterpreted as constructor
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hello:
-------------------------------
struct S {
struct T{};
friend void S(T);
};
-------------------------------
lookup.cc:3: error: return type specification for constructor invalid
lookup.cc:3: warning: member functions are implicitly friends of their class
G++ thinks that the friend declaration is declaring the constructor (with an
invalid return type specification) as friend. This is bogus of course.
It might be a regression, but it was there at least in 3.3.
--
Summary: Friend declaration misinterpreted as constructor
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: giovannibajo at libero dot it
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19200