c++/4239: g++ 3.0.1 can't declare a partial specialization a friend

sebor@roguewave.com sebor@roguewave.com
Wed Sep 5 12:16:00 GMT 2001


>Number:         4239
>Category:       c++
>Synopsis:       g++ 3.0.1 can't declare a partial specialization a friend
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 05 12:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     sebor@roguewave.com
>Release:        gcc 3.0.1
>Organization:
>Environment:

>Description:
I think I reported this bug against 2.95.2 but I can't find
the PR. In any case, it's been discussed (*) on the core
reflector [ mailto:c++std-core@research.att.com ] and the
opinion seems to be that the the test case is legal. If
you disagree you may want to reopen the discussion and/or
file an issue (I don't think one has been filed).

Thanks
Martin

(*) see c++std-core-86{07,08,10,11,12,13,15}
>How-To-Repeat:
$ cat t.cpp ; g++ t.cpp
template <class T> struct S;

template <class T>
struct S<T*>
{
    struct X {
        friend struct S;
    };
};

int main ()
{
    S<int*>::X x;
}

t.cpp:7: partial specialization `S<T*>' declared `friend'
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list