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]

c++/3538: g++ should not allow friend to inaccessible members.



>Number:         3538
>Category:       c++
>Synopsis:       g++ should not allow friend to inaccessible members.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 03 02:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     veksler@il.ibm.com
>Release:        gcc-3.0
>Organization:
>Environment:
powerpc-ibm-aix4.3.3.0
>Description:
G++ does not enforce the following rule:
"A name nominated by a friend declaration shall be 
accessible in the scope of the class containing the friend
declaration"
This is a quote from 11.4.7 of the 2 December 1996 draft.

IMHO this is a bad rule that gcc may chose not to implement,
but it should at least be optional. Some compilers do 
enforce this rule.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="friend.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="friend.cc"

Y2xhc3MgQSB7CiAgcHVibGljOiAgICAKICAgICB2b2lkIHB1YmxpY19mdW5jKCk7CiAgcHJpdmF0
ZToKICAgICB2b2lkIHByaXZhdGVfZnVuYygpOwp9OwoKY2xhc3MgQiB7CiAgLy8gVGhpcyBpcyBp
bGxlZ2FsLCBiZWNhdXNlICdwcml2YXRlX2Z1bmMnIGlzIGluYWNjZXNzaWJsZSBhdCB0aGlzIHBv
aW50LgogIGZyaWVuZCB2b2lkIEE6OnByaXZhdGVfZnVuYygpOwp9Owo=


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