public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/14513] Friend name injection problem (implicit declaration) Date: Wed, 10 Mar 2004 16:24:00 -0000 [thread overview] Message-ID: <20040310162401.8803.qmail@sources.redhat.com> (raw) In-Reply-To: <20040310154252.14513.bugzilla-gcc@thewrittenword.com> ------- Additional Comments From bangerth at dealii dot org 2004-03-10 16:24 ------- OK, so here's what happens: ------------ struct S { void test (void); }; namespace NS { class X { friend class S; static int *i; }; } void S::test () { NS::X::i; } --------------- gcc thinks the 'friend class S' declaration refers to class ::S and thus allows the access in S::test. All the other compilers seem to believe that the friend declaration refer to a yet-to-be-declared class NS::S, and therefore don't allow access in ::S::test. I have yet to understand what the standard really says in this respect. Kriang? W. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |lerdsuwa at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14513
next prev parent reply other threads:[~2004-03-10 16:24 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-03-10 15:42 [Bug c++/14513] New: namespace problem bugzilla-gcc at thewrittenword dot com 2004-03-10 15:53 ` [Bug c++/14513] " pinskia at gcc dot gnu dot org 2004-03-10 16:24 ` bangerth at dealii dot org [this message] 2004-03-10 19:55 ` [Bug c++/14513] Friend name injection problem (implicit declaration) gdr at integrable-solutions dot net 2004-08-12 0:58 ` pinskia at gcc dot gnu dot org 2004-09-04 12:47 ` lerdsuwa at gcc dot gnu dot org 2004-10-17 14:08 ` lerdsuwa at gcc dot gnu dot org 2004-11-12 17:03 ` lerdsuwa at gcc dot gnu dot org 2004-11-19 10:10 ` lerdsuwa at gcc dot gnu dot org 2004-11-25 16:55 ` cvs-commit at gcc dot gnu dot org 2004-11-25 17:05 ` lerdsuwa at gcc dot gnu dot org 2005-01-12 19:47 ` pinskia at gcc dot gnu dot org 2005-01-13 0:37 ` giovannibajo at libero dot it 2005-01-13 14:55 ` lerdsuwa at gcc dot gnu dot org
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=20040310162401.8803.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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).