This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39608] [4.4/4.5 Regression] 'expr' cannot appear in a constant-expression.
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Apr 2009 17:27:11 -0000
- Subject: [Bug c++/39608] [4.4/4.5 Regression] 'expr' cannot appear in a constant-expression.
- References: <bug-39608-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jason at gcc dot gnu dot org 2009-04-03 17:27 -------
Subject: Bug 39608
Author: jason
Date: Fri Apr 3 17:26:50 2009
New Revision: 145509
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145509
Log:
PR c++/39608
* semantics.c (finish_id_expression): Don't assume a dependent
member of the current instantiation isn't a valid integral
constant expression. Check dependent_scope_p.
* pt.c (dependent_scope_p): Check TYPE_P.
(tsubst_copy): If args is null, just return.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/const2.C
- copied unchanged from r145508,
trunk/gcc/testsuite/g++.dg/template/const2.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/pt.c
branches/gcc-4_4-branch/gcc/cp/semantics.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39608