public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6644: g++ allows illegal access of private class members
@ 2002-05-13 5:43 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-05-13 5:43 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, reichelt
Synopsis: g++ allows illegal access of private class members
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Mon May 13 05:43:33 2002
State-Changed-Why:
please read http://gcc.gnu.org/bugs.html#nonbugs
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6644
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/6644: g++ allows illegal access of private class members
@ 2002-05-13 5:26 reichelt
0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2002-05-13 5:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 6644
>Category: c++
>Synopsis: g++ allows illegal access of private class members
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Mon May 13 05:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Volker Reichelt
>Release: gcc 3.0.x, gcc 3.1 20020510 (prerelease)
>Organization:
>Environment:
mips-sgi-irix6.5, i686-pc-linux-gnu
>Description:
The following code compiles fine, although "a.i" shouldn't
be accessible in "B" ("i" is private in "A" and "B" is not
a friend of "A"):
-------------------------snip here------------------------
class A
{
int i;
struct B { void foo () { A a; a.i; } };
};
-------------------------snip here------------------------
It's a regression from 2.95.x which correctly issues an
error message.
>How-To-Repeat:
g++ -c Bug.cpp
or even
g++ -pedantic -c Bug.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-13 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-13 5:43 c++/6644: g++ allows illegal access of private class members nathan
-- strict thread matches above, loose matches on Subject: below --
2002-05-13 5:26 reichelt
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).