aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-05-19 17:02:27 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-05-19 17:02:27 -0400
commita3360e778c64ee78b08272b4474d0d707061a1c1 (patch)
treed2b59673b254491d2a8bacc1360f3025eb0c68ad /gcc/cp/semantics.c
parenta0685b7311e693f8b0ed709ae0727af294a6a72b (diff)
downloadgcc-a3360e778c64ee78b08272b4474d0d707061a1c1.zip
gcc-a3360e778c64ee78b08272b4474d0d707061a1c1.tar.gz
gcc-a3360e778c64ee78b08272b4474d0d707061a1c1.tar.bz2
call.c (reference_binding): Use cp_build_qualified_type_real and cp_type_quals consistently.
* call.c (reference_binding): Use cp_build_qualified_type_real and cp_type_quals consistently. (add_function_candidate): Likewise. (build_conditional_expr): Likewise. (convert_like_real): Likewise. (type_passed_as): Likewise. * class.c (add_method): Likewise. (same_signature_p): Likewise. (layout_class_type): Likewise. * decl.c (cxx_init_decl_processing): Likewise. (cp_fname_init): Likewise. (grokdeclarator): Likewise. * decl2.c (cp_reconstruct_complex_type): Likewise. * init.c (build_new_1): Likewise. * method.c (do_build_copy_constructor): Likewise. (implicitly_declare_fn): Likewise. * pt.c (tsubst_aggr_type): Likewise. (tsubst): Likewise. * rtti.c (init_rtti_processing): Likewise. (build_headof): Likewise. (build_dynamic_cast_1): Likewise. (tinfo_base_init): Likewise. (emit_support_tinfos): Likewise. * semantics.c (capture_decltype): Likewise. * tree.c (cv_unqualified): Likewise. * typeck.c (composite_pointer_type): Likewise. (string_conv_p): Likewise. * mangle.c (write_CV_qualifiers_for_type): Tweak. * call.c (initialize_reference): Use CP_TYPE_CONST_P. * decl.c (start_decl): Likewise. * semantics.c (finish_compound_literal): Likewise. * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P. (cp_type_readonly): Remove. * cp-tree.h: Remove declaration. From-SVN: r159599
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 47f3897c..173ef96 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2212,7 +2212,7 @@ finish_compound_literal (tree type, tree compound_literal)
if (TREE_CODE (type) == ARRAY_TYPE)
cp_complete_array_type (&type, compound_literal, false);
compound_literal = digest_init (type, compound_literal);
- if ((!at_function_scope_p () || cp_type_readonly (type))
+ if ((!at_function_scope_p () || CP_TYPE_CONST_P (type))
&& initializer_constant_valid_p (compound_literal, type))
{
tree decl = create_temporary_var (type);
@@ -5629,7 +5629,7 @@ capture_decltype (tree decl)
if (TREE_CODE (type) != REFERENCE_TYPE)
{
if (!LAMBDA_EXPR_MUTABLE_P (lam))
- type = cp_build_qualified_type (type, (TYPE_QUALS (type)
+ type = cp_build_qualified_type (type, (cp_type_quals (type)
|TYPE_QUAL_CONST));
type = build_reference_type (type);
}