Commit 75d587eb by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (finish_globally_qualified_member_call_expr): Rename to ...

	* cp-tree.h (finish_globally_qualified_member_call_expr):
	Rename to ...
	(finish_qualified_call_expr).
	* semantics.c: Likewise.
	* parse.y (primary): Use it.
	* method.c (hack_identifier): Remove redundant code.
	* init.c (resolve_offset_ref): Call convert_from_reference to
 	handle members of reference type.  Improve error recovery.

From-SVN: r22222
parent 51c10c4e
1998-09-03 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (finish_globally_qualified_member_call_expr):
Rename to ...
(finish_qualified_call_expr).
* semantics.c: Likewise.
* parse.y (primary): Use it.
* method.c (hack_identifier): Remove redundant code.
* init.c (resolve_offset_ref): Call convert_from_reference to
handle members of reference type. Improve error recovery.
1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
* cp-tree.h: Declare warn_nontemplate_friend.
......
......@@ -2932,7 +2932,7 @@ extern tree finish_this_expr PROTO((void));
extern tree finish_object_call_expr PROTO((tree, tree, tree));
extern tree finish_qualified_object_call_expr PROTO((tree, tree, tree));
extern tree finish_pseudo_destructor_call_expr PROTO((tree, tree, tree));
extern tree finish_globally_qualified_member_call_expr PROTO ((tree, tree));
extern tree finish_qualified_call_expr PROTO ((tree, tree));
extern tree finish_label_address_expr PROTO((tree));
extern tree finish_unary_op_expr PROTO((enum tree_code, tree));
extern tree finish_id_expr PROTO((tree));
......
......@@ -1954,7 +1954,7 @@ hack_identifier (value, name)
return value;
}
if (TREE_CODE (type) == REFERENCE_TYPE && ! processing_template_decl)
if (! processing_template_decl)
value = convert_from_reference (value);
return value;
}
......
......@@ -1491,9 +1491,9 @@ primary:
| overqualified_id %prec HYPERUNARY
{ $$ = build_offset_ref (OP0 ($$), OP1 ($$)); }
| overqualified_id '(' nonnull_exprlist ')'
{ $$ = finish_globally_qualified_member_call_expr ($1, $3); }
{ $$ = finish_qualified_call_expr ($1, $3); }
| overqualified_id LEFT_RIGHT
{ $$ = finish_globally_qualified_member_call_expr ($1, NULL_TREE); }
{ $$ = finish_qualified_call_expr ($1, NULL_TREE); }
| object object_template_id %prec UNARY
{
$$ = build_x_component_ref ($$, $2, NULL_TREE, 1);
......
......@@ -995,7 +995,7 @@ finish_pseudo_destructor_call_expr (object, scope, destructor)
ARGS. Returns an expression for the call. */
tree
finish_globally_qualified_member_call_expr (fn, args)
finish_qualified_call_expr (fn, args)
tree fn;
tree args;
{
......
// Build don't link:
class TecMesh {};
extern TecMesh& m;
struct X {
X(TecMesh&);
};
struct D {
D();
TecMesh& Mesh;
};
D::D ()
: Mesh(m)
{
X x(D::Mesh);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment