re PR c++/47897 ([C++0x] static const member variable is not constant expression)
authorJason Merrill <jason@redhat.com>
Sun, 27 Feb 2011 08:13:16 +0000 (03:13 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 27 Feb 2011 08:13:16 +0000 (03:13 -0500)
commitacfd3fffee80262c74de0e4480b983d7bf7fbd8e
treea340fb7ef2eb7e37ddb07f9b7a12717239727292
parentfe8e67ef97640f9f65c05dbf96401d2bcb3d75d7
re PR c++/47897 ([C++0x] static const member variable is not constant expression)

PR c++/47897
* semantics.c (non_const_var_error): Split out from...
(cxx_eval_constant_expression): ...here.
(potential_constant_expression_1) [VAR_DECL]: Use it.
Allow dependent variables.

From-SVN: r170532
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/regress/debug-debug7.C
gcc/testsuite/g++.dg/cpp0x/regress/template-const1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/regress/template-function1.C
gcc/testsuite/g++.dg/debug/debug7.C
gcc/testsuite/g++.dg/template/function1.C