summaryrefslogtreecommitdiffstats
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-08 08:36:09 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-08 08:36:09 +0000
commit729f89ff588de32a6f6c4c928cb1d4115ae2fb2e (patch)
tree9d5171ca690b8c2e8078b4b944da983e3de547f6 /gcc/cp/typeck2.c
parent4793b52e499594b635841d5f1b2c8d2d22485dfb (diff)
downloadppe42-gcc-729f89ff588de32a6f6c4c928cb1d4115ae2fb2e.tar.gz
ppe42-gcc-729f89ff588de32a6f6c4c928cb1d4115ae2fb2e.zip
cp:
PR c++/18803 * cp-tree.h (REFERENCE_REF_P): New. (CPTI_TYPE_INFO_TYPE): Rename to ... (CPTI_CONST_TYPE_INFO_TYPE): ... here. (CPTI_TYPE_INFO_REF_TYPE): Remove. (type_info_type_node): Rename to ... (const_type_info_type_node): ... here. (type_info_ref_type): Remove. * call.c (build_user_type_conversion): Reformat. (resolve_args): Do not convert_from_reference. (build_object_call): Call convert_from_reference. (prep_operand): Do not convert_from_reference. (build_new_method_call): Likewise. * class.c (build_vfield_ref): Likewise. * cvt.c (convert_to_reference): Likewise. (convert_from_reference): Build INDIRECT_REF here, not with build_indirect_ref. (convert_force): Do not convert_from_reference. (build_expr_type_conversion): Likewise. * decl.c (grok_reference_init): Likewise. * decl2.c (delete_sanity): Likewise. * except.c (initialize_handler_parm): Use POINTER_TYPE_P. * init.c (build_dtor_call): Do not convert_from_reference. * parser.c (cp_parser_template_argument): Unwrap indirected reference. Allow TEMPLATE_PARM_INDEX as an object parm. * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use convert_from_reference, if indicated. <case CALL_EXPR>: Do not convert_from_reference. <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed. (tsubst_initializer_list): Do not convert_from_reference. * rtti.c (init_rtti_processing): Adjust node creation. (throw_bad_typeid): Use const_type_info_type_node. Do not convert_from_reference. (typeid_ok_p): Use const_type_info_type_node. (build_typeid, get_typeid): Always return type_info typed node. (build_dynamic_cast_1): Dont convert_from_reference. Refactor. * semantics.c (finish_stmt_expr_expr): Do not convert_from_reference. (finish_id_expression): Convert_from_reference as appropriate. * typeck.c (decay_conversion): Do not convert_from_reference. (finish_class_member_access_expr): Likewise. (build_indirect_ref): Use POINTER_TYPE_P. (convert_arguments): Do not convert_from_reference. (build_modify_expr): Likewise. (convert_for_initialization): Likewise. * typeck2.c (build_x_arrow): Likewise. testsuite: PR c++/18803 * g++.dg/template/operator5.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index ab95bc3e1b8..8d97e451c6d 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1212,12 +1212,6 @@ build_x_arrow (tree expr)
expr = build_non_dependent_expr (expr);
}
- if (TREE_CODE (type) == REFERENCE_TYPE)
- {
- expr = convert_from_reference (expr);
- type = TREE_TYPE (expr);
- }
-
if (IS_AGGR_TYPE (type))
{
while ((expr = build_new_op (COMPONENT_REF, LOOKUP_NORMAL, expr,
OpenPOWER on IntegriCloud