This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/3332] friend function declaration in a class in a namespace causes error
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Nov 2004 17:05:59 -0000
- Subject: [Bug c++/3332] friend function declaration in a class in a namespace causes error
- References: <20010621084601.3332.aroach@stoic.electriceyeball.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-11-25 17:05 -------
Subject: Bug 3332
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: lerdsuwa@gcc.gnu.org 2004-11-25 17:05:38
Modified files:
gcc/cp : ChangeLog name-lookup.c name-lookup.h parser.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/lookup: friend3.C friend4.C friend5.C
Log message:
Friend class name lookup 3/n, PR c++/3332
* name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
(lookup_type_scope): Don't deal with name from user declaration
specially.
* name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
* parser.c (cp_parser_class_specifier): Use push_inner_scope and
pop_inner_scope.
* g++.dg/lookup/friend3.C: New test.
* g++.dg/lookup/friend4.C: Likewise.
* g++.dg/lookup/friend5.C: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4497&r2=1.4498
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.94&r2=1.95
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.h.diff?cvsroot=gcc&r1=1.31&r2=1.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.282&r2=1.283
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4647&r2=1.4648
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/friend3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/friend4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/friend5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3332