* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21361
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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);
}
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));
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 *));
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;
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)
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. */
/* 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 ();
/* Return a pointer to a buffer for an exception object of type TYPE. */
-tree
+static tree
alloc_eh_object (type)
tree type;
{
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
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;
{