public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3538: g++ should not allow friend to inaccessible members.
@ 2001-07-03  2:36 veksler
  0 siblings, 0 replies; 2+ messages in thread
From: veksler @ 2001-07-03  2:36 UTC (permalink / raw)
  To: gcc-gnats

>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=


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/3538: g++ should not allow friend to inaccessible members.
@ 2001-07-08  9:21 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2001-07-08  9:21 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, veksler

Synopsis: g++ should not allow friend to inaccessible members.

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sun Jul  8 09:21:36 2001
State-Changed-Why:
    You are correct in reading the standard, and that friend
    access should be checked. You are also correct in asserting
    it to be a bad rule. So bad in fact that C++ defect report
    209 changed it. g++ uses 209's (proposed?) resolution.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3538&database=gcc


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-08  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-03  2:36 c++/3538: g++ should not allow friend to inaccessible members veksler
2001-07-08  9:21 nathan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).