Commit c6160f8f by Jason Merrill Committed by Jason Merrill

cp-tree.h: Add prototype for set_identifier_local_value.

	* cp-tree.h: Add prototype for set_identifier_local_value.
	* decl.c (set_identifier_local_value_with_scope): Make static,
	prototype.
	* search.c (covariant_return_p): Likewise.
	* except.c (build_terminate_handler, alloc_eh_object): Likewise.
	* call.c (build_method_call): Only pull out the type of a destructor
	if it's a template type parm.
	* decl.c (lookup_name_real): Never return the from_obj value.

From-SVN: r21361
parent 0d1be583
1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h: Add prototype for set_identifier_local_value.
* decl.c (set_identifier_local_value_with_scope): Make static,
prototype.
* search.c (covariant_return_p): Likewise.
* except.c (build_terminate_handler, alloc_eh_object): Likewise.
* call.c (build_method_call): Only pull out the type of a destructor
if it's a template type parm.
* decl.c (lookup_name_real): Never return the from_obj value.
1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
* except.c (process_start_catch_block_old): Call start_decl_1 for
......
......@@ -626,11 +626,13 @@ build_method_call (instance, name, parms, basetype_path, flags)
if (processing_template_decl)
{
/* We need to process template parm names here so that tsubst catches
them properly. Other type names can wait. */
if (TREE_CODE (name) == BIT_NOT_EXPR
&& TREE_CODE (TREE_OPERAND (name, 0)) == IDENTIFIER_NODE)
{
tree type = get_aggr_from_typedef (TREE_OPERAND (name, 0), 0);
if (type)
if (type && TREE_CODE (type) == TEMPLATE_TYPE_PARM)
name = build_min_nt (BIT_NOT_EXPR, type);
}
......
......@@ -2358,6 +2358,7 @@ extern void push_to_top_level PROTO((void));
extern void pop_from_top_level PROTO((void));
extern tree identifier_type_value PROTO((tree));
extern void set_identifier_type_value PROTO((tree, tree));
extern void set_identifier_local_value PROTO((tree, tree));
extern void pop_everything PROTO((void));
extern void pushtag PROTO((tree, tree, int));
extern tree make_anon_name PROTO((void));
......
......@@ -168,6 +168,8 @@ static tree lookup_tag PROTO((enum tree_code, tree,
struct binding_level *, int));
static void set_identifier_type_value_with_scope
PROTO((tree, tree, struct binding_level *));
static void set_identifier_local_value_with_scope
PROTO((tree, tree, struct binding_level *));
static void record_builtin_type PROTO((enum rid, char *, tree));
static void record_unknown_type PROTO((tree, char *));
static int member_function_or_else PROTO((tree, tree, char *));
......@@ -2159,7 +2161,7 @@ set_identifier_type_value (id, type)
set_identifier_type_value_with_scope (id, type, inner_binding_level);
}
void
static void
set_identifier_local_value_with_scope (id, val, b)
tree id, val;
struct binding_level *b;
......@@ -5083,7 +5085,8 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
TREE_TYPE (val));
}
val = from_obj;
/* We don't change val to from_obj here because that breaks
implicit typename for destructor calls. */
}
if ((TREE_CODE (val) == TEMPLATE_DECL && looking_for_template)
......
......@@ -59,6 +59,8 @@ static tree do_pop_exception PROTO((void));
static void process_start_catch_block PROTO((tree, tree));
static void process_start_catch_block_old PROTO((tree, tree));
static tree build_eh_type_type_ref PROTO((tree));
static tree build_terminate_handler PROTO((void));
static tree alloc_eh_object PROTO((tree));
#if 0
/* This is the startup, and finish stuff per exception table. */
......@@ -556,7 +558,7 @@ push_eh_cleanup ()
/* Build up a call to terminate on the function obstack, for use as an
exception handler. */
tree
static tree
build_terminate_handler ()
{
int yes = suspend_momentary ();
......@@ -1040,7 +1042,7 @@ end_anon_func ()
/* Return a pointer to a buffer for an exception object of type TYPE. */
tree
static tree
alloc_eh_object (type)
tree type;
{
......
......@@ -131,6 +131,7 @@ static void add_conversions PROTO((tree));
static tree get_virtuals_named_this PROTO((tree));
static tree get_virtual_destructor PROTO((tree, int));
static int tree_has_any_destructor_p PROTO((tree, int));
static int covariant_return_p PROTO((tree, tree));
static struct search_level *push_search_level
PROTO((struct stack_level *, struct obstack *));
static struct search_level *pop_search_level
......@@ -2163,7 +2164,7 @@ tree_has_any_destructor_p (binfo, i)
Returns 1 if trivial covariance, 2 if non-trivial (requiring runtime
adjustment), or -1 if pedantically invalid covariance. */
int
static int
covariant_return_p (brettype, drettype)
tree brettype, drettype;
{
......
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