From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15743 invoked by alias); 26 Nov 2004 16:32:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15601 invoked by uid 48); 26 Nov 2004 16:31:54 -0000 Date: Fri, 26 Nov 2004 16:32:00 -0000 Message-ID: <20041126163154.15600.qmail@sourceware.org> From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20001207214600.1016.jaycox@gimp.org> References: <20001207214600.1016.jaycox@gimp.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/1016] [DR 166] friend class declarations not observing namespace rules. X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg03206.txt.bz2 List-Id: ------- Additional Comments From reichelt at gcc dot gnu dot org 2004-11-26 16:31 ------- Kriang, according to your comment in #6 the original example should compile, right? And the following example should generate an error in line 12 since the global class b is not a friend of foo::a, right? ===================================== class b { void bar(); }; namespace foo { class a { friend class b; b b_; }; } void b::bar() { foo::a().b_; } ===================================== In this case we have a rejects-valid on mainline for the example in comment #1. And an accepts-invalid for the example in this comment for gcc 2.95.3 - 3.4.3. -- What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1016