From aef4a21519866e460d2baa161a402164af67547d Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 1 Nov 2010 21:30:39 -0400 Subject: 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/repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cp/repo.c') diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index 22d58af..357dcd9 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -319,7 +319,7 @@ repo_emit_p (tree decl) available. Still record them into *.rpo files, so if they weren't actually emitted and collect2 requests them, they can be provided. */ - if (DECL_INTEGRAL_CONSTANT_VAR_P (decl) + if (decl_maybe_constant_var_p (decl) && DECL_CLASS_SCOPE_P (decl)) ret = 2; } -- cgit v1.1