Change all callers of finish_decl to cp_finish_decl.

From-SVN: r9907
This commit is contained in:
Mike Stump 1995-06-08 19:06:37 -04:00 committed by Richard Kenner
parent ee760f3f6b
commit b3417a0464
8 changed files with 36 additions and 36 deletions

View File

@ -2102,7 +2102,7 @@ finish_vtbls (binfo, do_self, t)
&& DECL_INITIAL (decl) != BINFO_VIRTUALS (binfo))
DECL_INITIAL (decl) = build_nt (CONSTRUCTOR, NULL_TREE,
BINFO_VIRTUALS (binfo));
finish_decl (decl, DECL_INITIAL (decl), NULL_TREE, 0, 0);
cp_finish_decl (decl, DECL_INITIAL (decl), NULL_TREE, 0, 0);
DECL_CONTEXT (decl) = context;
}
CLEAR_BINFO_NEW_VTABLE_MARKED (binfo);

View File

@ -2017,7 +2017,7 @@ extern void shadow_tag PROTO((tree));
extern int grok_ctor_properties PROTO((tree, tree));
extern tree groktypename PROTO((tree));
extern tree start_decl PROTO((tree, tree, int, tree));
extern void finish_decl PROTO((tree, tree, tree, int, int));
extern void cp_finish_decl PROTO((tree, tree, tree, int, int));
extern void expand_static_init PROTO((tree, tree));
extern int complete_array_type PROTO((tree, tree, int));
extern tree build_ptrmemfunc_type PROTO((tree));

View File

