Commit 362efdc1 by Nathanael Nerode

init.c: removes use of PARAMS macro.

	2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
	* init.c: removes use of PARAMS macro.  Use ISO style function
	declarations.  (Not copyright-significant change.)

From-SVN: r67902
parent dc125bdf
2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
* init.c: removes use of PARAMS macro. Use ISO style function
declarations. (Not copyright-significant change.)
* rtti.c: Remove PARAMS.
* typeck2.c: Convert to ISO C.
......
......@@ -36,24 +36,24 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h"
static void construct_virtual_base (tree, tree);
static void expand_aggr_init_1 PARAMS ((tree, tree, tree, tree, int));
static void expand_default_init PARAMS ((tree, tree, tree, tree, int));
static tree build_vec_delete_1 PARAMS ((tree, tree, tree, special_function_kind, int));
static void expand_aggr_init_1 (tree, tree, tree, tree, int);
static void expand_default_init (tree, tree, tree, tree, int);
static tree build_vec_delete_1 (tree, tree, tree, special_function_kind, int);
static void perform_member_init (tree, tree);
static tree build_builtin_delete_call PARAMS ((tree));
static int member_init_ok_or_else PARAMS ((tree, tree, tree));
static void expand_virtual_init PARAMS ((tree, tree));
static tree build_builtin_delete_call (tree);
static int member_init_ok_or_else (tree, tree, tree);
static void expand_virtual_init (tree, tree);
static tree sort_mem_initializers (tree, tree);
static tree initializing_context PARAMS ((tree));
static void expand_cleanup_for_base PARAMS ((tree, tree));
static tree get_temp_regvar PARAMS ((tree, tree));
static tree dfs_initialize_vtbl_ptrs PARAMS ((tree, void *));
static tree build_default_init PARAMS ((tree, tree));
static tree build_new_1 PARAMS ((tree));
static tree get_cookie_size PARAMS ((tree));
static tree build_dtor_call PARAMS ((tree, special_function_kind, int));
static tree build_field_list PARAMS ((tree, tree, int *));
static tree build_vtbl_address PARAMS ((tree));
static tree initializing_context (tree);
static void expand_cleanup_for_base (tree, tree);
static tree get_temp_regvar (tree, tree);
static tree dfs_initialize_vtbl_ptrs (tree, void *);
static tree build_default_init (tree, tree);
static tree build_new_1 (tree);
static tree get_cookie_size (tree);
static tree build_dtor_call (tree, special_function_kind, int);
static tree build_field_list (tree, tree, int *);
static tree build_vtbl_address (tree);
/* We are about to generate some complex initialization code.
Conceptually, it is all a single expression. However, we may want
......@@ -65,9 +65,7 @@ static tree build_vtbl_address PARAMS ((tree));
complete. */
void
begin_init_stmts (stmt_expr_p, compound_stmt_p)
tree *stmt_expr_p;
tree *compound_stmt_p;
begin_init_stmts (tree *stmt_expr_p, tree *compound_stmt_p)
{
if (building_stmt_tree ())
*stmt_expr_p = begin_stmt_expr ();
......@@ -82,10 +80,7 @@ begin_init_stmts (stmt_expr_p, compound_stmt_p)
begin_init_stmts. Returns the statement-expression itself. */
tree
finish_init_stmts (stmt_expr, compound_stmt)
tree stmt_expr;
tree compound_stmt;
finish_init_stmts (tree stmt_expr, tree compound_stmt)
{
if (building_stmt_tree ())
finish_compound_stmt (/*has_no_scope=*/1, compound_stmt);
......@@ -113,9 +108,7 @@ finish_init_stmts (stmt_expr, compound_stmt)
TREE_LIST whose TREE_VALUE is the this ptr expression. */
static tree
dfs_initialize_vtbl_ptrs (binfo, data)
tree binfo;
void *data;
dfs_initialize_vtbl_ptrs (tree binfo, void *data)
{
if ((!BINFO_PRIMARY_P (binfo) || TREE_VIA_VIRTUAL (binfo))
&& CLASSTYPE_VFIELDS (BINFO_TYPE (binfo)))
......@@ -136,8 +129,7 @@ dfs_initialize_vtbl_ptrs (binfo, data)
ADDR. */
void
initialize_vtbl_ptrs (addr)
tree addr;
initialize_vtbl_ptrs (tree addr)
{
tree list;
tree type;
......@@ -270,9 +262,7 @@ build_zero_init (tree type, tree nelts, bool static_storage_p)
constructors to be called. */
static tree
build_default_init (type, nelts)
tree type;
tree nelts;
build_default_init (tree type, tree nelts)
{
/* [dcl.init]:
......@@ -418,10 +408,7 @@ perform_member_init (tree member, tree init)
the FIELD_DECLs on the TYPE_FIELDS list for T, in reverse order. */
static tree
build_field_list (t, list, uses_unions_p)
tree t;
tree list;
int *uses_unions_p;
build_field_list (tree t, tree list, int *uses_unions_p)
{
tree fields;
......@@ -724,8 +711,7 @@ emit_mem_initializers (tree mem_inits)
assigned to the vptr) for BINFO. */
static tree
build_vtbl_address (binfo)
tree binfo;
build_vtbl_address (tree binfo)
{
tree binfo_for = binfo;
tree vtbl;
......@@ -764,8 +750,7 @@ build_vtbl_address (binfo)
multiple inheritance, this might mean "C's A" if C : A, B. */
static void
expand_virtual_init (binfo, decl)
tree binfo, decl;
expand_virtual_init (tree binfo, tree decl)
{
tree vtbl, vtbl_ptr;
tree vtt_index;
......@@ -817,9 +802,7 @@ expand_virtual_init (binfo, decl)
destroyed. */
static void
expand_cleanup_for_base (binfo, flag)
tree binfo;
tree flag;
expand_cleanup_for_base (tree binfo, tree flag)
{
tree expr;
......@@ -896,8 +879,7 @@ construct_virtual_base (tree vbase, tree arguments)
/* Find the context in which this FIELD can be initialized. */
static tree
initializing_context (field)
tree field;
initializing_context (tree field)
{
tree t = DECL_CONTEXT (field);
......@@ -916,10 +898,7 @@ initializing_context (field)
MEMBER_NAME is the name of the member. */
static int
member_init_ok_or_else (field, type, member_name)
tree field;
tree type;
tree member_name;
member_init_ok_or_else (tree field, tree type, tree member_name)
{
if (field == error_mark_node)
return 0;
......@@ -1068,9 +1047,7 @@ expand_member_init (tree name)
perform the initialization, but not both, as it would be ambiguous. */
tree
build_aggr_init (exp, init, flags)
tree exp, init;
int flags;
build_aggr_init (tree exp, tree init, int flags)
{
tree stmt_expr;
tree compound_stmt;
......@@ -1148,9 +1125,7 @@ build_aggr_init (exp, init, flags)
/* Like build_aggr_init, but not just for aggregates. */
tree
build_init (decl, init, flags)
tree decl, init;
int flags;
build_init (tree decl, tree init, int flags)
{
tree expr;
......@@ -1164,11 +1139,7 @@ build_init (decl, init, flags)
}
static void
expand_default_init (binfo, true_exp, exp, init, flags)
tree binfo;
tree true_exp, exp;
tree init;
int flags;
expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags)
{
tree type = TREE_TYPE (exp);
tree ctor_name;
......@@ -1268,11 +1239,7 @@ expand_default_init (binfo, true_exp, exp, init, flags)
its description. */
static void
expand_aggr_init_1 (binfo, true_exp, exp, init, flags)
tree binfo;
tree true_exp, exp;
tree init;
int flags;
expand_aggr_init_1 (tree binfo, tree true_exp, tree exp, tree init, int flags)
{
tree type = TREE_TYPE (exp);
......@@ -1306,9 +1273,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, flags)
OR_ELSE is nonzero, give an error message. */
int
is_aggr_type (type, or_else)
tree type;
int or_else;
is_aggr_type (tree type, int or_else)
{
if (type == error_mark_node)
return 0;
......@@ -1327,9 +1292,7 @@ is_aggr_type (type, or_else)
/* Like is_aggr_typedef, but returns typedef if successful. */
tree
get_aggr_from_typedef (name, or_else)
tree name;
int or_else;
get_aggr_from_typedef (tree name, int or_else)
{
tree type;
......@@ -1357,8 +1320,7 @@ get_aggr_from_typedef (name, or_else)
}
tree
get_type_value (name)
tree name;
get_type_value (tree name)
{
if (name == error_mark_node)
return NULL_TREE;
......@@ -1377,8 +1339,7 @@ get_type_value (name)
the appropriate function call. */
tree
build_member_call (type, name, parmlist)
tree type, name, parmlist;
build_member_call (tree type, tree name, tree parmlist)
{
tree t;
tree method_name;
......@@ -1532,8 +1493,7 @@ build_member_call (type, name, parmlist)
@@ This function should be rewritten and placed in search.c. */
tree
build_offset_ref (type, name)
tree type, name;
build_offset_ref (tree type, tree name)
{
tree decl, t = error_mark_node;
tree member;
......@@ -1722,8 +1682,7 @@ build_offset_ref (type, name)
not have its address taken. */
tree
resolve_offset_ref (exp)
tree exp;
resolve_offset_ref (tree exp)
{
tree type = TREE_TYPE (exp);
tree base = NULL_TREE;
......@@ -1846,8 +1805,7 @@ resolve_offset_ref (exp)
constant, then return that value. */
tree
decl_constant_value (decl)
tree decl;
decl_constant_value (tree decl)
{
if (TREE_READONLY_DECL_P (decl)
&& ! TREE_THIS_VOLATILE (decl)
......@@ -1868,8 +1826,7 @@ decl_constant_value (decl)
/* Call the global __builtin_delete to delete ADDR. */
static tree
build_builtin_delete_call (addr)
tree addr;
build_builtin_delete_call (tree addr)
{
mark_used (global_delete_fndecl);
return build_call (global_delete_fndecl, build_tree_list (NULL_TREE, addr));
......@@ -1902,10 +1859,7 @@ build_builtin_delete_call (addr)
PLACEMENT is the `placement' list for user-defined operator new (). */
tree
build_new (placement, decl, init, use_global_new)
tree placement;
tree decl, init;
int use_global_new;
build_new (tree placement, tree decl, tree init, int use_global_new)
{
tree type, rval;
tree nelts = NULL_TREE, t;
......@@ -2075,8 +2029,7 @@ build_new (placement, decl, init, use_global_new)
/* Given a Java class, return a decl for the corresponding java.lang.Class. */
tree
build_java_class_ref (type)
tree type;
build_java_class_ref (tree type)
{
tree name = NULL_TREE, class_decl;
static tree CL_suffix = NULL_TREE;
......@@ -2125,8 +2078,7 @@ build_java_class_ref (type)
known that a cookie is needed. */
static tree
get_cookie_size (type)
tree type;
get_cookie_size (tree type)
{
tree cookie_size;
......@@ -2149,8 +2101,7 @@ get_cookie_size (type)
value is immediately handed to expand_expr. */
static tree
build_new_1 (exp)
tree exp;
build_new_1 (tree exp)
{
tree placement, init;
tree true_type, size, rval, t;
......@@ -2535,10 +2486,8 @@ build_new_1 (exp)
}
static tree
build_vec_delete_1 (base, maxindex, type, auto_delete_vec, use_global_delete)
tree base, maxindex, type;
special_function_kind auto_delete_vec;
int use_global_delete;
build_vec_delete_1 (tree base, tree maxindex, tree type,
special_function_kind auto_delete_vec, int use_global_delete)
{
tree virtual_size;
tree ptype = build_pointer_type (type = complete_type (type));
......@@ -2676,8 +2625,7 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, use_global_delete)
/* Create an unnamed variable of the indicated TYPE. */
tree
create_temporary_var (type)
tree type;
create_temporary_var (tree type)
{
tree decl;
......@@ -2699,8 +2647,7 @@ create_temporary_var (type)
"outside" the binding contour of the function). */
static tree
get_temp_regvar (type, init)
tree type, init;
get_temp_regvar (tree type, tree init)
{
tree decl;
......@@ -2731,9 +2678,7 @@ get_temp_regvar (type, init)
but use assignment instead of initialization. */
tree
build_vec_init (base, maxindex, init, from_array)
tree base, init, maxindex;
int from_array;
build_vec_init (tree base, tree maxindex, tree init, int from_array)
{
tree rval;
tree base2 = NULL_TREE;
......@@ -3024,10 +2969,7 @@ build_vec_init (base, maxindex, init, from_array)
This does not call any destructors. */
tree
build_x_delete (addr, which_delete, virtual_size)
tree addr;
int which_delete;
tree virtual_size;
build_x_delete (tree addr, int which_delete, tree virtual_size)
{
int use_global_delete = which_delete & 1;
int use_vec_delete = !!(which_delete & 2);
......@@ -3041,10 +2983,7 @@ build_x_delete (addr, which_delete, virtual_size)
build_delete. */
static tree
build_dtor_call (exp, dtor_kind, flags)
tree exp;
special_function_kind dtor_kind;
int flags;
build_dtor_call (tree exp, special_function_kind dtor_kind, int flags)
{
tree name;
......@@ -3079,11 +3018,8 @@ build_dtor_call (exp, dtor_kind, flags)
flags. See cp-tree.h for more info. */
tree
build_delete (type, addr, auto_delete, flags, use_global_delete)
tree type, addr;
special_function_kind auto_delete;
int flags;
int use_global_delete;
build_delete (tree type, tree addr, special_function_kind auto_delete,
int flags, int use_global_delete)
{
tree expr;
......@@ -3312,8 +3248,7 @@ push_base_cleanups ()
/* For type TYPE, delete the virtual baseclass objects of DECL. */
tree
build_vbase_delete (type, decl)
tree type, decl;
build_vbase_delete (tree type, tree decl)
{
tree vbases = CLASSTYPE_VBASECLASSES (type);
tree result = NULL_TREE;
......@@ -3353,10 +3288,8 @@ build_vbase_delete (type, decl)
be worth bothering.) */
tree
build_vec_delete (base, maxindex, auto_delete_vec, use_global_delete)
tree base, maxindex;
special_function_kind auto_delete_vec;
int use_global_delete;
build_vec_delete (tree base, tree maxindex,
special_function_kind auto_delete_vec, int use_global_delete)
{
tree type;
tree rval;
......
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