public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: reichelt@igpm.rwth-aachen.de To: gcc-gnats@gcc.gnu.org Cc: martin@xemacs.org Subject: c++/8662: [3.2 regression] illegal access of private member of unnamed class Date: Thu, 28 Nov 2002 16:35:00 -0000 [thread overview] Message-ID: <20021120194143.6765.qmail@sources.redhat.com> (raw) >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:
next reply other threads:[~2002-11-20 19:46 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-11-28 16:35 reichelt [this message] 2002-11-28 17:30 reichelt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021120194143.6765.qmail@sources.redhat.com \ --to=reichelt@igpm.rwth-aachen.de \ --cc=gcc-gnats@gcc.gnu.org \ --cc=martin@xemacs.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).