@ -598,7 +598,7 @@ build_up_reference (type, arg, flags, checkconst)
/* Give this new temp some rtl and initialize it. */
DECL_INITIAL (temp) = targ;
TREE_STATIC (temp) = 1;
finish_decl (temp, targ, NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
cp_finish_decl (temp, targ, NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
/* Do this after declaring it static. */
rval = build_unary_op (ADDR_EXPR, temp, 0);
TREE_TYPE (rval) = type;
@ -1319,7 +1319,7 @@ cp_convert (type, expr, convtype, flags)
sig_ptr = get_temp_name (type, 1);
DECL_INITIAL (sig_ptr) = constructor;
CLEAR_SIGNATURE (sig_ty);
finish_decl (sig_ptr, constructor, NULL_TREE, 0, 0);
cp_finish_decl (sig_ptr, constructor, NULL_TREE, 0, 0);
SET_SIGNATURE (sig_ty);
TREE_READONLY (sig_ptr) = 1;

View File

@ -1443,14 +1443,14 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
}
}
/* The corresponding pop_obstacks is in finish_decl. */
/* The corresponding pop_obstacks is in cp_finish_decl. */
push_obstacks_nochange ();
if (TREE_CODE (value) == VAR_DECL)
{
/* We cannot call pushdecl here, because that would
fill in the value of our TREE_CHAIN. Instead, we
modify finish_decl to do the right thing, namely, to
modify cp_finish_decl to do the right thing, namely, to
put this decl out straight away. */
if (TREE_PUBLIC (value))
{
@ -1482,7 +1482,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
DECL_INITIAL (value) = init;
DECL_IN_AGGR_P (value) = 1;
finish_decl (value, init, asmspec_tree, 1, flags);
cp_finish_decl (value, init, asmspec_tree, 1, flags);
pushdecl_class_level (value);
return value;
}
@ -1497,7 +1497,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
}
if (DECL_INITIAL (value) == error_mark_node)
init = error_mark_node;
finish_decl (value, init, asmspec_tree, 1, flags);
cp_finish_decl (value, init, asmspec_tree, 1, flags);
DECL_INITIAL (value) = init;
DECL_IN_AGGR_P (value) = 1;
return value;
@ -1519,7 +1519,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
DECL_RTL (value) = NULL_RTX;
DECL_ASSEMBLER_NAME (value) = get_identifier (asmspec);
}
finish_decl (value, init, asmspec_tree, 1, flags);
cp_finish_decl (value, init, asmspec_tree, 1, flags);
/* Pass friends back this way. */
if (DECL_FRIEND_P (value))
@ -1580,7 +1580,7 @@ grokbitfield (declarator, declspecs, width)
cp_error ("static member `%D' cannot be a bitfield", value);
return NULL_TREE;
}
finish_decl (value, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (value, NULL_TREE, NULL_TREE, 0, 0);
if (width != error_mark_node)
{
@ -1772,7 +1772,7 @@ groktypefield (declspecs, parmlist)
return void_type_node;
}
finish_decl (decl, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (decl, NULL_TREE, NULL_TREE, 0, 0);
/* If this declaration is common to another declaration
complain about such redundancy, and return NULL_TREE
@ -2331,7 +2331,7 @@ finish_table (name, type, init, publicp)
DECL_INITIAL (empty_table) = init;
asmspec = build_string (IDENTIFIER_LENGTH (DECL_NAME (empty_table)),
IDENTIFIER_POINTER (DECL_NAME (empty_table)));
finish_decl (empty_table, NULL_TREE, asmspec, 0, 0);
cp_finish_decl (empty_table, NULL_TREE, asmspec, 0, 0);
}
is_empty = 1;
}
@ -2369,7 +2369,7 @@ finish_table (name, type, init, publicp)
IDENTIFIER_POINTER (DECL_NAME (empty_table)));
}
finish_decl (decl, NULL_TREE, asmspec, 0, 0);
cp_finish_decl (decl, NULL_TREE, asmspec, 0, 0);
return decl;
}

View File

@ -1,5 +1,5 @@
/* Handle exceptional things in C++.
Copyright (C) 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Contributed by Michael Tiemann <tiemann@cygnus.com>
Rewritten by Mike Stump <mrs@cygnus.com>, based upon an
initial re-implementation courtesy Tad Hunt.
@ -1230,10 +1230,10 @@ expand_start_catch_block (declspecs, declarator)
init = convert_from_reference (save_expr (make_tree (init_type, call_rtx)));
/* Do we need the below two lines? */
/* Let `finish_decl' know that this initializer is ok. */
/* Let `cp_finish_decl' know that this initializer is ok. */
DECL_INITIAL (decl) = init;
decl = pushdecl (decl);
finish_decl (decl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
cp_finish_decl (decl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
}
else
{

View File

@ -1,5 +1,5 @@
/* YACC parser for C++ syntax.
Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc.
Copyright (C) 1988, 1989, 1993, 1995 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@ -497,7 +497,7 @@ template_def:
d = start_decl ($<ttype>2, /*current_declspecs*/NULL_TREE, 0,
$3);
cplus_decl_attributes (d, $5, prefix_attributes);
finish_decl (d, NULL_TREE, $4, 0, 0);
cp_finish_decl (d, NULL_TREE, $4, 0, 0);
end_template_decl ($1, d, 0, def);
if (def)
reinit_parse_for_template ((int) $6, $1, d);
@ -516,7 +516,7 @@ template_def:
d = start_decl ($<ttype>3, current_declspecs,
0, $<ttype>4);
cplus_decl_attributes (d, $6, prefix_attributes);
finish_decl (d, NULL_TREE, $5, 0, 0);
cp_finish_decl (d, NULL_TREE, $5, 0, 0);
end_template_decl ($1, d, 0, def);
if (def)
{
@ -530,7 +530,7 @@ template_def:
{
int def = ($4 != ';');
tree d = start_decl ($<ttype>3, $<ttype>2, 0, NULL_TREE);
finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
end_template_decl ($1, d, 0, def);
if (def)
reinit_parse_for_template ((int) $4, $1, d);
@ -556,7 +556,7 @@ datadef:
| declmods notype_declarator ';'
{ tree d;
d = start_decl ($<ttype>2, $<ttype>$, 0, NULL_TREE);
finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
}
| typed_declspecs initdecls ';'
{
@ -566,7 +566,7 @@ datadef:
| typed_declspecs declarator ';'
{ tree d;
d = start_decl ($<ttype>2, $<ttype>$, 0, NULL_TREE);
finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
note_list_got_semicolon ($<ttype>$);
}
| declmods ';'
@ -973,7 +973,7 @@ condition:
}
init
{
finish_decl ($<ttype>7, $8, $5, 0, LOOKUP_ONLYCONVERTING);
cp_finish_decl ($<ttype>7, $8, $5, 0, LOOKUP_ONLYCONVERTING);
resume_momentary ($<itype>6);
$$ = $<ttype>7;
if (TREE_CODE (TREE_TYPE ($$)) == ARRAY_TYPE)
@ -1730,7 +1730,7 @@ decl:
{ tree d = get_decl_list ($1);
int yes = suspend_momentary ();
d = start_decl ($2, d, 0, NULL_TREE);
finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
resume_momentary (yes);
if (IS_AGGR_TYPE_CODE (TREE_CODE ($1)))
note_got_semicolon ($1);
@ -1739,7 +1739,7 @@ decl:
{ tree d = $1;
int yes = suspend_momentary ();
d = start_decl ($2, d, 0, NULL_TREE);
finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
resume_momentary (yes);
note_list_got_semicolon ($1);
}
@ -1981,7 +1981,7 @@ initdcl0:
cplus_decl_attributes ($<ttype>$, $4, prefix_attributes); }
init
/* Note how the declaration of the variable is in effect while its init is parsed! */
{ finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING);
{ cp_finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING);
$$ = $<itype>5; }
| declarator exception_specification_opt maybeasm maybe_attribute
{ tree d;
@ -1998,7 +1998,7 @@ initdcl0:
$$ = suspend_momentary ();
d = start_decl ($<ttype>1, current_declspecs, 0, $2);
cplus_decl_attributes (d, $4, prefix_attributes);
finish_decl (d, NULL_TREE, $3, 0, 0); }
cp_finish_decl (d, NULL_TREE, $3, 0, 0); }
;
initdcl:
@ -2007,11 +2007,11 @@ initdcl:
cplus_decl_attributes ($<ttype>$, $4, prefix_attributes); }
init
/* Note how the declaration of the variable is in effect while its init is parsed! */
{ finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING); }
{ cp_finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING); }
| declarator exception_specification_opt maybeasm maybe_attribute
{ $<ttype>$ = start_decl ($<ttype>1, current_declspecs, 0, $2);
cplus_decl_attributes ($<ttype>$, $4, prefix_attributes);
finish_decl ($<ttype>$, NULL_TREE, $3, 0, 0); }
cp_finish_decl ($<ttype>$, NULL_TREE, $3, 0, 0); }
;
notype_initdcl0:
@ -2022,7 +2022,7 @@ notype_initdcl0:
cplus_decl_attributes ($<ttype>$, $4, prefix_attributes); }
init
/* Note how the declaration of the variable is in effect while its init is parsed! */
{ finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING);
{ cp_finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING);
$$ = $<itype>5; }
| notype_declarator exception_specification_opt maybeasm maybe_attribute
{ tree d;
@ -2030,7 +2030,7 @@ notype_initdcl0:
$$ = suspend_momentary ();
d = start_decl ($<ttype>1, current_declspecs, 0, $2);
cplus_decl_attributes (d, $4, prefix_attributes);
finish_decl (d, NULL_TREE, $3, 0, 0); }
cp_finish_decl (d, NULL_TREE, $3, 0, 0); }
;
nomods_initdcl0:
@ -2041,7 +2041,7 @@ nomods_initdcl0:
cplus_decl_attributes ($<ttype>$, $4, prefix_attributes); }
init
/* Note how the declaration of the variable is in effect while its init is parsed! */
{ finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING);
{ cp_finish_decl ($<ttype>6, $7, $3, 0, LOOKUP_ONLYCONVERTING);
$$ = $<itype>5; }
| notype_declarator exception_specification_opt maybeasm maybe_attribute
{ tree d;
@ -2049,7 +2049,7 @@ nomods_initdcl0:
$$ = suspend_momentary ();
d = start_decl ($1, current_declspecs, 0, $2);
cplus_decl_attributes (d, $4, prefix_attributes);
finish_decl (d, NULL_TREE, $3, 0, 0); }
cp_finish_decl (d, NULL_TREE, $3, 0, 0); }
;
/* the * rules are dummies to accept the Apollo extended syntax

View File

@ -2651,7 +2651,7 @@ expand_upcast_fixups (binfo, addr, orig_addr, vbase, t, vbase_offsets)
TREE_READONLY (nvtbl) = 0;
nvtbl = pushdecl (nvtbl);
init = NULL_TREE;
finish_decl (nvtbl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
cp_finish_decl (nvtbl, init, NULL_TREE, 0, LOOKUP_ONLYCONVERTING);
DECL_VIRTUAL_P (nvtbl) = 1;
DECL_CONTEXT (nvtbl) = t;
init = build (MODIFY_EXPR, TREE_TYPE (nvtbl),

View File

@ -1,5 +1,5 @@
/* Functions dealing with signatures and signature pointers/references.
Copyright (C) 1992 Free Software Foundation, Inc.
Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Gerald Baumgartner (gb@cs.purdue.edu)
This file is part of GNU CC.
@ -650,7 +650,7 @@ build_signature_table_constructor (sig_ty, rhs)
as initialization expression, we don't need a new signature table
variable and just hand back the init expression.
The declaration processing is done by hand instead of using `finish_decl'
The declaration processing is done by hand instead of using `cp_finish_decl'
so that we can make signature pointers global variables instead of
static ones. */