OSDN Git Service

PR c++/46977
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Jan 2011 17:38:02 +0000 (17:38 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Jan 2011 17:38:02 +0000 (17:38 +0000)
commitbff898fbbe4358a4b7e337852df4d6043e0bd3f5
tree95871ccf683cdcd1cc68588d8d01c44cb12a7588
parent0268f1d4a4209be578170fa2c61557a15f4e3986
PR c++/46977
* semantics.c (potential_constant_expression_1): Split out from
potential_constant_expression.  Add want_rval parm.  Handle
template expression forms.  Don't enforce restriction on address
of automatic variable here.  Add a couple of diagnostics that
had been missing.
(require_potential_constant_expression): New entry point.
(build_data_member_initialization, register_constexpr_fundef): Adjust.
(maybe_constant_value): Check potential_constant_expression.
* pt.c (fold_non_dependent_expr_sfinae): Likewise.
* tree.c (build_vec_init_expr): Adjust.

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