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]

template friend bug when using namespaces.


Code that causes internal compiler error:

---- dumbtest.cpp ------
namespace ANamespace {

    template <class T>
    class AClass {
        template <class U>
        friend class AClass;
    };

}

int main()
{
    return 0;
}
---- end dumbtest.cpp --

Notice that there are no includes.

Command line: g++ -c dumbtest.cpp


If you remove the namespace, the code will compile fine.


My system:
RedHat 6.0 with kernel 2.2.9, gcc 2.95.1


Hope this helps,
Jason



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