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