diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-12-08 08:36:09 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-12-08 08:36:09 +0000 |
commit | db24eb1f4fcc6fa8330376179278261e02b717b5 (patch) | |
tree | 9d5171ca690b8c2e8078b4b944da983e3de547f6 /gcc/cp/class.c | |
parent | 89b17498044f87f7bc14f56782434c062730db8d (diff) | |
download | gcc-db24eb1f4fcc6fa8330376179278261e02b717b5.zip gcc-db24eb1f4fcc6fa8330376179278261e02b717b5.tar.gz gcc-db24eb1f4fcc6fa8330376179278261e02b717b5.tar.bz2 |
re PR c++/18803 (rejects access to operator() in template)
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.
From-SVN: r91863
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 8a0da05..886d301 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -492,9 +492,6 @@ build_vfield_ref (tree datum, tree type) if (datum == error_mark_node) return error_mark_node; - if (TREE_CODE (TREE_TYPE (datum)) == REFERENCE_TYPE) - datum = convert_from_reference (datum); - /* First, convert to the requested type. */ if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (datum), type)) datum = convert_to_base (datum, type, /*check_access=*/false, |