This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21353] [3.4/4.0/4.1 Regression] rvalues should not be allowed to be default values for non const references in class functions.
- 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: 17 Oct 2005 11:19:19 -0000
- Subject: [Bug c++/21353] [3.4/4.0/4.1 Regression] rvalues should not be allowed to be default values for non const references in class functions.
- References: <bug-21353-10556@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from cvs-commit at gcc dot gnu dot org 2005-10-17 11:19 -------
Subject: Bug 21353
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: nathan@gcc.gnu.org 2005-10-17 11:19:12
Modified files:
gcc/cp : ChangeLog decl.c parser.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: defarg6.C
Log message:
cp:
PR c++/21353
* g++.dg/template/defarg6.C: New.
testsuite:
PR c++/21353
* decl.c (check_default_argument): Don't check
processing_template_decl or uses_template_parms here.
(grokparms): Only call check_default_argument when not processing
a template decl.
* parser.c (cp_parser_late_parsing_default_arg): Call
check_default_argument when not processing a template decl.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4940&r2=1.4941
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1436&r2=1.1437
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.365&r2=1.366
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6202&r2=1.6203
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/defarg6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21353