c++/4403: incorrect class becomes a friend in template

nathan@codesourcery.com nathan@codesourcery.com
Wed Sep 26 09:06:00 GMT 2001


>Number:         4403
>Category:       c++
>Synopsis:       incorrect class becomes a friend in template
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 26 09:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     nathan@codesourcery.com
>Release:        CVS, 3.0.1, cp-parser-branch
>Organization:
>Environment:

>Description:
during the cp-parser-branch development, I find that
g++.pt/inherit2.C makes the wrong class a friend.
We sued to give the correct diagnostic about
friend struct AC making ::AC a friend not A<T>::AC,
but infact we do make A<T>::AC the friend.

The test case did not check that friendliness was actually
bestowed. I have extended and XFAILED the testcase
on the cp-parser-branch.
>How-To-Repeat:

>Fix:

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



More information about the Gcc-bugs mailing list