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++/19200] New: Friend declaration misinterpreted as constructor


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


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