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++/22047] New: friend declaration for typedef object


template<class T> 
class T1{

public:
    typedef T1<T> td;
    friend td;
};

The above code is giving the below warning in forte6.2 compiler.
Warning:A "friend" declaration must specify a class or function.

FYI this code is working fine in forte4.2 compiler.
Please let me know the corrections to me made??

-- 
           Summary: friend declaration for typedef object
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kumar dot mahesh at cognizant dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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