PR c++/47207
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Feb 2011 15:35:44 +0000 (15:35 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Feb 2011 15:35:44 +0000 (15:35 +0000)
commit43b367c6194ebad64fcb59dead5d79b432dd9c2e
treeb4c3ba53f68b6d7631c54b3b504bd02dcf9ce100
parent03d202313d90e5b546695f139b28e9f276982f7e
PR c++/47207
* decl2.c (decl_constant_var_p): A constexpr var needs an
initializer to be constant.
* semantics.c (cxx_eval_constant_expression): Complain about
constexpr var used in its own initializer.
* call.c (set_up_extended_ref_temp): Set
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170365 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/decl2.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C [new file with mode: 0644]