From a63bc44c929fedcaa9e37ca282aad20d62d8827f Mon Sep 17 00:00:00 2001 From: mmitchel Date: Fri, 4 Jul 2003 05:05:19 +0000 Subject: * call.c (build_addr_func): Handle bound pointers-to-members. (build_method_call): Do not call resolve_offset_ref. (implicit_conversion): Likewise. (resolve_scoped_fn_name): Use finish_non_static_data_member, not resolve_offset_ref. (resolve_args): Do not call resolve_offset_ref. (build_conditional_expr): Likewise. (build_new_method_call): Likewise. * cp-tree.def (OFFSET_REF): Update documentation. (cp_convert_to_pointer): Update handling of conversions from pointers to members to pointers. (ocp_convert): Do not call resolve_offset_ref. (convert_to_void): Likewise. (build_expr_type_conversion): Likewise. (delete_sanity): Likewise. (resolve_offset_ref): Simplify greatly. (build_vec_delete): Do not call resolve_offset_ref. * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref if appropriate. (cp_parser_unary_expression): Use cp_parser_simple_cast_expression. (cp_parser_delete_expression): Likewise. (cp_parser_cast_expression): Likewise. (cp_parser_pm_expression): Use cp_parser_binary_op. (cp_parser_simple_cast_expression): New function. * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref. * semantics.c (finish_increment_expr): Likewise. (finish_typeof): Likewise. * tree.c (lvalue_p_1): Do not handle OFFSET_REF. * typeck.c (require_complete_type): Do not handle OFFSET_REFs. (decay_conversion): Do not call resolve_offset_ref. (finish_class_member_access_expr): Likewise. (convert_arguments): Likewise. (build_x_binary_op): Handle DOTSTAR_EXPR. (condition_conversion): Do not call resolve_offset_ref. (unary_complex_lvalue): Likewise. (build_static_cast): Likewise. (build_reinterpret_cast): Likewise. (build_const_cast): Likewise. (build_c_cast): Likewise. (build_modify_expr): Likewise. (convert_for_assignment): Likewise. (convert_for_initialization): Likewise. * typeck2.c (build_x_arrow): Likewise. (build_m_component_ref): Simplify. * g++.old-deja/g++.jason/typeid1.C: Add dg-error marker. * g++.old-deja/g++.mike/net36.C: Tweak error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68911 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/cp-tree.def | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gcc/cp/cp-tree.def') diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index 7d657317031..e988a4e25f9 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -26,22 +26,22 @@ Boston, MA 02111-1307, USA. */ /* An OFFSET_REF is used in two situations: 1. An expression of the form `A::m' where `A' is a class and `m' is - a non-static data member. In this case, operand 0 will be a - TYPE (corresponding to `A') and operand 1 will be a FIELD_DECL - (corresponding to `m'. + a non-static member. In this case, operand 0 will be a TYPE + (corresponding to `A') and operand 1 will be a FIELD_DECL, + BASELINK, or TEMPLATE_ID_EXPR (corresponding to `m'). The expression is a pointer-to-member if its address is taken, but simply denotes a member of the object if its address isnot taken. In the latter case, resolve_offset_ref is used to convert it to a representation of the member referred to by the OFFSET_REF. + + This form is only used during the parsing phase; once semantic + analysis has taken place they are eliminated. 2. An expression of the form `x.*p'. In this case, operand 0 will be an expression corresponding to `x' and operand 1 will be an - expression with pointer-to-member type. - - OFFSET_REFs are only used during the parsing phase; once semantic - analysis has taken place they are eliminated. */ + expression with pointer-to-member type. */ DEFTREECODE (OFFSET_REF, "offset_ref", 'r', 2) /* A pointer-to-member constant. For a pointer-to-member constant -- cgit v1.2.1