public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8662: [3.2 regression] illegal access of private member of unnamed class
@ 2002-11-28 17:30 reichelt
  0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2002-11-28 17:30 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, martin, nobody, reichelt

Synopsis: [3.2 regression] illegal access of private member of unnamed class

State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Wed Nov 20 11:47:41 2002
State-Changed-Why:
    Confirmed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8662


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

* c++/8662: [3.2 regression] illegal access of private member of unnamed class
@ 2002-11-28 16:35 reichelt
  0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2002-11-28 16:35 UTC (permalink / raw)
  To: gcc-gnats; +Cc: martin


>Number:         8662
>Category:       c++
>Synopsis:       [3.2 regression] illegal access of private member of unnamed class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 20 11:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin Buchholz, Volker Reichelt
>Release:        3.2-branch, mainline
>Organization:
>Environment:
target independent
>Description:
The following code should be rejected, since a.i is a
private member:

------------------snip here-----------------------
class { int i; } a;
void foo () { a.i; }
------------------snip here-----------------------

gcc 2.95.x and 3.0.x correctly reject the code,
however it is accepted with the 3.2-branch and mainline.

BTW, all version reject the code if private is explicitly specified:
   class { private: int i; } a;
or the class has a name:
   class A { int i; } a;

The PR was distilled from Martin Buchholz's message:
   http://gcc.gnu.org/ml/gcc-bugs/2002-11/msg01022.html
>How-To-Repeat:

>Fix:

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


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

end of thread, other threads:[~2002-11-20 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-28 17:30 c++/8662: [3.2 regression] illegal access of private member of unnamed class reichelt
  -- strict thread matches above, loose matches on Subject: below --
2002-11-28 16:35 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).