PR c++/78948 - instantiation from discarded statement
authorJason Merrill <jason@redhat.com>
Sun, 8 Jan 2017 06:36:10 +0000 (01:36 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 8 Jan 2017 06:36:10 +0000 (01:36 -0500)
commit38285dd71996a0020d3bd24fb0c366e8859368af
tree602aa0c8a01de98b3ea3c63aa538579a42858263
parentc3e50bc4e45a3429b8a97bee03dd967cf0c7311f
PR c++/78948 - instantiation from discarded statement

PR c++/78948 - instantiation from discarded statement
* parser.h (struct cp_parser): Remove in_discarded_stmt field.
* cp-tree.h (in_discarded_stmt): Declare it.
(struct saved_scope): Add discarded_stmt bitfield.
(in_discarded_stmt): New macro.
* decl2.c (mark_used): Check it.
* parser.c (cp_parser_selection_statement): Adjust.
(cp_parser_jump_statement): Adjust.

From-SVN: r244206
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/parser.c
gcc/cp/parser.h
gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/constexpr-if11.C [new file with mode: 0644]