semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
authorJason Merrill <jason@redhat.com>
Fri, 3 Oct 2014 16:48:18 +0000 (12:48 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 3 Oct 2014 16:48:18 +0000 (12:48 -0400)
commite01a49c11b529db0a092c9af935141730a9269ed
treef9c5ac1661c6d266beda46347940f70f13f9f860
parent742a072ad0e351dbe5b483002142c8215597d386
semantics.c (constexpr_fn_retval): Ignore declarations in C++14.

* semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
(var_in_constexpr_fn): New.
(cxx_eval_constant_expression): Look into DECL_INITIAL.
(potential_constant_expression_1): Allow constexpr-local vars.

From-SVN: r215862
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/semantics.c
gcc/testsuite/g++.dg/cpp1y/constexpr-local1.C [new file with mode: 0644]