decl2.c (decl_constant_var_p): New fn.
authorJason Merrill <jason@redhat.com>
Tue, 2 Nov 2010 01:30:39 +0000 (21:30 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 2 Nov 2010 01:30:39 +0000 (21:30 -0400)
commitaef4a21519866e460d2baa161a402164af67547d
tree78573089ef14591417c470516d19451c94823b25
parent7bf8ca763de168f22d2b65662a83e47b56d187e8
decl2.c (decl_constant_var_p): New fn.

* decl2.c (decl_constant_var_p): New fn.
(decl_maybe_constant_var_p): New fn.
(mark_used): Rework instantiation of things needed for constant
expressions.
* cp-tree.h: Declare new fns.
* pt.c (instantiate_decl): Handle cp_unevaluated_operand.
(always_instantiate_p): Use decl_maybe_constant_var_p.
(instantiate_decl): Don't defer constexpr functions.
* repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
* semantics.c (finish_id_expression): Use decl_constant_var_p.
Check for valid name in constant expr after mark_used.

From-SVN: r166164
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/repo.c
gcc/cp/semantics.c