decl.c (start_decl): Complain about static/thread_local vars in constexpr function.
authorJason Merrill <jason@redhat.com>
Fri, 3 Oct 2014 16:48:24 +0000 (12:48 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 3 Oct 2014 16:48:24 +0000 (12:48 -0400)
commitb2cb98ed66787bd0050286d705d2ca9c9d86c41c
tree15dd87ec43d36e873c009b43af78a0aa2e569fb3
parente01a49c11b529db0a092c9af935141730a9269ed
decl.c (start_decl): Complain about static/thread_local vars in constexpr function.

* decl.c (start_decl): Complain about static/thread_local vars
in constexpr function.
(check_for_uninitialized_const_var): Also uninitialized vars.
* parser.c (cp_parser_jump_statement): And gotos.
(cp_parser_asm_operand_list): And asm.
(cp_parser_try_block): And try.
* semantics.c (ensure_literal_type_for_constexpr_object): And
non-literal.

From-SVN: r215863
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/g++.dg/cpp1y/constexpr-neg1.C [new file with mode: 0644]