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

Reply via email to