Commit 11f6b451 by Nathanael Nerode

* decl.c: ANSIfy function declarations.

From-SVN: r61049
parent 8caf4c38
2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
* decl.c: ANSIfy function declarations.
2003-01-07 Mark Mitchell <mark@codesourcery.com> 2003-01-07 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_asm_definition): Correct handling of omitted * parser.c (cp_parser_asm_definition): Correct handling of omitted
......
...@@ -52,104 +52,105 @@ Boston, MA 02111-1307, USA. */ ...@@ -52,104 +52,105 @@ Boston, MA 02111-1307, USA. */
#include "diagnostic.h" #include "diagnostic.h"
#include "debug.h" #include "debug.h"
static tree grokparms PARAMS ((tree)); static tree grokparms (tree);
static const char *redeclaration_error_message PARAMS ((tree, tree)); static const char *redeclaration_error_message (tree, tree);
static void push_binding_level PARAMS ((struct cp_binding_level *, int, static void push_binding_level (struct cp_binding_level *, int,
int)); int);
static void pop_binding_level PARAMS ((void)); static void pop_binding_level (void);
static void suspend_binding_level PARAMS ((void)); static void suspend_binding_level (void);
static void resume_binding_level PARAMS ((struct cp_binding_level *)); static void resume_binding_level (struct cp_binding_level *);
static struct cp_binding_level *make_binding_level PARAMS ((void)); static struct cp_binding_level *make_binding_level (void);
static void declare_namespace_level PARAMS ((void)); static void declare_namespace_level (void);
static int decl_jump_unsafe PARAMS ((tree)); static int decl_jump_unsafe (tree);
static void storedecls PARAMS ((tree)); static void storedecls (tree);
static void require_complete_types_for_parms PARAMS ((tree)); static void require_complete_types_for_parms (tree);
static int ambi_op_p PARAMS ((enum tree_code)); static int ambi_op_p (enum tree_code);
static int unary_op_p PARAMS ((enum tree_code)); static int unary_op_p (enum tree_code);
static tree store_bindings PARAMS ((tree, tree)); static tree store_bindings (tree, tree);
static tree lookup_tag_reverse PARAMS ((tree, tree)); static tree lookup_tag_reverse (tree, tree);
static void push_local_name PARAMS ((tree)); static void push_local_name (tree);
static void warn_extern_redeclared_static PARAMS ((tree, tree)); static void warn_extern_redeclared_static (tree, tree);
static tree grok_reference_init PARAMS ((tree, tree, tree)); static tree grok_reference_init (tree, tree, tree);
static tree grokfndecl PARAMS ((tree, tree, tree, tree, int, static tree grokfndecl (tree, tree, tree, tree, int,
enum overload_flags, tree, enum overload_flags, tree,
tree, int, int, int, int, int, int, tree)); tree, int, int, int, int, int, int, tree);
static tree grokvardecl PARAMS ((tree, tree, RID_BIT_TYPE *, int, int, tree)); static tree grokvardecl (tree, tree, RID_BIT_TYPE *, int, int, tree);
static tree follow_tag_typedef PARAMS ((tree)); static tree follow_tag_typedef (tree);
static tree lookup_tag PARAMS ((enum tree_code, tree, static tree lookup_tag (enum tree_code, tree,
struct cp_binding_level *, int)); struct cp_binding_level *, int);
static void set_identifier_type_value_with_scope static void set_identifier_type_value_with_scope
PARAMS ((tree, tree, struct cp_binding_level *)); (tree, tree, struct cp_binding_level *);
static void record_unknown_type PARAMS ((tree, const char *)); static void record_unknown_type (tree, const char *);
static tree builtin_function_1 PARAMS ((const char *, tree, tree, int, static tree builtin_function_1 (const char *, tree, tree, int,
enum built_in_class, const char *, enum built_in_class, const char *,
tree)); tree);
static tree build_library_fn_1 PARAMS ((tree, enum tree_code, tree)); static tree build_library_fn_1 (tree, enum tree_code, tree);
static int member_function_or_else PARAMS ((tree, tree, enum overload_flags)); static int member_function_or_else (tree, tree, enum overload_flags);
static void bad_specifiers PARAMS ((tree, const char *, int, int, int, int, static void bad_specifiers (tree, const char *, int, int, int, int,
int)); int);
static tree maybe_process_template_type_declaration PARAMS ((tree, int, struct cp_binding_level*)); static tree maybe_process_template_type_declaration
static void check_for_uninitialized_const_var PARAMS ((tree)); (tree, int, struct cp_binding_level*);
static hashval_t typename_hash PARAMS ((const void *)); static void check_for_uninitialized_const_var (tree);
static int typename_compare PARAMS ((const void *, const void *)); static hashval_t typename_hash (const void *);
static void push_binding PARAMS ((tree, tree, struct cp_binding_level*)); static int typename_compare (const void *, const void *);
static int add_binding PARAMS ((tree, tree)); static void push_binding (tree, tree, struct cp_binding_level*);
static void pop_binding PARAMS ((tree, tree)); static int add_binding (tree, tree);
static tree local_variable_p_walkfn PARAMS ((tree *, int *, void *)); static void pop_binding (tree, tree);
static tree find_binding PARAMS ((tree, tree)); static tree local_variable_p_walkfn (tree *, int *, void *);
static tree select_decl PARAMS ((tree, int)); static tree find_binding (tree, tree);
static int lookup_flags PARAMS ((int, int)); static tree select_decl (tree, int);
static tree qualify_lookup PARAMS ((tree, int)); static int lookup_flags (int, int);
static tree record_builtin_java_type PARAMS ((const char *, int)); static tree qualify_lookup (tree, int);
static const char *tag_name PARAMS ((enum tag_types code)); static tree record_builtin_java_type (const char *, int);
static void find_class_binding_level PARAMS ((void)); static const char *tag_name (enum tag_types code);
static struct cp_binding_level *innermost_nonclass_level PARAMS ((void)); static void find_class_binding_level (void);
static void warn_about_implicit_typename_lookup PARAMS ((tree, tree)); static struct cp_binding_level *innermost_nonclass_level (void);
static int walk_namespaces_r PARAMS ((tree, walk_namespaces_fn, void *)); static void warn_about_implicit_typename_lookup (tree, tree);
static int walk_globals_r PARAMS ((tree, void *)); static int walk_namespaces_r (tree, walk_namespaces_fn, void *);
static int walk_vtables_r PARAMS ((tree, void*)); static int walk_globals_r (tree, void*);
static void add_decl_to_level PARAMS ((tree, struct cp_binding_level *)); static int walk_vtables_r (tree, void*);
static tree make_label_decl PARAMS ((tree, int)); static void add_decl_to_level (tree, struct cp_binding_level *);
static void use_label PARAMS ((tree)); static tree make_label_decl (tree, int);
static void check_previous_goto_1 PARAMS ((tree, struct cp_binding_level *, tree, static void use_label (tree);
const char *, int)); static void check_previous_goto_1 (tree, struct cp_binding_level *, tree,
static void check_previous_goto PARAMS ((struct named_label_use_list *)); const char *, int);
static void check_switch_goto PARAMS ((struct cp_binding_level *)); static void check_previous_goto (struct named_label_use_list *);
static void check_previous_gotos PARAMS ((tree)); static void check_switch_goto (struct cp_binding_level *);
static void pop_label PARAMS ((tree, tree)); static void check_previous_gotos (tree);
static void pop_labels PARAMS ((tree)); static void pop_label (tree, tree);
static void maybe_deduce_size_from_array_init PARAMS ((tree, tree)); static void pop_labels (tree);
static void layout_var_decl PARAMS ((tree)); static void maybe_deduce_size_from_array_init (tree, tree);
static void maybe_commonize_var PARAMS ((tree)); static void layout_var_decl (tree);
static void maybe_commonize_var (tree);
static tree check_initializer (tree, tree, int); static tree check_initializer (tree, tree, int);
static void make_rtl_for_nonlocal_decl PARAMS ((tree, tree, const char *)); static void make_rtl_for_nonlocal_decl (tree, tree, const char *);
static void save_function_data PARAMS ((tree)); static void save_function_data (tree);
static void check_function_type PARAMS ((tree, tree)); static void check_function_type (tree, tree);
static void begin_constructor_body PARAMS ((void)); static void begin_constructor_body (void);
static void finish_constructor_body PARAMS ((void)); static void finish_constructor_body (void);
static void begin_destructor_body PARAMS ((void)); static void begin_destructor_body (void);
static void finish_destructor_body PARAMS ((void)); static void finish_destructor_body (void);
static tree create_array_type_for_decl PARAMS ((tree, tree, tree)); static tree create_array_type_for_decl (tree, tree, tree);
static tree get_atexit_node PARAMS ((void)); static tree get_atexit_node (void);
static tree get_dso_handle_node PARAMS ((void)); static tree get_dso_handle_node (void);
static tree start_cleanup_fn PARAMS ((void)); static tree start_cleanup_fn (void);
static void end_cleanup_fn PARAMS ((void)); static void end_cleanup_fn (void);
static tree cp_make_fname_decl PARAMS ((tree, int)); static tree cp_make_fname_decl (tree, int);
static void initialize_predefined_identifiers PARAMS ((void)); static void initialize_predefined_identifiers (void);
static tree check_special_function_return_type static tree check_special_function_return_type
PARAMS ((special_function_kind, tree, tree)); (special_function_kind, tree, tree);
static tree push_cp_library_fn PARAMS ((enum tree_code, tree)); static tree push_cp_library_fn (enum tree_code, tree);
static tree build_cp_library_fn PARAMS ((tree, enum tree_code, tree)); static tree build_cp_library_fn (tree, enum tree_code, tree);
static void store_parm_decls PARAMS ((tree)); static void store_parm_decls (tree);
static int cp_missing_noreturn_ok_p PARAMS ((tree)); static int cp_missing_noreturn_ok_p (tree);
static void initialize_local_var (tree, tree); static void initialize_local_var (tree, tree);
static void expand_static_init (tree, tree); static void expand_static_init (tree, tree);
static tree next_initializable_field (tree); static tree next_initializable_field (tree);
static tree reshape_init (tree, tree *); static tree reshape_init (tree, tree *);
#if defined (DEBUG_BINDING_LEVELS) #if defined (DEBUG_BINDING_LEVELS)
static void indent PARAMS ((void)); static void indent (void);
#endif #endif
/* Erroneous argument lists can use this *IFF* they do not modify it. */ /* Erroneous argument lists can use this *IFF* they do not modify it. */
...@@ -464,7 +465,7 @@ static int binding_depth = 0; ...@@ -464,7 +465,7 @@ static int binding_depth = 0;
static int is_class_level = 0; static int is_class_level = 0;
static void static void
indent () indent (void)
{ {
register unsigned i; register unsigned i;
...@@ -473,12 +474,12 @@ indent () ...@@ -473,12 +474,12 @@ indent ()
} }
#endif /* defined(DEBUG_BINDING_LEVELS) */ #endif /* defined(DEBUG_BINDING_LEVELS) */
static tree pushdecl_with_scope PARAMS ((tree, struct cp_binding_level *)); static tree pushdecl_with_scope (tree, struct cp_binding_level *);
static void static void
push_binding_level (newlevel, tag_transparent, keep) push_binding_level (struct cp_binding_level *newlevel,
struct cp_binding_level *newlevel; int tag_transparent,
int tag_transparent, keep; int keep)
{ {
/* Add this level to the front of the chain (stack) of levels that /* Add this level to the front of the chain (stack) of levels that
are active. */ are active. */
...@@ -503,7 +504,7 @@ push_binding_level (newlevel, tag_transparent, keep) ...@@ -503,7 +504,7 @@ push_binding_level (newlevel, tag_transparent, keep)
CLASS_BINDING_LEVEL appropriately. */ CLASS_BINDING_LEVEL appropriately. */
static void static void
find_class_binding_level () find_class_binding_level (void)
{ {
struct cp_binding_level *level = current_binding_level; struct cp_binding_level *level = current_binding_level;
...@@ -516,7 +517,7 @@ find_class_binding_level () ...@@ -516,7 +517,7 @@ find_class_binding_level ()
} }
static void static void
pop_binding_level () pop_binding_level (void)
{ {
if (global_binding_level) if (global_binding_level)
{ {
...@@ -552,7 +553,7 @@ pop_binding_level () ...@@ -552,7 +553,7 @@ pop_binding_level ()
} }
static void static void
suspend_binding_level () suspend_binding_level (void)
{ {
if (class_binding_level) if (class_binding_level)
current_binding_level = class_binding_level; current_binding_level = class_binding_level;
...@@ -582,8 +583,7 @@ suspend_binding_level () ...@@ -582,8 +583,7 @@ suspend_binding_level ()
} }
static void static void
resume_binding_level (b) resume_binding_level (struct cp_binding_level* b)
struct cp_binding_level *b;
{ {
/* Resuming binding levels is meant only for namespaces, /* Resuming binding levels is meant only for namespaces,
and those cannot nest into classes. */ and those cannot nest into classes. */
...@@ -605,7 +605,7 @@ resume_binding_level (b) ...@@ -605,7 +605,7 @@ resume_binding_level (b)
static static
struct cp_binding_level * struct cp_binding_level *
make_binding_level () make_binding_level (void)
{ {
/* NOSTRICT */ /* NOSTRICT */
return (struct cp_binding_level *) ggc_alloc (sizeof (struct cp_binding_level)); return (struct cp_binding_level *) ggc_alloc (sizeof (struct cp_binding_level));
...@@ -614,7 +614,7 @@ make_binding_level () ...@@ -614,7 +614,7 @@ make_binding_level ()
/* Nonzero if we are currently in the global binding level. */ /* Nonzero if we are currently in the global binding level. */
int int
global_bindings_p () global_bindings_p (void)
{ {
return current_binding_level == global_binding_level; return current_binding_level == global_binding_level;
} }
...@@ -622,7 +622,7 @@ global_bindings_p () ...@@ -622,7 +622,7 @@ global_bindings_p ()
/* Return the innermost binding level that is not for a class scope. */ /* Return the innermost binding level that is not for a class scope. */
static struct cp_binding_level * static struct cp_binding_level *
innermost_nonclass_level () innermost_nonclass_level (void)
{ {
struct cp_binding_level *b; struct cp_binding_level *b;
...@@ -640,7 +640,7 @@ innermost_nonclass_level () ...@@ -640,7 +640,7 @@ innermost_nonclass_level ()
also include a class whose context is toplevel. */ also include a class whose context is toplevel. */
int int
toplevel_bindings_p () toplevel_bindings_p (void)
{ {
struct cp_binding_level *b = innermost_nonclass_level (); struct cp_binding_level *b = innermost_nonclass_level ();
...@@ -652,7 +652,7 @@ toplevel_bindings_p () ...@@ -652,7 +652,7 @@ toplevel_bindings_p ()
such a class, etc. */ such a class, etc. */
int int
namespace_bindings_p () namespace_bindings_p (void)
{ {
struct cp_binding_level *b = innermost_nonclass_level (); struct cp_binding_level *b = innermost_nonclass_level ();
...@@ -664,8 +664,7 @@ namespace_bindings_p () ...@@ -664,8 +664,7 @@ namespace_bindings_p ()
or not to create a BLOCK. */ or not to create a BLOCK. */
void void
keep_next_level (keep) keep_next_level (int keep)
int keep;
{ {
keep_next_level_flag = keep; keep_next_level_flag = keep;
} }
...@@ -673,7 +672,7 @@ keep_next_level (keep) ...@@ -673,7 +672,7 @@ keep_next_level (keep)
/* Nonzero if the current level needs to have a BLOCK made. */ /* Nonzero if the current level needs to have a BLOCK made. */
int int
kept_level_p () kept_level_p (void)
{ {
return (current_binding_level->blocks != NULL_TREE return (current_binding_level->blocks != NULL_TREE
|| current_binding_level->keep || current_binding_level->keep
...@@ -683,7 +682,7 @@ kept_level_p () ...@@ -683,7 +682,7 @@ kept_level_p ()
} }
static void static void
declare_namespace_level () declare_namespace_level (void)
{ {
current_binding_level->namespace_p = 1; current_binding_level->namespace_p = 1;
} }
...@@ -692,7 +691,7 @@ declare_namespace_level () ...@@ -692,7 +691,7 @@ declare_namespace_level ()
parameters. */ parameters. */
int int
template_parm_scope_p () template_parm_scope_p (void)
{ {
return current_binding_level->template_parms_p; return current_binding_level->template_parms_p;
} }
...@@ -702,8 +701,7 @@ template_parm_scope_p () ...@@ -702,8 +701,7 @@ template_parm_scope_p ()
explicit scope qualifications. */ explicit scope qualifications. */
tmpl_spec_kind tmpl_spec_kind
current_tmpl_spec_kind (n_class_scopes) current_tmpl_spec_kind (int n_class_scopes)
int n_class_scopes;
{ {
int n_template_parm_scopes = 0; int n_template_parm_scopes = 0;
int seen_specialization_p = 0; int seen_specialization_p = 0;
...@@ -787,8 +785,7 @@ current_tmpl_spec_kind (n_class_scopes) ...@@ -787,8 +785,7 @@ current_tmpl_spec_kind (n_class_scopes)
} }
void void
set_class_shadows (shadows) set_class_shadows (tree shadows)
tree shadows;
{ {
class_binding_level->class_shadowed = shadows; class_binding_level->class_shadowed = shadows;
} }
...@@ -798,8 +795,7 @@ set_class_shadows (shadows) ...@@ -798,8 +795,7 @@ set_class_shadows (shadows)
not for that of tags. */ not for that of tags. */
void void
pushlevel (tag_transparent) pushlevel (int tag_transparent)
int tag_transparent;
{ {
struct cp_binding_level *newlevel; struct cp_binding_level *newlevel;
...@@ -828,8 +824,7 @@ pushlevel (tag_transparent) ...@@ -828,8 +824,7 @@ pushlevel (tag_transparent)
scope, create a new binding level. */ scope, create a new binding level. */
void void
maybe_push_cleanup_level (type) maybe_push_cleanup_level (tree type)
tree type;
{ {
if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type) if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
&& current_binding_level->more_cleanups_ok == 0) && current_binding_level->more_cleanups_ok == 0)
...@@ -845,8 +840,7 @@ maybe_push_cleanup_level (type) ...@@ -845,8 +840,7 @@ maybe_push_cleanup_level (type)
created. */ created. */
void void
begin_scope (sk) begin_scope (scope_kind sk)
scope_kind sk;
{ {
pushlevel (0); pushlevel (0);
...@@ -883,7 +877,7 @@ begin_scope (sk) ...@@ -883,7 +877,7 @@ begin_scope (sk)
/* Exit the current scope. */ /* Exit the current scope. */
void void
finish_scope () finish_scope (void)
{ {
poplevel (0, 0, 0); poplevel (0, 0, 0);
} }
...@@ -902,10 +896,9 @@ static GTY((deletable (""))) tree free_bindings; ...@@ -902,10 +896,9 @@ static GTY((deletable (""))) tree free_bindings;
level at which this declaration is being bound. */ level at which this declaration is being bound. */
static void static void
push_binding (id, decl, level) push_binding (tree id,
tree id; tree decl,
tree decl; struct cp_binding_level* level)
struct cp_binding_level* level;
{ {
tree binding; tree binding;
...@@ -937,9 +930,7 @@ push_binding (id, decl, level) ...@@ -937,9 +930,7 @@ push_binding (id, decl, level)
responsibility of the caller to check that inserting this name is responsibility of the caller to check that inserting this name is
valid here. Returns nonzero if the new binding was successful. */ valid here. Returns nonzero if the new binding was successful. */
static int static int
add_binding (id, decl) add_binding (tree id, tree decl)
tree id;
tree decl;
{ {
tree binding = IDENTIFIER_BINDING (id); tree binding = IDENTIFIER_BINDING (id);
int ok = 1; int ok = 1;
...@@ -1006,9 +997,8 @@ add_binding (id, decl) ...@@ -1006,9 +997,8 @@ add_binding (id, decl)
/* Add DECL to the list of things declared in B. */ /* Add DECL to the list of things declared in B. */
static void static void
add_decl_to_level (decl, b) add_decl_to_level (tree decl,
tree decl; struct cp_binding_level* b)
struct cp_binding_level *b;
{ {
if (TREE_CODE (decl) == NAMESPACE_DECL if (TREE_CODE (decl) == NAMESPACE_DECL
&& !DECL_NAMESPACE_ALIAS (decl)) && !DECL_NAMESPACE_ALIAS (decl))
...@@ -1037,10 +1027,7 @@ add_decl_to_level (decl, b) ...@@ -1037,10 +1027,7 @@ add_decl_to_level (decl, b)
through a using-declaration. */ through a using-declaration. */
void void
push_local_binding (id, decl, flags) push_local_binding (tree id, tree decl, int flags)
tree id;
tree decl;
int flags;
{ {
struct cp_binding_level *b; struct cp_binding_level *b;
...@@ -1078,9 +1065,7 @@ push_local_binding (id, decl, flags) ...@@ -1078,9 +1065,7 @@ push_local_binding (id, decl, flags)
binding was successful. */ binding was successful. */
int int
push_class_binding (id, decl) push_class_binding (tree id, tree decl)
tree id;
tree decl;
{ {
int result = 1; int result = 1;
tree binding = IDENTIFIER_BINDING (id); tree binding = IDENTIFIER_BINDING (id);
...@@ -1144,9 +1129,7 @@ push_class_binding (id, decl) ...@@ -1144,9 +1129,7 @@ push_class_binding (id, decl)
for ID. */ for ID. */
static void static void
pop_binding (id, decl) pop_binding (tree id, tree decl)
tree id;
tree decl;
{ {
tree binding; tree binding;
...@@ -1191,9 +1174,7 @@ pop_binding (id, decl) ...@@ -1191,9 +1174,7 @@ pop_binding (id, decl)
in a valid manner, and issue any appropriate warnings or errors. */ in a valid manner, and issue any appropriate warnings or errors. */
static void static void
pop_label (label, old_value) pop_label (tree label, tree old_value)
tree label;
tree old_value;
{ {
if (!processing_template_decl && doing_semantic_analysis_p ()) if (!processing_template_decl && doing_semantic_analysis_p ())
{ {
...@@ -1215,8 +1196,7 @@ pop_label (label, old_value) ...@@ -1215,8 +1196,7 @@ pop_label (label, old_value)
function. */ function. */
static void static void
pop_labels (block) pop_labels (tree block)
tree block;
{ {
struct named_label_list *link; struct named_label_list *link;
...@@ -1250,10 +1230,7 @@ pop_labels (block) ...@@ -1250,10 +1230,7 @@ pop_labels (block)
them into the BLOCK. */ them into the BLOCK. */
tree tree
poplevel (keep, reverse, functionbody) poplevel (int keep, int reverse, int functionbody)
int keep;
int reverse;
int functionbody;
{ {
register tree link; register tree link;
/* The chain of decls was accumulated in reverse order. /* The chain of decls was accumulated in reverse order.
...@@ -1567,8 +1544,7 @@ poplevel (keep, reverse, functionbody) ...@@ -1567,8 +1544,7 @@ poplevel (keep, reverse, functionbody)
so that the block can be reinserted where appropriate. */ so that the block can be reinserted where appropriate. */
void void
delete_block (block) delete_block (tree block)
tree block;
{ {
tree t; tree t;
if (current_binding_level->blocks == block) if (current_binding_level->blocks == block)
...@@ -1591,8 +1567,7 @@ delete_block (block) ...@@ -1591,8 +1567,7 @@ delete_block (block)
to handle the BLOCK node inside the BIND_EXPR. */ to handle the BLOCK node inside the BIND_EXPR. */
void void
insert_block (block) insert_block (tree block)
tree block;
{ {
TREE_USED (block) = 1; TREE_USED (block) = 1;
current_binding_level->blocks current_binding_level->blocks
...@@ -1603,8 +1578,7 @@ insert_block (block) ...@@ -1603,8 +1578,7 @@ insert_block (block)
(the one we are currently in). */ (the one we are currently in). */
void void
set_block (block) set_block (tree block ATTRIBUTE_UNUSED )
tree block ATTRIBUTE_UNUSED;
{ {
/* The RTL expansion machinery requires us to provide this callback, /* The RTL expansion machinery requires us to provide this callback,
but it is not applicable in function-at-a-time mode. */ but it is not applicable in function-at-a-time mode. */
...@@ -1614,7 +1588,7 @@ set_block (block) ...@@ -1614,7 +1588,7 @@ set_block (block)
/* Do a pushlevel for class declarations. */ /* Do a pushlevel for class declarations. */
void void
pushlevel_class () pushlevel_class (void)
{ {
register struct cp_binding_level *newlevel; register struct cp_binding_level *newlevel;
...@@ -1645,7 +1619,7 @@ pushlevel_class () ...@@ -1645,7 +1619,7 @@ pushlevel_class ()
/* ...and a poplevel for class declarations. */ /* ...and a poplevel for class declarations. */
void void
poplevel_class () poplevel_class (void)
{ {
register struct cp_binding_level *level = class_binding_level; register struct cp_binding_level *level = class_binding_level;
tree shadowed; tree shadowed;
...@@ -1720,7 +1694,7 @@ poplevel_class () ...@@ -1720,7 +1694,7 @@ poplevel_class ()
for any names in enclosing classes. */ for any names in enclosing classes. */
void void
clear_identifier_class_values () clear_identifier_class_values (void)
{ {
tree t; tree t;
...@@ -1736,9 +1710,7 @@ clear_identifier_class_values () ...@@ -1736,9 +1710,7 @@ clear_identifier_class_values ()
/* Returns nonzero if T is a virtual function table. */ /* Returns nonzero if T is a virtual function table. */
int int
vtable_decl_p (t, data) vtable_decl_p (tree t, void* data ATTRIBUTE_UNUSED )
tree t;
void *data ATTRIBUTE_UNUSED;
{ {
return (TREE_CODE (t) == VAR_DECL && DECL_VIRTUAL_P (t)); return (TREE_CODE (t) == VAR_DECL && DECL_VIRTUAL_P (t));
} }
...@@ -1747,9 +1719,7 @@ vtable_decl_p (t, data) ...@@ -1747,9 +1719,7 @@ vtable_decl_p (t, data)
functions. */ functions. */
int int
vtype_decl_p (t, data) vtype_decl_p (tree t, void *data ATTRIBUTE_UNUSED )
tree t;
void *data ATTRIBUTE_UNUSED;
{ {
return (TREE_CODE (t) == TYPE_DECL return (TREE_CODE (t) == TYPE_DECL
&& TREE_CODE (TREE_TYPE (t)) == RECORD_TYPE && TREE_CODE (TREE_TYPE (t)) == RECORD_TYPE
...@@ -1759,8 +1729,7 @@ vtype_decl_p (t, data) ...@@ -1759,8 +1729,7 @@ vtype_decl_p (t, data)
/* Return the declarations that are members of the namespace NS. */ /* Return the declarations that are members of the namespace NS. */
tree tree
cp_namespace_decls (ns) cp_namespace_decls (tree ns)
tree ns;
{ {
return NAMESPACE_LEVEL (ns)->names; return NAMESPACE_LEVEL (ns)->names;
} }
...@@ -1776,9 +1745,7 @@ struct walk_globals_data { ...@@ -1776,9 +1745,7 @@ struct walk_globals_data {
to F returns a nonzero value, return a nonzero value. */ to F returns a nonzero value, return a nonzero value. */
static int static int
walk_vtables_r (namespace, data) walk_vtables_r (tree namespace, void* data)
tree namespace;
void *data;
{ {
struct walk_globals_data* wgd = (struct walk_globals_data *) data; struct walk_globals_data* wgd = (struct walk_globals_data *) data;
walk_globals_fn f = wgd->f; walk_globals_fn f = wgd->f;
...@@ -1810,10 +1777,7 @@ walk_vtables (walk_globals_pred p, walk_globals_fn f, void *data) ...@@ -1810,10 +1777,7 @@ walk_vtables (walk_globals_pred p, walk_globals_fn f, void *data)
itself, calling F for each. The DATA is passed to F as well. */ itself, calling F for each. The DATA is passed to F as well. */
static int static int
walk_namespaces_r (namespace, f, data) walk_namespaces_r (tree namespace, walk_namespaces_fn f, void* data)
tree namespace;
walk_namespaces_fn f;
void *data;
{ {
int result = 0; int result = 0;
tree current = NAMESPACE_LEVEL (namespace)->namespaces; tree current = NAMESPACE_LEVEL (namespace)->namespaces;
...@@ -1830,9 +1794,7 @@ walk_namespaces_r (namespace, f, data) ...@@ -1830,9 +1794,7 @@ walk_namespaces_r (namespace, f, data)
F as well. */ F as well. */
int int
walk_namespaces (f, data) walk_namespaces (walk_namespaces_fn f, void* data)
walk_namespaces_fn f;
void *data;
{ {
return walk_namespaces_r (global_namespace, f, data); return walk_namespaces_r (global_namespace, f, data);
} }
...@@ -1842,9 +1804,7 @@ walk_namespaces (f, data) ...@@ -1842,9 +1804,7 @@ walk_namespaces (f, data)
to F returns a nonzero value, return a nonzero value. */ to F returns a nonzero value, return a nonzero value. */
static int static int
walk_globals_r (namespace, data) walk_globals_r (tree namespace, void* data)
tree namespace;
void *data;
{ {
struct walk_globals_data* wgd = (struct walk_globals_data *) data; struct walk_globals_data* wgd = (struct walk_globals_data *) data;
walk_globals_pred p = wgd->p; walk_globals_pred p = wgd->p;
...@@ -1891,9 +1851,7 @@ walk_globals (walk_globals_pred p, walk_globals_fn f, void *data) ...@@ -1891,9 +1851,7 @@ walk_globals (walk_globals_pred p, walk_globals_fn f, void *data)
wrapup_global_declarations for this NAMESPACE. */ wrapup_global_declarations for this NAMESPACE. */
int int
wrapup_globals_for_namespace (namespace, data) wrapup_globals_for_namespace (tree namespace, void* data)
tree namespace;
void *data;
{ {
tree globals = cp_namespace_decls (namespace); tree globals = cp_namespace_decls (namespace);
int len = NAMESPACE_LEVEL (namespace)->names_size; int len = NAMESPACE_LEVEL (namespace)->names_size;
...@@ -1930,8 +1888,7 @@ static int no_print_functions = 0; ...@@ -1930,8 +1888,7 @@ static int no_print_functions = 0;
static int no_print_builtins = 0; static int no_print_builtins = 0;
void void
print_binding_level (lvl) print_binding_level (struct cp_binding_level* lvl)
struct cp_binding_level *lvl;
{ {
tree t; tree t;
int i = 0, len; int i = 0, len;
...@@ -2031,8 +1988,7 @@ print_binding_level (lvl) ...@@ -2031,8 +1988,7 @@ print_binding_level (lvl)
} }
void void
print_other_binding_stack (stack) print_other_binding_stack (struct cp_binding_level *stack)
struct cp_binding_level *stack;
{ {
struct cp_binding_level *level; struct cp_binding_level *level;
for (level = stack; level != global_binding_level; level = level->level_chain) for (level = stack; level != global_binding_level; level = level->level_chain)
...@@ -2045,7 +2001,7 @@ print_other_binding_stack (stack) ...@@ -2045,7 +2001,7 @@ print_other_binding_stack (stack)
} }
void void
print_binding_stack () print_binding_stack (void)
{ {
struct cp_binding_level *b; struct cp_binding_level *b;
fprintf (stderr, "current_binding_level="); fprintf (stderr, "current_binding_level=");
...@@ -2082,9 +2038,7 @@ print_binding_stack () ...@@ -2082,9 +2038,7 @@ print_binding_stack ()
of bindings. Returns the binding found, or NULL_TREE. */ of bindings. Returns the binding found, or NULL_TREE. */
static tree static tree
find_binding (name, scope) find_binding (tree name, tree scope)
tree name;
tree scope;
{ {
tree iter, prev = NULL_TREE; tree iter, prev = NULL_TREE;
...@@ -2116,9 +2070,7 @@ find_binding (name, scope) ...@@ -2116,9 +2070,7 @@ find_binding (name, scope)
If no binding is found, make a new one. */ If no binding is found, make a new one. */
tree tree
binding_for_name (name, scope) binding_for_name (tree name, tree scope)
tree name;
tree scope;
{ {
tree b = IDENTIFIER_NAMESPACE_BINDINGS (name); tree b = IDENTIFIER_NAMESPACE_BINDINGS (name);
tree result; tree result;
...@@ -2148,9 +2100,7 @@ binding_for_name (name, scope) ...@@ -2148,9 +2100,7 @@ binding_for_name (name, scope)
namespace_binding may or may not be a list of CPLUS_BINDINGS. */ namespace_binding may or may not be a list of CPLUS_BINDINGS. */
tree tree
namespace_binding (name, scope) namespace_binding (tree name, tree scope)
tree name;
tree scope;
{ {
tree b = IDENTIFIER_NAMESPACE_BINDINGS (name); tree b = IDENTIFIER_NAMESPACE_BINDINGS (name);
if (b == NULL_TREE) if (b == NULL_TREE)
...@@ -2169,10 +2119,7 @@ namespace_binding (name, scope) ...@@ -2169,10 +2119,7 @@ namespace_binding (name, scope)
of global_namespace is attempted, try to optimize it. */ of global_namespace is attempted, try to optimize it. */
void void
set_namespace_binding (name, scope, val) set_namespace_binding (tree name, tree scope, tree val)
tree name;
tree scope;
tree val;
{ {
tree b; tree b;
...@@ -2196,8 +2143,7 @@ set_namespace_binding (name, scope, val) ...@@ -2196,8 +2143,7 @@ set_namespace_binding (name, scope, val)
select a name that is unique to this compilation unit. */ select a name that is unique to this compilation unit. */
void void
push_namespace (name) push_namespace (tree name)
tree name;
{ {
tree d = NULL_TREE; tree d = NULL_TREE;
int need_new = 1; int need_new = 1;
...@@ -2265,7 +2211,7 @@ push_namespace (name) ...@@ -2265,7 +2211,7 @@ push_namespace (name)
/* Pop from the scope of the current namespace. */ /* Pop from the scope of the current namespace. */
void void
pop_namespace () pop_namespace (void)
{ {
my_friendly_assert (current_namespace != global_namespace, 20010801); my_friendly_assert (current_namespace != global_namespace, 20010801);
current_namespace = CP_DECL_CONTEXT (current_namespace); current_namespace = CP_DECL_CONTEXT (current_namespace);
...@@ -2277,8 +2223,7 @@ pop_namespace () ...@@ -2277,8 +2223,7 @@ pop_namespace ()
nested within another namespace. */ nested within another namespace. */
void void
push_nested_namespace (ns) push_nested_namespace (tree ns)
tree ns;
{ {
if (ns == global_namespace) if (ns == global_namespace)
push_to_top_level (); push_to_top_level ();
...@@ -2293,8 +2238,7 @@ push_nested_namespace (ns) ...@@ -2293,8 +2238,7 @@ push_nested_namespace (ns)
entered with push_nested_namespace. */ entered with push_nested_namespace. */
void void
pop_nested_namespace (ns) pop_nested_namespace (tree ns)
tree ns;
{ {
while (ns != global_namespace) while (ns != global_namespace)
{ {
...@@ -2314,8 +2258,7 @@ pop_nested_namespace (ns) ...@@ -2314,8 +2258,7 @@ pop_nested_namespace (ns)
struct saved_scope *scope_chain; struct saved_scope *scope_chain;
static tree static tree
store_bindings (names, old_bindings) store_bindings (tree names, tree old_bindings)
tree names, old_bindings;
{ {
tree t; tree t;
tree search_bindings = old_bindings; tree search_bindings = old_bindings;
...@@ -2357,8 +2300,7 @@ store_bindings (names, old_bindings) ...@@ -2357,8 +2300,7 @@ store_bindings (names, old_bindings)
} }
void void
maybe_push_to_top_level (pseudo) maybe_push_to_top_level (int pseudo)
int pseudo;
{ {
struct saved_scope *s; struct saved_scope *s;
struct cp_binding_level *b; struct cp_binding_level *b;
...@@ -2421,13 +2363,13 @@ maybe_push_to_top_level (pseudo) ...@@ -2421,13 +2363,13 @@ maybe_push_to_top_level (pseudo)
} }
void void
push_to_top_level () push_to_top_level (void)
{ {
maybe_push_to_top_level (0); maybe_push_to_top_level (0);
} }
void void
pop_from_top_level () pop_from_top_level (void)
{ {
struct saved_scope *s = scope_chain; struct saved_scope *s = scope_chain;
tree t; tree t;
...@@ -2470,10 +2412,9 @@ pop_from_top_level () ...@@ -2470,10 +2412,9 @@ pop_from_top_level ()
the type that ID maps to. */ the type that ID maps to. */
static void static void
set_identifier_type_value_with_scope (id, type, b) set_identifier_type_value_with_scope (tree id,
tree id; tree type,
tree type; struct cp_binding_level* b)
struct cp_binding_level *b;
{ {
if (!b->namespace_p) if (!b->namespace_p)
{ {
...@@ -2496,9 +2437,7 @@ set_identifier_type_value_with_scope (id, type, b) ...@@ -2496,9 +2437,7 @@ set_identifier_type_value_with_scope (id, type, b)
/* As set_identifier_type_value_with_scope, but using current_binding_level. */ /* As set_identifier_type_value_with_scope, but using current_binding_level. */
void void
set_identifier_type_value (id, type) set_identifier_type_value (tree id, tree type)
tree id;
tree type;
{ {
set_identifier_type_value_with_scope (id, type, current_binding_level); set_identifier_type_value_with_scope (id, type, current_binding_level);
} }
...@@ -2506,8 +2445,7 @@ set_identifier_type_value (id, type) ...@@ -2506,8 +2445,7 @@ set_identifier_type_value (id, type)
/* Return the type associated with id. */ /* Return the type associated with id. */
tree tree
identifier_type_value (id) identifier_type_value (tree id)
tree id;
{ {
/* There is no type with that name, anywhere. */ /* There is no type with that name, anywhere. */
if (REAL_IDENTIFIER_TYPE_VALUE (id) == NULL_TREE) if (REAL_IDENTIFIER_TYPE_VALUE (id) == NULL_TREE)
...@@ -2528,7 +2466,7 @@ identifier_type_value (id) ...@@ -2528,7 +2466,7 @@ identifier_type_value (id)
We don't pop past namespaces, as they might be valid. */ We don't pop past namespaces, as they might be valid. */
void void
pop_everything () pop_everything (void)
{ {
#ifdef DEBUG_BINDING_LEVELS #ifdef DEBUG_BINDING_LEVELS
fprintf (stderr, "XXX entering pop_everything ()\n"); fprintf (stderr, "XXX entering pop_everything ()\n");
...@@ -2555,10 +2493,9 @@ pop_everything () ...@@ -2555,10 +2493,9 @@ pop_everything ()
processing. */ processing. */
static tree static tree
maybe_process_template_type_declaration (type, globalize, b) maybe_process_template_type_declaration (tree type,
tree type; int globalize,
int globalize; struct cp_binding_level* b)
struct cp_binding_level* b;
{ {
tree decl = TYPE_NAME (type); tree decl = TYPE_NAME (type);
...@@ -2621,9 +2558,7 @@ maybe_process_template_type_declaration (type, globalize, b) ...@@ -2621,9 +2558,7 @@ maybe_process_template_type_declaration (type, globalize, b)
the TYPE_DECL for TYPE. */ the TYPE_DECL for TYPE. */
tree tree
create_implicit_typedef (name, type) create_implicit_typedef (tree name, tree type)
tree name;
tree type;
{ {
tree decl; tree decl;
...@@ -2641,8 +2576,7 @@ create_implicit_typedef (name, type) ...@@ -2641,8 +2576,7 @@ create_implicit_typedef (name, type)
/* Remember a local name for name-mangling purposes. */ /* Remember a local name for name-mangling purposes. */
static void static void
push_local_name (decl) push_local_name (tree decl)
tree decl;
{ {
size_t i, nelts; size_t i, nelts;
tree t, name; tree t, name;
...@@ -2680,9 +2614,7 @@ push_local_name (decl) ...@@ -2680,9 +2614,7 @@ push_local_name (decl)
The latter is needed for implicit declarations. */ The latter is needed for implicit declarations. */
void void
pushtag (name, type, globalize) pushtag (tree name, tree type, int globalize)
tree name, type;
int globalize;
{ {
register struct cp_binding_level *b; register struct cp_binding_level *b;
...@@ -2805,7 +2737,7 @@ static int anon_cnt = 0; ...@@ -2805,7 +2737,7 @@ static int anon_cnt = 0;
anonymous structs and unions. */ anonymous structs and unions. */
tree tree
make_anon_name () make_anon_name (void)
{ {
char buf[32]; char buf[32];
...@@ -2817,7 +2749,7 @@ make_anon_name () ...@@ -2817,7 +2749,7 @@ make_anon_name ()
This keeps dbxout from getting confused. */ This keeps dbxout from getting confused. */
void void
clear_anon_tags () clear_anon_tags (void)
{ {
register struct cp_binding_level *b; register struct cp_binding_level *b;
register tree tags; register tree tags;
...@@ -2852,8 +2784,7 @@ clear_anon_tags () ...@@ -2852,8 +2784,7 @@ clear_anon_tags ()
`const int&'. */ `const int&'. */
int int
decls_match (newdecl, olddecl) decls_match (tree newdecl, tree olddecl)
tree newdecl, olddecl;
{ {
int types_match; int types_match;
...@@ -2956,8 +2887,7 @@ decls_match (newdecl, olddecl) ...@@ -2956,8 +2887,7 @@ decls_match (newdecl, olddecl)
the user's control. */ the user's control. */
static void static void
warn_extern_redeclared_static (newdecl, olddecl) warn_extern_redeclared_static (tree newdecl, tree olddecl)
tree newdecl, olddecl;
{ {
static const char *const explicit_extern_static_warning static const char *const explicit_extern_static_warning
= "`%D' was declared `extern' and later `static'"; = "`%D' was declared `extern' and later `static'";
...@@ -3002,8 +2932,7 @@ warn_extern_redeclared_static (newdecl, olddecl) ...@@ -3002,8 +2932,7 @@ warn_extern_redeclared_static (newdecl, olddecl)
Otherwise, return 0. */ Otherwise, return 0. */
int int
duplicate_decls (newdecl, olddecl) duplicate_decls (tree newdecl, tree olddecl)
tree newdecl, olddecl;
{ {
unsigned olddecl_uid = DECL_UID (olddecl); unsigned olddecl_uid = DECL_UID (olddecl);
int olddecl_friend = 0, types_match = 0; int olddecl_friend = 0, types_match = 0;
...@@ -3761,8 +3690,7 @@ duplicate_decls (newdecl, olddecl) ...@@ -3761,8 +3690,7 @@ duplicate_decls (newdecl, olddecl)
to agree with what X says. */ to agree with what X says. */
tree tree
pushdecl (x) pushdecl (tree x)
tree x;
{ {
register tree t; register tree t;
register tree name; register tree name;
...@@ -4208,9 +4136,7 @@ pushdecl (x) ...@@ -4208,9 +4136,7 @@ pushdecl (x)
caller to set DECL_CONTEXT properly. */ caller to set DECL_CONTEXT properly. */
static tree static tree
pushdecl_with_scope (x, level) pushdecl_with_scope (tree x, struct cp_binding_level* level)
tree x;
struct cp_binding_level *level;
{ {
register struct cp_binding_level *b; register struct cp_binding_level *b;
tree function_decl = current_function_decl; tree function_decl = current_function_decl;
...@@ -4238,8 +4164,7 @@ pushdecl_with_scope (x, level) ...@@ -4238,8 +4164,7 @@ pushdecl_with_scope (x, level)
if appropriate. */ if appropriate. */
tree tree
pushdecl_namespace_level (x) pushdecl_namespace_level (tree x)
tree x;
{ {
register struct cp_binding_level *b = current_binding_level; register struct cp_binding_level *b = current_binding_level;
register tree t; register tree t;
...@@ -4284,8 +4209,7 @@ pushdecl_namespace_level (x) ...@@ -4284,8 +4209,7 @@ pushdecl_namespace_level (x)
if appropriate. */ if appropriate. */
tree tree
pushdecl_top_level (x) pushdecl_top_level (tree x)
tree x;
{ {
push_to_top_level (); push_to_top_level ();
x = pushdecl_namespace_level (x); x = pushdecl_namespace_level (x);
...@@ -4296,8 +4220,7 @@ pushdecl_top_level (x) ...@@ -4296,8 +4220,7 @@ pushdecl_top_level (x)
/* Make the declaration of X appear in CLASS scope. */ /* Make the declaration of X appear in CLASS scope. */
void void
pushdecl_class_level (x) pushdecl_class_level (tree x)
tree x;
{ {
tree name; tree name;
...@@ -4329,8 +4252,7 @@ pushdecl_class_level (x) ...@@ -4329,8 +4252,7 @@ pushdecl_class_level (x)
DECL, or a modified version thereof. */ DECL, or a modified version thereof. */
tree tree
maybe_push_decl (decl) maybe_push_decl (tree decl)
tree decl;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
...@@ -4359,9 +4281,7 @@ maybe_push_decl (decl) ...@@ -4359,9 +4281,7 @@ maybe_push_decl (decl)
under the name NAME. */ under the name NAME. */
void void
push_class_level_binding (name, x) push_class_level_binding (tree name, tree x)
tree name;
tree x;
{ {
tree binding; tree binding;
/* The class_binding_level will be NULL if x is a template /* The class_binding_level will be NULL if x is a template
...@@ -4440,9 +4360,7 @@ push_class_level_binding (name, x) ...@@ -4440,9 +4360,7 @@ push_class_level_binding (name, x)
scope, a using decl might extend any previous bindings). */ scope, a using decl might extend any previous bindings). */
tree tree
push_using_decl (scope, name) push_using_decl (tree scope, tree name)
tree scope;
tree name;
{ {
tree decl; tree decl;
...@@ -4465,8 +4383,7 @@ push_using_decl (scope, name) ...@@ -4465,8 +4383,7 @@ push_using_decl (scope, name)
TREE_LIST otherwise. */ TREE_LIST otherwise. */
tree tree
push_using_directive (used) push_using_directive (tree used)
tree used;
{ {
tree ud = current_binding_level->using_directives; tree ud = current_binding_level->using_directives;
tree iter, ancestor; tree iter, ancestor;
...@@ -4506,9 +4423,7 @@ push_using_directive (used) ...@@ -4506,9 +4423,7 @@ push_using_directive (used)
it's always DECL (and never something that's not a _DECL). */ it's always DECL (and never something that's not a _DECL). */
tree tree
push_overloaded_decl (decl, flags) push_overloaded_decl (tree decl, int flags)
tree decl;
int flags;
{ {
tree name = DECL_NAME (decl); tree name = DECL_NAME (decl);
tree old; tree old;
...@@ -4624,8 +4539,7 @@ push_overloaded_decl (decl, flags) ...@@ -4624,8 +4539,7 @@ push_overloaded_decl (decl, flags)
as a function of type int (). Print a warning if appropriate. */ as a function of type int (). Print a warning if appropriate. */
tree tree
implicitly_declare (functionid) implicitly_declare (tree functionid)
tree functionid;
{ {
register tree decl; register tree decl;
...@@ -4661,8 +4575,7 @@ implicitly_declare (functionid) ...@@ -4661,8 +4575,7 @@ implicitly_declare (functionid)
where the identifier should go. */ where the identifier should go. */
static const char * static const char *
redeclaration_error_message (newdecl, olddecl) redeclaration_error_message (tree newdecl, tree olddecl)
tree newdecl, olddecl;
{ {
if (TREE_CODE (newdecl) == TYPE_DECL) if (TREE_CODE (newdecl) == TYPE_DECL)
{ {
...@@ -4738,9 +4651,7 @@ redeclaration_error_message (newdecl, olddecl) ...@@ -4738,9 +4651,7 @@ redeclaration_error_message (newdecl, olddecl)
/* Create a new label, named ID. */ /* Create a new label, named ID. */
static tree static tree
make_label_decl (id, local_p) make_label_decl (tree id, int local_p)
tree id;
int local_p;
{ {
tree decl; tree decl;
...@@ -4770,8 +4681,7 @@ make_label_decl (id, local_p) ...@@ -4770,8 +4681,7 @@ make_label_decl (id, local_p)
this use is valid. */ this use is valid. */
static void static void
use_label (decl) use_label (tree decl)
tree decl;
{ {
if (named_label_uses == NULL if (named_label_uses == NULL
|| named_label_uses->names_in_scope != current_binding_level->names || named_label_uses->names_in_scope != current_binding_level->names
...@@ -4795,8 +4705,7 @@ use_label (decl) ...@@ -4795,8 +4705,7 @@ use_label (decl)
labels, and complain about them at the end of a function.) */ labels, and complain about them at the end of a function.) */
tree tree
lookup_label (id) lookup_label (tree id)
tree id;
{ {
tree decl; tree decl;
struct named_label_list *ent; struct named_label_list *ent;
...@@ -4835,8 +4744,7 @@ lookup_label (id) ...@@ -4835,8 +4744,7 @@ lookup_label (id)
/* Declare a local label named ID. */ /* Declare a local label named ID. */
tree tree
declare_local_label (id) declare_local_label (tree id)
tree id;
{ {
tree decl; tree decl;
...@@ -4858,8 +4766,7 @@ declare_local_label (id) ...@@ -4858,8 +4766,7 @@ declare_local_label (id)
DECL. Returns 2 if it's also a real problem. */ DECL. Returns 2 if it's also a real problem. */
static int static int
decl_jump_unsafe (decl) decl_jump_unsafe (tree decl)
tree decl;
{ {
if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl)) if (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl))
return 0; return 0;
...@@ -4883,12 +4790,11 @@ decl_jump_unsafe (decl) ...@@ -4883,12 +4790,11 @@ decl_jump_unsafe (decl)
context; FILE and LINE are the source position of the jump or 0. */ context; FILE and LINE are the source position of the jump or 0. */
static void static void
check_previous_goto_1 (decl, level, names, file, line) check_previous_goto_1 (tree decl,
tree decl; struct cp_binding_level* level,
struct cp_binding_level *level; tree names,
tree names; const char* file,
const char *file; int line)
int line;
{ {
int identified = 0; int identified = 0;
int saw_eh = 0; int saw_eh = 0;
...@@ -4949,8 +4855,7 @@ check_previous_goto_1 (decl, level, names, file, line) ...@@ -4949,8 +4855,7 @@ check_previous_goto_1 (decl, level, names, file, line)
} }
static void static void
check_previous_goto (use) check_previous_goto (struct named_label_use_list* use)
struct named_label_use_list *use;
{ {
check_previous_goto_1 (use->label_decl, use->binding_level, check_previous_goto_1 (use->label_decl, use->binding_level,
use->names_in_scope, use->filename_o_goto, use->names_in_scope, use->filename_o_goto,
...@@ -4958,8 +4863,7 @@ check_previous_goto (use) ...@@ -4958,8 +4863,7 @@ check_previous_goto (use)
} }
static void static void
check_switch_goto (level) check_switch_goto (struct cp_binding_level* level)
struct cp_binding_level *level;
{ {
check_previous_goto_1 (NULL_TREE, level, level->names, NULL, 0); check_previous_goto_1 (NULL_TREE, level, level->names, NULL, 0);
} }
...@@ -4968,8 +4872,7 @@ check_switch_goto (level) ...@@ -4968,8 +4872,7 @@ check_switch_goto (level)
are OK. Called by define_label. */ are OK. Called by define_label. */
static void static void
check_previous_gotos (decl) check_previous_gotos (tree decl)
tree decl;
{ {
struct named_label_use_list **usep; struct named_label_use_list **usep;
...@@ -4993,8 +4896,7 @@ check_previous_gotos (decl) ...@@ -4993,8 +4896,7 @@ check_previous_gotos (decl)
finish_goto_stmt. */ finish_goto_stmt. */
void void
check_goto (decl) check_goto (tree decl)
tree decl;
{ {
int identified = 0; int identified = 0;
tree bad; tree bad;
...@@ -5054,10 +4956,7 @@ check_goto (decl) ...@@ -5054,10 +4956,7 @@ check_goto (decl)
Otherwise return 0. */ Otherwise return 0. */
tree tree
define_label (filename, line, name) define_label (const char* filename, int line, tree name)
const char *filename;
int line;
tree name;
{ {
tree decl = lookup_label (name); tree decl = lookup_label (name);
struct named_label_list *ent; struct named_label_list *ent;
...@@ -5123,8 +5022,7 @@ static struct cp_switch *switch_stack; ...@@ -5123,8 +5022,7 @@ static struct cp_switch *switch_stack;
SWITCH_STMT is the switch statement being parsed. */ SWITCH_STMT is the switch statement being parsed. */
void void
push_switch (switch_stmt) push_switch (tree switch_stmt)
tree switch_stmt;
{ {
struct cp_switch *p struct cp_switch *p
= (struct cp_switch *) xmalloc (sizeof (struct cp_switch)); = (struct cp_switch *) xmalloc (sizeof (struct cp_switch));
...@@ -5136,7 +5034,7 @@ push_switch (switch_stmt) ...@@ -5136,7 +5034,7 @@ push_switch (switch_stmt)
} }
void void
pop_switch () pop_switch (void)
{ {
struct cp_switch *cs; struct cp_switch *cs;
...@@ -5150,9 +5048,7 @@ pop_switch () ...@@ -5150,9 +5048,7 @@ pop_switch ()
is a bad place for one. */ is a bad place for one. */
tree tree
finish_case_label (low_value, high_value) finish_case_label (tree low_value, tree high_value)
tree low_value;
tree high_value;
{ {
tree cond, r; tree cond, r;
register struct cp_binding_level *p; register struct cp_binding_level *p;
...@@ -5204,7 +5100,7 @@ finish_case_label (low_value, high_value) ...@@ -5204,7 +5100,7 @@ finish_case_label (low_value, high_value)
store the result back using `storedecls' or you will lose. */ store the result back using `storedecls' or you will lose. */
tree tree
getdecls () getdecls (void)
{ {
return current_binding_level->names; return current_binding_level->names;
} }
...@@ -5212,7 +5108,7 @@ getdecls () ...@@ -5212,7 +5108,7 @@ getdecls ()
/* Return the list of type-tags (for structs, etc) of the current level. */ /* Return the list of type-tags (for structs, etc) of the current level. */
tree tree
gettags () gettags (void)
{ {
return current_binding_level->tags; return current_binding_level->tags;
} }
...@@ -5222,8 +5118,7 @@ gettags () ...@@ -5222,8 +5118,7 @@ gettags ()
after they are modified in the light of any missing parameters. */ after they are modified in the light of any missing parameters. */
static void static void
storedecls (decls) storedecls (tree decls)
tree decls;
{ {
current_binding_level->names = decls; current_binding_level->names = decls;
} }
...@@ -5231,8 +5126,7 @@ storedecls (decls) ...@@ -5231,8 +5126,7 @@ storedecls (decls)
/* Similarly, store the list of tags of the current level. */ /* Similarly, store the list of tags of the current level. */
void void
storetags (tags) storetags (tree tags)
tree tags;
{ {
current_binding_level->tags = tags; current_binding_level->tags = tags;
} }
...@@ -5261,8 +5155,7 @@ storetags (tags) ...@@ -5261,8 +5155,7 @@ storetags (tags)
Return null for this case. */ Return null for this case. */
static tree static tree
follow_tag_typedef (type) follow_tag_typedef (tree type)
tree type;
{ {
tree original; tree original;
...@@ -5290,11 +5183,10 @@ follow_tag_typedef (type) ...@@ -5290,11 +5183,10 @@ follow_tag_typedef (type)
reported. */ reported. */
static tree static tree
lookup_tag (form, name, binding_level, thislevel_only) lookup_tag (enum tree_code form,
enum tree_code form; tree name,
tree name; struct cp_binding_level* binding_level,
struct cp_binding_level *binding_level; int thislevel_only)
int thislevel_only;
{ {
register struct cp_binding_level *level; register struct cp_binding_level *level;
/* Nonzero if, we should look past a template parameter level, even /* Nonzero if, we should look past a template parameter level, even
...@@ -5391,15 +5283,6 @@ lookup_tag (form, name, binding_level, thislevel_only) ...@@ -5391,15 +5283,6 @@ lookup_tag (form, name, binding_level, thislevel_only)
return NULL_TREE; return NULL_TREE;
} }
#if 0
void
set_current_level_tags_transparency (tags_transparent)
int tags_transparent;
{
current_binding_level->tag_transparent = tags_transparent;
}
#endif
/* Given a type, find the tag that was defined for it and return the tag name. /* Given a type, find the tag that was defined for it and return the tag name.
Otherwise return 0. However, the value can never be 0 Otherwise return 0. However, the value can never be 0
in the cases in which this is used. in the cases in which this is used.
...@@ -5408,9 +5291,7 @@ set_current_level_tags_transparency (tags_transparent) ...@@ -5408,9 +5291,7 @@ set_current_level_tags_transparency (tags_transparent)
done when replacing anonymous tags with real tag names. */ done when replacing anonymous tags with real tag names. */
static tree static tree
lookup_tag_reverse (type, name) lookup_tag_reverse (tree type, tree name)
tree type;
tree name;
{ {
register struct cp_binding_level *level; register struct cp_binding_level *level;
...@@ -5433,8 +5314,7 @@ lookup_tag_reverse (type, name) ...@@ -5433,8 +5314,7 @@ lookup_tag_reverse (type, name)
/* Look up NAME in the NAMESPACE. */ /* Look up NAME in the NAMESPACE. */
tree tree
lookup_namespace_name (namespace, name) lookup_namespace_name (tree namespace, tree name)
tree namespace, name;
{ {
tree val; tree val;
tree template_id = NULL_TREE; tree template_id = NULL_TREE;
...@@ -5513,8 +5393,7 @@ lookup_namespace_name (namespace, name) ...@@ -5513,8 +5393,7 @@ lookup_namespace_name (namespace, name)
/* Hash a TYPENAME_TYPE. K is really of type `tree'. */ /* Hash a TYPENAME_TYPE. K is really of type `tree'. */
static hashval_t static hashval_t
typename_hash (k) typename_hash (const void* k)
const void * k;
{ {
hashval_t hash; hashval_t hash;
tree t = (tree) k; tree t = (tree) k;
...@@ -5528,9 +5407,7 @@ typename_hash (k) ...@@ -5528,9 +5407,7 @@ typename_hash (k)
/* Compare two TYPENAME_TYPEs. K1 and K2 are really of type `tree'. */ /* Compare two TYPENAME_TYPEs. K1 and K2 are really of type `tree'. */
static int static int
typename_compare (k1, k2) typename_compare (const void * k1, const void * k2)
const void * k1;
const void * k2;
{ {
tree t1; tree t1;
tree t2; tree t2;
...@@ -5561,11 +5438,7 @@ typename_compare (k1, k2) ...@@ -5561,11 +5438,7 @@ typename_compare (k1, k2)
static GTY ((param_is (union tree_node))) htab_t typename_htab; static GTY ((param_is (union tree_node))) htab_t typename_htab;
tree tree
build_typename_type (context, name, fullname, base_type) build_typename_type (tree context, tree name, tree fullname, tree base_type)
tree context;
tree name;
tree fullname;
tree base_type;
{ {
tree t; tree t;
tree d; tree d;
...@@ -5608,9 +5481,7 @@ build_typename_type (context, name, fullname, base_type) ...@@ -5608,9 +5481,7 @@ build_typename_type (context, name, fullname, base_type)
complain about errors, otherwise be quiet. */ complain about errors, otherwise be quiet. */
tree tree
make_typename_type (context, name, complain) make_typename_type (tree context, tree name, tsubst_flags_t complain)
tree context, name;
tsubst_flags_t complain;
{ {
tree fullname; tree fullname;
...@@ -5751,9 +5622,7 @@ make_typename_type (context, name, complain) ...@@ -5751,9 +5622,7 @@ make_typename_type (context, name, complain)
that occur. */ that occur. */
tree tree
make_unbound_class_template (context, name, complain) make_unbound_class_template (tree context, tree name, tsubst_flags_t complain)
tree context, name;
tsubst_flags_t complain;
{ {
tree t; tree t;
tree d; tree d;
...@@ -5809,9 +5678,7 @@ make_unbound_class_template (context, name, complain) ...@@ -5809,9 +5678,7 @@ make_unbound_class_template (context, name, complain)
/* Select the right _DECL from multiple choices. */ /* Select the right _DECL from multiple choices. */
static tree static tree
select_decl (binding, flags) select_decl (tree binding, int flags)
tree binding;
int flags;
{ {
tree val; tree val;
val = BINDING_VALUE (binding); val = BINDING_VALUE (binding);
...@@ -5844,10 +5711,7 @@ select_decl (binding, flags) ...@@ -5844,10 +5711,7 @@ select_decl (binding, flags)
of the namespaces we've considered in it. */ of the namespaces we've considered in it. */
tree tree
unqualified_namespace_lookup (name, flags, spacesp) unqualified_namespace_lookup (tree name, int flags, tree* spacesp)
tree name;
int flags;
tree *spacesp;
{ {
tree b = make_node (CPLUS_BINDING); tree b = make_node (CPLUS_BINDING);
tree initial = current_decl_namespace (); tree initial = current_decl_namespace ();
...@@ -5913,8 +5777,7 @@ unqualified_namespace_lookup (name, flags, spacesp) ...@@ -5913,8 +5777,7 @@ unqualified_namespace_lookup (name, flags, spacesp)
/* Combine prefer_type and namespaces_only into flags. */ /* Combine prefer_type and namespaces_only into flags. */
static int static int
lookup_flags (prefer_type, namespaces_only) lookup_flags (int prefer_type, int namespaces_only)
int prefer_type, namespaces_only;
{ {
if (namespaces_only) if (namespaces_only)
return LOOKUP_PREFER_NAMESPACES; return LOOKUP_PREFER_NAMESPACES;
...@@ -5929,9 +5792,7 @@ lookup_flags (prefer_type, namespaces_only) ...@@ -5929,9 +5792,7 @@ lookup_flags (prefer_type, namespaces_only)
ignore it or not. Subroutine of lookup_name_real. */ ignore it or not. Subroutine of lookup_name_real. */
static tree static tree
qualify_lookup (val, flags) qualify_lookup (tree val, int flags)
tree val;
int flags;
{ {
if (val == NULL_TREE) if (val == NULL_TREE)
return val; return val;
...@@ -5948,9 +5809,7 @@ qualify_lookup (val, flags) ...@@ -5948,9 +5809,7 @@ qualify_lookup (val, flags)
that. */ that. */
static void static void
warn_about_implicit_typename_lookup (typename, binding) warn_about_implicit_typename_lookup (tree typename, tree binding)
tree typename;
tree binding;
{ {
tree subtype = TREE_TYPE (TREE_TYPE (typename)); tree subtype = TREE_TYPE (TREE_TYPE (typename));
tree name = DECL_NAME (typename); tree name = DECL_NAME (typename);
...@@ -6168,24 +6027,19 @@ lookup_name_real (tree name, ...@@ -6168,24 +6027,19 @@ lookup_name_real (tree name,
} }
tree tree
lookup_name_nonclass (name) lookup_name_nonclass (tree name)
tree name;
{ {
return lookup_name_real (name, 0, 1, 0, LOOKUP_COMPLAIN); return lookup_name_real (name, 0, 1, 0, LOOKUP_COMPLAIN);
} }
tree tree
lookup_function_nonclass (name, args) lookup_function_nonclass (tree name, tree args)
tree name;
tree args;
{ {
return lookup_arg_dependent (name, lookup_name_nonclass (name), args); return lookup_arg_dependent (name, lookup_name_nonclass (name), args);
} }
tree tree
lookup_name (name, prefer_type) lookup_name (tree name, int prefer_type)
tree name;
int prefer_type;
{ {
return lookup_name_real (name, prefer_type, 0, 0, LOOKUP_COMPLAIN); return lookup_name_real (name, prefer_type, 0, 0, LOOKUP_COMPLAIN);
} }
...@@ -6194,8 +6048,7 @@ lookup_name (name, prefer_type) ...@@ -6194,8 +6048,7 @@ lookup_name (name, prefer_type)
binding level. */ binding level. */
tree tree
lookup_name_current_level (name) lookup_name_current_level (tree name)
tree name;
{ {
struct cp_binding_level *b; struct cp_binding_level *b;
tree t = NULL_TREE; tree t = NULL_TREE;
...@@ -6233,8 +6086,7 @@ lookup_name_current_level (name) ...@@ -6233,8 +6086,7 @@ lookup_name_current_level (name)
/* Like lookup_name_current_level, but for types. */ /* Like lookup_name_current_level, but for types. */
tree tree
lookup_type_current_level (name) lookup_type_current_level (tree name)
tree name;
{ {
register tree t = NULL_TREE; register tree t = NULL_TREE;
...@@ -6265,10 +6117,9 @@ lookup_type_current_level (name) ...@@ -6265,10 +6117,9 @@ lookup_type_current_level (name)
up the builtin type. TYPE is the _TYPE node for the builtin type. */ up the builtin type. TYPE is the _TYPE node for the builtin type. */
void void
record_builtin_type (rid_index, name, type) record_builtin_type (enum rid rid_index,
enum rid rid_index; const char* name,
const char *name; tree type)
tree type;
{ {
tree rname = NULL_TREE, tname = NULL_TREE; tree rname = NULL_TREE, tname = NULL_TREE;
tree tdecl = NULL_TREE; tree tdecl = NULL_TREE;
...@@ -6309,9 +6160,7 @@ record_builtin_type (rid_index, name, type) ...@@ -6309,9 +6160,7 @@ record_builtin_type (rid_index, name, type)
* otherwise it is the negative of the size of one of the other types. */ * otherwise it is the negative of the size of one of the other types. */
static tree static tree
record_builtin_java_type (name, size) record_builtin_java_type (const char* name, int size)
const char *name;
int size;
{ {
tree type, decl; tree type, decl;
if (size > 0) if (size > 0)
...@@ -6342,9 +6191,7 @@ record_builtin_java_type (name, size) ...@@ -6342,9 +6191,7 @@ record_builtin_java_type (name, size)
/* Push a type into the namespace so that the back-ends ignore it. */ /* Push a type into the namespace so that the back-ends ignore it. */
static void static void
record_unknown_type (type, name) record_unknown_type (tree type, const char* name)
tree type;
const char *name;
{ {
tree decl = pushdecl (build_decl (TYPE_DECL, get_identifier (name), type)); tree decl = pushdecl (build_decl (TYPE_DECL, get_identifier (name), type));
/* Make sure the "unknown type" typedecl gets ignored for debug info. */ /* Make sure the "unknown type" typedecl gets ignored for debug info. */
...@@ -6372,7 +6219,7 @@ typedef struct predefined_identifier ...@@ -6372,7 +6219,7 @@ typedef struct predefined_identifier
/* Create all the predefined identifiers. */ /* Create all the predefined identifiers. */
static void static void
initialize_predefined_identifiers () initialize_predefined_identifiers (void)
{ {
const predefined_identifier *pid; const predefined_identifier *pid;
...@@ -6413,7 +6260,7 @@ initialize_predefined_identifiers () ...@@ -6413,7 +6260,7 @@ initialize_predefined_identifiers ()
Make definitions for built-in primitive functions. */ Make definitions for built-in primitive functions. */
void void
cxx_init_decl_processing () cxx_init_decl_processing (void)
{ {
tree void_ftype; tree void_ftype;
tree void_ftype_ptr; tree void_ftype_ptr;
...@@ -6621,8 +6468,7 @@ cxx_init_decl_processing () ...@@ -6621,8 +6468,7 @@ cxx_init_decl_processing ()
ERROR_MARK node which should be replaced later. */ ERROR_MARK node which should be replaced later. */
tree tree
cp_fname_init (name) cp_fname_init (const char* name)
const char *name;
{ {
tree domain = NULL_TREE; tree domain = NULL_TREE;
tree type; tree type;
...@@ -6656,9 +6502,7 @@ cp_fname_init (name) ...@@ -6656,9 +6502,7 @@ cp_fname_init (name)
lazily at the point of first use, so we musn't push the decl now. */ lazily at the point of first use, so we musn't push the decl now. */
static tree static tree
cp_make_fname_decl (id, type_dep) cp_make_fname_decl (tree id, int type_dep)
tree id;
int type_dep;
{ {
const char *const name = (type_dep && processing_template_decl const char *const name = (type_dep && processing_template_decl
? NULL : fname_as_string (type_dep)); ? NULL : fname_as_string (type_dep));
...@@ -6702,14 +6546,13 @@ cp_make_fname_decl (id, type_dep) ...@@ -6702,14 +6546,13 @@ cp_make_fname_decl (id, type_dep)
list. */ list. */
static tree static tree
builtin_function_1 (name, type, context, code, class, libname, attrs) builtin_function_1 (const char* name,
const char *name; tree type,
tree type; tree context,
tree context; int code,
int code; enum built_in_class class,
enum built_in_class class; const char* libname,
const char *libname; tree attrs)
tree attrs;
{ {
tree decl = build_library_fn_1 (get_identifier (name), ERROR_MARK, type); tree decl = build_library_fn_1 (get_identifier (name), ERROR_MARK, type);
DECL_BUILT_IN_CLASS (decl) = class; DECL_BUILT_IN_CLASS (decl) = class;
...@@ -6756,13 +6599,12 @@ builtin_function_1 (name, type, context, code, class, libname, attrs) ...@@ -6756,13 +6599,12 @@ builtin_function_1 (name, type, context, code, class, libname, attrs)
list. */ list. */
tree tree
builtin_function (name, type, code, class, libname, attrs) builtin_function (const char* name,
const char *name; tree type,
tree type; int code,
int code; enum built_in_class class,
enum built_in_class class; const char* libname,
const char *libname; tree attrs)
tree attrs;
{ {
/* All builtins that don't begin with an '_' should additionally /* All builtins that don't begin with an '_' should additionally
go in the 'std' namespace. */ go in the 'std' namespace. */
...@@ -6781,10 +6623,7 @@ builtin_function (name, type, code, class, libname, attrs) ...@@ -6781,10 +6623,7 @@ builtin_function (name, type, code, class, libname, attrs)
function. Not called directly. */ function. Not called directly. */
static tree static tree
build_library_fn_1 (name, operator_code, type) build_library_fn_1 (tree name, enum tree_code operator_code, tree type)
tree name;
enum tree_code operator_code;
tree type;
{ {
tree fn = build_lang_decl (FUNCTION_DECL, name, type); tree fn = build_lang_decl (FUNCTION_DECL, name, type);
DECL_EXTERNAL (fn) = 1; DECL_EXTERNAL (fn) = 1;
...@@ -6801,9 +6640,7 @@ build_library_fn_1 (name, operator_code, type) ...@@ -6801,9 +6640,7 @@ build_library_fn_1 (name, operator_code, type)
callers should unset TREE_NOTHROW. */ callers should unset TREE_NOTHROW. */
tree tree
build_library_fn (name, type) build_library_fn (tree name, tree type)
tree name;
tree type;
{ {
return build_library_fn_1 (name, ERROR_MARK, type); return build_library_fn_1 (name, ERROR_MARK, type);
} }
...@@ -6811,10 +6648,7 @@ build_library_fn (name, type) ...@@ -6811,10 +6648,7 @@ build_library_fn (name, type)
/* Returns the _DECL for a library function with C++ linkage. */ /* Returns the _DECL for a library function with C++ linkage. */
static tree static tree
build_cp_library_fn (name, operator_code, type) build_cp_library_fn (tree name, enum tree_code operator_code, tree type)
tree name;
enum tree_code operator_code;
tree type;
{ {
tree fn = build_library_fn_1 (name, operator_code, type); tree fn = build_library_fn_1 (name, operator_code, type);
TREE_NOTHROW (fn) = TYPE_NOTHROW_P (type); TREE_NOTHROW (fn) = TYPE_NOTHROW_P (type);
...@@ -6828,9 +6662,7 @@ build_cp_library_fn (name, operator_code, type) ...@@ -6828,9 +6662,7 @@ build_cp_library_fn (name, operator_code, type)
IDENTIFIER_NODE. */ IDENTIFIER_NODE. */
tree tree
build_library_fn_ptr (name, type) build_library_fn_ptr (const char* name, tree type)
const char *name;
tree type;
{ {
return build_library_fn (get_identifier (name), type); return build_library_fn (get_identifier (name), type);
} }
...@@ -6839,9 +6671,7 @@ build_library_fn_ptr (name, type) ...@@ -6839,9 +6671,7 @@ build_library_fn_ptr (name, type)
IDENTIFIER_NODE. */ IDENTIFIER_NODE. */
tree tree
build_cp_library_fn_ptr (name, type) build_cp_library_fn_ptr (const char* name, tree type)
const char *name;
tree type;
{ {
return build_cp_library_fn (get_identifier (name), ERROR_MARK, type); return build_cp_library_fn (get_identifier (name), ERROR_MARK, type);
} }
...@@ -6850,8 +6680,7 @@ build_cp_library_fn_ptr (name, type) ...@@ -6850,8 +6680,7 @@ build_cp_library_fn_ptr (name, type)
be able to find it via IDENTIFIER_GLOBAL_VALUE. */ be able to find it via IDENTIFIER_GLOBAL_VALUE. */
tree tree
push_library_fn (name, type) push_library_fn (tree name, tree type)
tree name, type;
{ {
tree fn = build_library_fn (name, type); tree fn = build_library_fn (name, type);
pushdecl_top_level (fn); pushdecl_top_level (fn);
...@@ -6862,9 +6691,7 @@ push_library_fn (name, type) ...@@ -6862,9 +6691,7 @@ push_library_fn (name, type)
will be found by normal lookup. */ will be found by normal lookup. */
static tree static tree
push_cp_library_fn (operator_code, type) push_cp_library_fn (enum tree_code operator_code, tree type)
enum tree_code operator_code;
tree type;
{ {
tree fn = build_cp_library_fn (ansi_opname (operator_code), tree fn = build_cp_library_fn (ansi_opname (operator_code),
operator_code, operator_code,
...@@ -6877,8 +6704,7 @@ push_cp_library_fn (operator_code, type) ...@@ -6877,8 +6704,7 @@ push_cp_library_fn (operator_code, type)
a FUNCTION_TYPE. */ a FUNCTION_TYPE. */
tree tree
push_void_library_fn (name, parmtypes) push_void_library_fn (tree name, tree parmtypes)
tree name, parmtypes;
{ {
tree type = build_function_type (void_type_node, parmtypes); tree type = build_function_type (void_type_node, parmtypes);
return push_library_fn (name, type); return push_library_fn (name, type);
...@@ -6888,8 +6714,7 @@ push_void_library_fn (name, parmtypes) ...@@ -6888,8 +6714,7 @@ push_void_library_fn (name, parmtypes)
and does not return. Used for __throw_foo and the like. */ and does not return. Used for __throw_foo and the like. */
tree tree
push_throw_library_fn (name, type) push_throw_library_fn (tree name, tree type)
tree name, type;
{ {
tree fn = push_library_fn (name, type); tree fn = push_library_fn (name, type);
TREE_THIS_VOLATILE (fn) = 1; TREE_THIS_VOLATILE (fn) = 1;
...@@ -6901,8 +6726,7 @@ push_throw_library_fn (name, type) ...@@ -6901,8 +6726,7 @@ push_throw_library_fn (name, type)
attributes. */ attributes. */
void void
cxx_insert_default_attributes (decl) cxx_insert_default_attributes (tree decl)
tree decl;
{ {
if (!DECL_EXTERN_C_FUNCTION_P (decl)) if (!DECL_EXTERN_C_FUNCTION_P (decl))
return; return;
...@@ -6922,8 +6746,7 @@ cxx_insert_default_attributes (decl) ...@@ -6922,8 +6746,7 @@ cxx_insert_default_attributes (decl)
union type.) */ union type.) */
void void
fixup_anonymous_aggr (t) fixup_anonymous_aggr (tree t)
tree t;
{ {
tree *q; tree *q;
...@@ -6984,8 +6807,7 @@ fixup_anonymous_aggr (t) ...@@ -6984,8 +6807,7 @@ fixup_anonymous_aggr (t)
Returns the type declared; or NULL_TREE if none. */ Returns the type declared; or NULL_TREE if none. */
tree tree
check_tag_decl (declspecs) check_tag_decl (tree declspecs)
tree declspecs;
{ {
int found_type = 0; int found_type = 0;
int saw_friend = 0; int saw_friend = 0;
...@@ -7121,8 +6943,7 @@ check_tag_decl (declspecs) ...@@ -7121,8 +6943,7 @@ check_tag_decl (declspecs)
Returns the TYPE declared -- or NULL_TREE if none. */ Returns the TYPE declared -- or NULL_TREE if none. */
tree tree
shadow_tag (declspecs) shadow_tag (tree declspecs)
tree declspecs;
{ {
tree t = check_tag_decl (declspecs); tree t = check_tag_decl (declspecs);
...@@ -7154,8 +6975,7 @@ shadow_tag (declspecs) ...@@ -7154,8 +6975,7 @@ shadow_tag (declspecs)
/* Decode a "typename", such as "int **", returning a ..._TYPE node. */ /* Decode a "typename", such as "int **", returning a ..._TYPE node. */
tree tree
groktypename (typename) groktypename (tree typename)
tree typename;
{ {
tree specs, attrs; tree specs, attrs;
tree type; tree type;
...@@ -7185,20 +7005,16 @@ groktypename (typename) ...@@ -7185,20 +7005,16 @@ groktypename (typename)
grokfield and not through here. */ grokfield and not through here. */
tree tree
start_decl (declarator, declspecs, initialized, attributes, prefix_attributes) start_decl (tree declarator,
tree declarator, declspecs; tree declspecs,
int initialized; int initialized,
tree attributes, prefix_attributes; tree attributes,
tree prefix_attributes)
{ {
tree decl; tree decl;
register tree type, tem; register tree type, tem;
tree context; tree context;
#if 0
/* See code below that used this. */
int init_written = initialized;
#endif
/* This should only be done once on the top most decl. */ /* This should only be done once on the top most decl. */
if (have_extern_spec) if (have_extern_spec)
{ {
...@@ -7371,8 +7187,7 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes) ...@@ -7371,8 +7187,7 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
} }
void void
start_decl_1 (decl) start_decl_1 (tree decl)
tree decl;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
int initialized = (DECL_INITIAL (decl) != NULL_TREE); int initialized = (DECL_INITIAL (decl) != NULL_TREE);
...@@ -7446,8 +7261,7 @@ start_decl_1 (decl) ...@@ -7446,8 +7261,7 @@ start_decl_1 (decl)
Quotes on semantics can be found in ARM 8.4.3. */ Quotes on semantics can be found in ARM 8.4.3. */
static tree static tree
grok_reference_init (decl, type, init) grok_reference_init (tree decl, tree type, tree init)
tree decl, type, init;
{ {
tree tmp; tree tmp;
...@@ -7512,9 +7326,7 @@ grok_reference_init (decl, type, init) ...@@ -7512,9 +7326,7 @@ grok_reference_init (decl, type, init)
situation we're in, update DECL accordingly. */ situation we're in, update DECL accordingly. */
static void static void
maybe_deduce_size_from_array_init (decl, init) maybe_deduce_size_from_array_init (tree decl, tree init)
tree decl;
tree init;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
...@@ -7556,8 +7368,7 @@ maybe_deduce_size_from_array_init (decl, init) ...@@ -7556,8 +7368,7 @@ maybe_deduce_size_from_array_init (decl, init)
any appropriate error messages regarding the layout. */ any appropriate error messages regarding the layout. */
static void static void
layout_var_decl (decl) layout_var_decl (tree decl)
tree decl;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
#if 0 #if 0
...@@ -7621,8 +7432,7 @@ layout_var_decl (decl) ...@@ -7621,8 +7432,7 @@ layout_var_decl (decl)
instance of the variable at link-time. */ instance of the variable at link-time. */
static void static void
maybe_commonize_var (decl) maybe_commonize_var (tree decl)
tree decl;
{ {
/* Static data in a function with comdat linkage also has comdat /* Static data in a function with comdat linkage also has comdat
linkage. */ linkage. */
...@@ -7673,8 +7483,7 @@ maybe_commonize_var (decl) ...@@ -7673,8 +7483,7 @@ maybe_commonize_var (decl)
/* Issue an error message if DECL is an uninitialized const variable. */ /* Issue an error message if DECL is an uninitialized const variable. */
static void static void
check_for_uninitialized_const_var (decl) check_for_uninitialized_const_var (tree decl)
tree decl;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
...@@ -8054,10 +7863,7 @@ check_initializer (tree decl, tree init, int flags) ...@@ -8054,10 +7863,7 @@ check_initializer (tree decl, tree init, int flags)
/* If DECL is not a local variable, give it RTL. */ /* If DECL is not a local variable, give it RTL. */
static void static void
make_rtl_for_nonlocal_decl (decl, init, asmspec) make_rtl_for_nonlocal_decl (tree decl, tree init, const char* asmspec)
tree decl;
tree init;
const char *asmspec;
{ {
int toplev = toplevel_bindings_p (); int toplev = toplevel_bindings_p ();
int defer_p; int defer_p;
...@@ -8142,8 +7948,7 @@ make_rtl_for_nonlocal_decl (decl, init, asmspec) ...@@ -8142,8 +7948,7 @@ make_rtl_for_nonlocal_decl (decl, init, asmspec)
declaration into the surrounding scope. */ declaration into the surrounding scope. */
void void
maybe_inject_for_scope_var (decl) maybe_inject_for_scope_var (tree decl)
tree decl;
{ {
if (!DECL_NAME (decl)) if (!DECL_NAME (decl))
return; return;
...@@ -8186,9 +7991,7 @@ maybe_inject_for_scope_var (decl) ...@@ -8186,9 +7991,7 @@ maybe_inject_for_scope_var (decl)
/* Generate code to initialize DECL (a local variable). */ /* Generate code to initialize DECL (a local variable). */
static void static void
initialize_local_var (decl, init) initialize_local_var (tree decl, tree init)
tree decl;
tree init;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
...@@ -8265,10 +8068,7 @@ initialize_local_var (decl, init) ...@@ -8265,10 +8068,7 @@ initialize_local_var (decl, init)
if the (init) syntax was used. */ if the (init) syntax was used. */
void void
cp_finish_decl (decl, init, asmspec_tree, flags) cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags)
tree decl, init;
tree asmspec_tree;
int flags;
{ {
register tree type; register tree type;
tree ttype = NULL_TREE; tree ttype = NULL_TREE;
...@@ -8525,9 +8325,7 @@ cp_finish_decl (decl, init, asmspec_tree, flags) ...@@ -8525,9 +8325,7 @@ cp_finish_decl (decl, init, asmspec_tree, flags)
/* This is here for a midend callback from c-common.c */ /* This is here for a midend callback from c-common.c */
void void
finish_decl (decl, init, asmspec_tree) finish_decl (tree decl, tree init, tree asmspec_tree)
tree decl, init;
tree asmspec_tree;
{ {
cp_finish_decl (decl, init, asmspec_tree, 0); cp_finish_decl (decl, init, asmspec_tree, 0);
} }
...@@ -8540,9 +8338,7 @@ finish_decl (decl, init, asmspec_tree) ...@@ -8540,9 +8338,7 @@ finish_decl (decl, init, asmspec_tree)
variables. */ variables. */
tree tree
declare_global_var (name, type) declare_global_var (tree name, tree type)
tree name;
tree type;
{ {
tree decl; tree decl;
...@@ -8563,7 +8359,7 @@ declare_global_var (name, type) ...@@ -8563,7 +8359,7 @@ declare_global_var (name, type)
`__cxa_atexit' function specified in the IA64 C++ ABI. */ `__cxa_atexit' function specified in the IA64 C++ ABI. */
static tree static tree
get_atexit_node () get_atexit_node (void)
{ {
tree atexit_fndecl; tree atexit_fndecl;
tree arg_types; tree arg_types;
...@@ -8626,7 +8422,7 @@ get_atexit_node () ...@@ -8626,7 +8422,7 @@ get_atexit_node ()
/* Returns the __dso_handle VAR_DECL. */ /* Returns the __dso_handle VAR_DECL. */
static tree static tree
get_dso_handle_node () get_dso_handle_node (void)
{ {
if (dso_handle_node) if (dso_handle_node)
return dso_handle_node; return dso_handle_node;
...@@ -8642,7 +8438,7 @@ get_dso_handle_node () ...@@ -8642,7 +8438,7 @@ get_dso_handle_node ()
to destroy some particular variable. */ to destroy some particular variable. */
static tree static tree
start_cleanup_fn () start_cleanup_fn (void)
{ {
static int counter = 0; static int counter = 0;
int old_interface_only = interface_only; int old_interface_only = interface_only;
...@@ -8708,7 +8504,7 @@ start_cleanup_fn () ...@@ -8708,7 +8504,7 @@ start_cleanup_fn ()
/* Finish the cleanup function begun by start_cleanup_fn. */ /* Finish the cleanup function begun by start_cleanup_fn. */
static void static void
end_cleanup_fn () end_cleanup_fn (void)
{ {
expand_body (finish_function (0)); expand_body (finish_function (0));
...@@ -8719,8 +8515,7 @@ end_cleanup_fn () ...@@ -8719,8 +8515,7 @@ end_cleanup_fn ()
static storage duration. */ static storage duration. */
void void
register_dtor_fn (decl) register_dtor_fn (tree decl)
tree decl;
{ {
tree cleanup; tree cleanup;
tree compound_stmt; tree compound_stmt;
...@@ -8775,9 +8570,7 @@ register_dtor_fn (decl) ...@@ -8775,9 +8570,7 @@ register_dtor_fn (decl)
and destruction of DECL. */ and destruction of DECL. */
static void static void
expand_static_init (decl, init) expand_static_init (tree decl, tree init)
tree decl;
tree init;
{ {
tree oldstatic; tree oldstatic;
...@@ -8877,9 +8670,7 @@ expand_static_init (decl, init) ...@@ -8877,9 +8670,7 @@ expand_static_init (decl, init)
/* Finish the declaration of a catch-parameter. */ /* Finish the declaration of a catch-parameter. */
tree tree
start_handler_parms (declspecs, declarator) start_handler_parms (tree declspecs, tree declarator)
tree declspecs;
tree declarator;
{ {
tree decl; tree decl;
if (declspecs) if (declspecs)
...@@ -8901,9 +8692,7 @@ start_handler_parms (declspecs, declarator) ...@@ -8901,9 +8692,7 @@ start_handler_parms (declspecs, declarator)
2 if there was no information (in which case assume 0 if DO_DEFAULT). */ 2 if there was no information (in which case assume 0 if DO_DEFAULT). */
int int
complete_array_type (type, initial_value, do_default) complete_array_type (tree type, tree initial_value, int do_default)
tree type, initial_value;
int do_default;
{ {
register tree maxindex = NULL_TREE; register tree maxindex = NULL_TREE;
int value = 0; int value = 0;
...@@ -8998,9 +8787,7 @@ complete_array_type (type, initial_value, do_default) ...@@ -8998,9 +8787,7 @@ complete_array_type (type, initial_value, do_default)
message to print in that case. Otherwise, quietly return 1. */ message to print in that case. Otherwise, quietly return 1. */
static int static int
member_function_or_else (ctype, cur_type, flags) member_function_or_else (tree ctype, tree cur_type, enum overload_flags flags)
tree ctype, cur_type;
enum overload_flags flags;
{ {
if (ctype && ctype != cur_type) if (ctype && ctype != cur_type)
{ {
...@@ -9021,10 +8808,13 @@ member_function_or_else (ctype, cur_type, flags) ...@@ -9021,10 +8808,13 @@ member_function_or_else (ctype, cur_type, flags)
This is for ARM $7.1.2. */ This is for ARM $7.1.2. */
static void static void
bad_specifiers (object, type, virtualp, quals, inlinep, friendp, raises) bad_specifiers (tree object,
tree object; const char* type,
const char *type; int virtualp,
int virtualp, quals, friendp, raises, inlinep; int quals,
int friendp,
int raises,
int inlinep)
{ {
if (virtualp) if (virtualp)
error ("`%D' declared as a `virtual' %s", object, type); error ("`%D' declared as a `virtual' %s", object, type);
...@@ -9059,17 +8849,21 @@ bad_specifiers (object, type, virtualp, quals, inlinep, friendp, raises) ...@@ -9059,17 +8849,21 @@ bad_specifiers (object, type, virtualp, quals, inlinep, friendp, raises)
applicable error messages. */ applicable error messages. */
static tree static tree
grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals, grokfndecl (tree ctype,
raises, check, friendp, publicp, inlinep, funcdef_flag, tree type,
template_count, in_namespace) tree declarator,
tree ctype, type; tree orig_declarator,
tree declarator; int virtualp,
tree orig_declarator; enum overload_flags flags,
int virtualp; tree quals,
enum overload_flags flags; tree raises,
tree quals, raises; int check,
int check, friendp, publicp, inlinep, funcdef_flag, template_count; int friendp,
tree in_namespace; int publicp,
int inlinep,
int funcdef_flag,
int template_count,
tree in_namespace)
{ {
tree decl; tree decl;
int staticp = ctype && TREE_CODE (type) == FUNCTION_TYPE; int staticp = ctype && TREE_CODE (type) == FUNCTION_TYPE;
...@@ -9347,13 +9141,12 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals, ...@@ -9347,13 +9141,12 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
the innermost enclosings scope. */ the innermost enclosings scope. */
static tree static tree
grokvardecl (type, name, specbits_in, initialized, constp, scope) grokvardecl (tree type,
tree type; tree name,
tree name; RID_BIT_TYPE * specbits_in,
RID_BIT_TYPE *specbits_in; int initialized,
int initialized; int constp,
int constp; tree scope)
tree scope;
{ {
tree decl; tree decl;
RID_BIT_TYPE specbits; RID_BIT_TYPE specbits;
...@@ -9467,8 +9260,7 @@ grokvardecl (type, name, specbits_in, initialized, constp, scope) ...@@ -9467,8 +9260,7 @@ grokvardecl (type, name, specbits_in, initialized, constp, scope)
TYPE, which is a POINTER_TYPE to a METHOD_TYPE. */ TYPE, which is a POINTER_TYPE to a METHOD_TYPE. */
tree tree
build_ptrmemfunc_type (type) build_ptrmemfunc_type (tree type)
tree type;
{ {
tree field, fields; tree field, fields;
tree t; tree t;
...@@ -9545,9 +9337,7 @@ build_ptrmem_type (tree class_type, tree member_type) ...@@ -9545,9 +9337,7 @@ build_ptrmem_type (tree class_type, tree member_type)
otherwise. */ otherwise. */
int int
check_static_variable_definition (decl, type) check_static_variable_definition (tree decl, tree type)
tree decl;
tree type;
{ {
/* Motion 10 at San Diego: If a static const integral data member is /* Motion 10 at San Diego: If a static const integral data member is
initialized with an integral constant expression, the initializer initialized with an integral constant expression, the initializer
...@@ -9579,9 +9369,7 @@ check_static_variable_definition (decl, type) ...@@ -9579,9 +9369,7 @@ check_static_variable_definition (decl, type)
name of the thing being declared. */ name of the thing being declared. */
tree tree
compute_array_index_type (name, size) compute_array_index_type (tree name, tree size)
tree name;
tree size;
{ {
tree itype; tree itype;
...@@ -9709,8 +9497,7 @@ compute_array_index_type (name, size) ...@@ -9709,8 +9497,7 @@ compute_array_index_type (name, size)
unqualified name, NULL_TREE is returned. */ unqualified name, NULL_TREE is returned. */
tree tree
get_scope_of_declarator (declarator) get_scope_of_declarator (tree declarator)
tree declarator;
{ {
if (!declarator) if (!declarator)
return NULL_TREE; return NULL_TREE;
...@@ -9751,10 +9538,7 @@ get_scope_of_declarator (declarator) ...@@ -9751,10 +9538,7 @@ get_scope_of_declarator (declarator)
with this type. */ with this type. */
static tree static tree
create_array_type_for_decl (name, type, size) create_array_type_for_decl (tree name, tree type, tree size)
tree name;
tree type;
tree size;
{ {
tree itype = NULL_TREE; tree itype = NULL_TREE;
const char* error_msg; const char* error_msg;
...@@ -9834,10 +9618,9 @@ create_array_type_for_decl (name, type, size) ...@@ -9834,10 +9618,9 @@ create_array_type_for_decl (name, type, size)
special functions. */ special functions. */
static tree static tree
check_special_function_return_type (sfk, type, optype) check_special_function_return_type (special_function_kind sfk,
special_function_kind sfk; tree type,
tree type; tree optype)
tree optype;
{ {
switch (sfk) switch (sfk)
{ {
...@@ -9910,12 +9693,11 @@ check_special_function_return_type (sfk, type, optype) ...@@ -9910,12 +9693,11 @@ check_special_function_return_type (sfk, type, optype)
should not be `S'. */ should not be `S'. */
tree tree
grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) grokdeclarator (tree declarator,
tree declspecs; tree declspecs,
tree declarator; enum decl_context decl_context,
enum decl_context decl_context; int initialized,
int initialized; tree* attrlist)
tree *attrlist;
{ {
RID_BIT_TYPE specbits; RID_BIT_TYPE specbits;
int nclasses = 0; int nclasses = 0;
...@@ -12129,8 +11911,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) ...@@ -12129,8 +11911,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
is a parmlist. Otherwise, it is an exprlist. */ is a parmlist. Otherwise, it is an exprlist. */
int int
parmlist_is_exprlist (exprs) parmlist_is_exprlist (tree exprs)
tree exprs;
{ {
if (exprs == NULL_TREE || TREE_PARMLIST (exprs)) if (exprs == NULL_TREE || TREE_PARMLIST (exprs))
return 0; return 0;
...@@ -12155,8 +11936,7 @@ parmlist_is_exprlist (exprs) ...@@ -12155,8 +11936,7 @@ parmlist_is_exprlist (exprs)
function definition. */ function definition. */
static void static void
require_complete_types_for_parms (parms) require_complete_types_for_parms (tree parms)
tree parms;
{ {
for (; parms; parms = TREE_CHAIN (parms)) for (; parms; parms = TREE_CHAIN (parms))
{ {
...@@ -12173,8 +11953,7 @@ require_complete_types_for_parms (parms) ...@@ -12173,8 +11953,7 @@ require_complete_types_for_parms (parms)
/* Returns nonzero if T is a local variable. */ /* Returns nonzero if T is a local variable. */
int int
local_variable_p (t) local_variable_p (tree t)
tree t;
{ {
if ((TREE_CODE (t) == VAR_DECL if ((TREE_CODE (t) == VAR_DECL
/* A VAR_DECL with a context that is a _TYPE is a static data /* A VAR_DECL with a context that is a _TYPE is a static data
...@@ -12193,8 +11972,7 @@ local_variable_p (t) ...@@ -12193,8 +11972,7 @@ local_variable_p (t)
containing them is duplicated.) */ containing them is duplicated.) */
int int
nonstatic_local_decl_p (t) nonstatic_local_decl_p (tree t)
tree t;
{ {
return ((local_variable_p (t) && !TREE_STATIC (t)) return ((local_variable_p (t) && !TREE_STATIC (t))
|| TREE_CODE (t) == LABEL_DECL || TREE_CODE (t) == LABEL_DECL
...@@ -12205,10 +11983,9 @@ nonstatic_local_decl_p (t) ...@@ -12205,10 +11983,9 @@ nonstatic_local_decl_p (t)
function. */ function. */
static tree static tree
local_variable_p_walkfn (tp, walk_subtrees, data) local_variable_p_walkfn (tree* tp,
tree *tp; int* walk_subtrees ATTRIBUTE_UNUSED ,
int *walk_subtrees ATTRIBUTE_UNUSED; void* data ATTRIBUTE_UNUSED )
void *data ATTRIBUTE_UNUSED;
{ {
return ((local_variable_p (*tp) && !DECL_ARTIFICIAL (*tp)) return ((local_variable_p (*tp) && !DECL_ARTIFICIAL (*tp))
? *tp : NULL_TREE); ? *tp : NULL_TREE);
...@@ -12220,9 +11997,7 @@ local_variable_p_walkfn (tp, walk_subtrees, data) ...@@ -12220,9 +11997,7 @@ local_variable_p_walkfn (tp, walk_subtrees, data)
DECL, if there is no DECL available. */ DECL, if there is no DECL available. */
tree tree
check_default_argument (decl, arg) check_default_argument (tree decl, tree arg)
tree decl;
tree arg;
{ {
tree var; tree var;
tree decl_type; tree decl_type;
...@@ -12304,8 +12079,7 @@ check_default_argument (decl, arg) ...@@ -12304,8 +12079,7 @@ check_default_argument (decl, arg)
Also set last_function_parms to the chain of PARM_DECLs. */ Also set last_function_parms to the chain of PARM_DECLs. */
static tree static tree
grokparms (first_parm) grokparms (tree first_parm)
tree first_parm;
{ {
tree result = NULL_TREE; tree result = NULL_TREE;
tree decls = NULL_TREE; tree decls = NULL_TREE;
...@@ -12442,8 +12216,7 @@ grokparms (first_parm) ...@@ -12442,8 +12216,7 @@ grokparms (first_parm)
operator. */ operator. */
int int
copy_fn_p (d) copy_fn_p (tree d)
tree d;
{ {
tree args; tree args;
tree arg_type; tree arg_type;
...@@ -12489,8 +12262,7 @@ copy_fn_p (d) ...@@ -12489,8 +12262,7 @@ copy_fn_p (d)
/* Remember any special properties of member function DECL. */ /* Remember any special properties of member function DECL. */
void grok_special_member_properties (decl) void grok_special_member_properties (tree decl)
tree decl;
{ {
if (!DECL_NONSTATIC_MEMBER_FUNCTION_P(decl)) if (!DECL_NONSTATIC_MEMBER_FUNCTION_P(decl))
; /* Not special. */ ; /* Not special. */
...@@ -12539,8 +12311,7 @@ void grok_special_member_properties (decl) ...@@ -12539,8 +12311,7 @@ void grok_special_member_properties (decl)
if the class has a constructor of the form X(X). */ if the class has a constructor of the form X(X). */
int int
grok_ctor_properties (ctype, decl) grok_ctor_properties (tree ctype, tree decl)
tree ctype, decl;
{ {
int ctor_parm = copy_fn_p (decl); int ctor_parm = copy_fn_p (decl);
...@@ -12573,8 +12344,7 @@ grok_ctor_properties (ctype, decl) ...@@ -12573,8 +12344,7 @@ grok_ctor_properties (ctype, decl)
/* An operator with this code is unary, but can also be binary. */ /* An operator with this code is unary, but can also be binary. */
static int static int
ambi_op_p (code) ambi_op_p (enum tree_code code)
enum tree_code code;
{ {
return (code == INDIRECT_REF return (code == INDIRECT_REF
|| code == ADDR_EXPR || code == ADDR_EXPR
...@@ -12587,8 +12357,7 @@ ambi_op_p (code) ...@@ -12587,8 +12357,7 @@ ambi_op_p (code)
/* An operator with this name can only be unary. */ /* An operator with this name can only be unary. */
static int static int
unary_op_p (code) unary_op_p (enum tree_code code)
enum tree_code code;
{ {
return (code == TRUTH_NOT_EXPR return (code == TRUTH_NOT_EXPR
|| code == BIT_NOT_EXPR || code == BIT_NOT_EXPR
...@@ -12599,9 +12368,7 @@ unary_op_p (code) ...@@ -12599,9 +12368,7 @@ unary_op_p (code)
/* Do a little sanity-checking on how they declared their operator. */ /* Do a little sanity-checking on how they declared their operator. */
void void
grok_op_properties (decl, friendp) grok_op_properties (tree decl, int friendp)
tree decl;
int friendp;
{ {
tree argtypes = TYPE_ARG_TYPES (TREE_TYPE (decl)); tree argtypes = TYPE_ARG_TYPES (TREE_TYPE (decl));
tree argtype; tree argtype;
...@@ -12929,8 +12696,7 @@ grok_op_properties (decl, friendp) ...@@ -12929,8 +12696,7 @@ grok_op_properties (decl, friendp)
} }
static const char * static const char *
tag_name (code) tag_name (enum tag_types code)
enum tag_types code;
{ {
switch (code) switch (code)
{ {
...@@ -13172,9 +12938,7 @@ xref_tag (enum tag_types tag_code, tree name, tree attributes, ...@@ -13172,9 +12938,7 @@ xref_tag (enum tag_types tag_code, tree name, tree attributes,
} }
tree tree
xref_tag_from_type (old, id, globalize) xref_tag_from_type (tree old, tree id, int globalize)
tree old, id;
int globalize;
{ {
enum tag_types tag_kind; enum tag_types tag_kind;
...@@ -13196,9 +12960,7 @@ xref_tag_from_type (old, id, globalize) ...@@ -13196,9 +12960,7 @@ xref_tag_from_type (old, id, globalize)
struct, or union. */ struct, or union. */
void void
xref_basetypes (ref, binfo) xref_basetypes (tree ref, tree binfo)
tree ref;
tree binfo;
{ {
/* In the declaration `A : X, Y, ... Z' we mark all the types /* In the declaration `A : X, Y, ... Z' we mark all the types
(A, X, Y, ..., Z) so we can check for duplicates. */ (A, X, Y, ..., Z) so we can check for duplicates. */
...@@ -13372,8 +13134,7 @@ xref_basetypes (ref, binfo) ...@@ -13372,8 +13134,7 @@ xref_basetypes (ref, binfo)
may be used to declare the individual values as they are read. */ may be used to declare the individual values as they are read. */
tree tree
start_enum (name) start_enum (tree name)
tree name;
{ {
register tree enumtype = NULL_TREE; register tree enumtype = NULL_TREE;
struct cp_binding_level *b = current_binding_level; struct cp_binding_level *b = current_binding_level;
...@@ -13406,8 +13167,7 @@ start_enum (name) ...@@ -13406,8 +13167,7 @@ start_enum (name)
ENUMTYPE is the type object and VALUES a list of name-value pairs. */ ENUMTYPE is the type object and VALUES a list of name-value pairs. */
void void
finish_enum (enumtype) finish_enum (tree enumtype)
tree enumtype;
{ {
tree pair; tree pair;
tree minnode; tree minnode;
...@@ -13528,10 +13288,7 @@ finish_enum (enumtype) ...@@ -13528,10 +13288,7 @@ finish_enum (enumtype)
Assignment of sequential values by default is handled here. */ Assignment of sequential values by default is handled here. */
void void
build_enumerator (name, value, enumtype) build_enumerator (tree name, tree value, tree enumtype)
tree name;
tree value;
tree enumtype;
{ {
tree decl; tree decl;
tree context; tree context;
...@@ -13650,9 +13407,7 @@ build_enumerator (name, value, enumtype) ...@@ -13650,9 +13407,7 @@ build_enumerator (name, value, enumtype)
/* We're defining DECL. Make sure that it's type is OK. */ /* We're defining DECL. Make sure that it's type is OK. */
static void static void
check_function_type (decl, current_function_parms) check_function_type (tree decl, tree current_function_parms)
tree decl;
tree current_function_parms;
{ {
tree fntype = TREE_TYPE (decl); tree fntype = TREE_TYPE (decl);
tree return_type = complete_type (TREE_TYPE (fntype)); tree return_type = complete_type (TREE_TYPE (fntype));
...@@ -13709,9 +13464,7 @@ check_function_type (decl, current_function_parms) ...@@ -13709,9 +13464,7 @@ check_function_type (decl, current_function_parms)
applied to it with the argument list [1, 2]. */ applied to it with the argument list [1, 2]. */
int int
start_function (declspecs, declarator, attrs, flags) start_function (tree declspecs, tree declarator, tree attrs, int flags)
tree declspecs, declarator, attrs;
int flags;
{ {
tree decl1; tree decl1;
tree ctype = NULL_TREE; tree ctype = NULL_TREE;
...@@ -14071,8 +13824,7 @@ start_function (declspecs, declarator, attrs, flags) ...@@ -14071,8 +13824,7 @@ start_function (declspecs, declarator, attrs, flags)
Also install to binding contour return value identifier, if any. */ Also install to binding contour return value identifier, if any. */
static void static void
store_parm_decls (current_function_parms) store_parm_decls (tree current_function_parms)
tree current_function_parms;
{ {
register tree fndecl = current_function_decl; register tree fndecl = current_function_decl;
register tree parm; register tree parm;
...@@ -14149,8 +13901,7 @@ store_parm_decls (current_function_parms) ...@@ -14149,8 +13901,7 @@ store_parm_decls (current_function_parms)
when we want to generate RTL later we know what to do. */ when we want to generate RTL later we know what to do. */
static void static void
save_function_data (decl) save_function_data (tree decl)
tree decl;
{ {
struct language_function *f; struct language_function *f;
...@@ -14190,7 +13941,7 @@ save_function_data (decl) ...@@ -14190,7 +13941,7 @@ save_function_data (decl)
fully-constructed bases and members. */ fully-constructed bases and members. */
static void static void
begin_constructor_body () begin_constructor_body (void)
{ {
} }
...@@ -14199,7 +13950,7 @@ begin_constructor_body () ...@@ -14199,7 +13950,7 @@ begin_constructor_body ()
members. */ members. */
static void static void
finish_constructor_body () finish_constructor_body (void)
{ {
} }
...@@ -14207,7 +13958,7 @@ finish_constructor_body () ...@@ -14207,7 +13958,7 @@ finish_constructor_body ()
vtable pointers and cleanups for bases and members. */ vtable pointers and cleanups for bases and members. */
static void static void
begin_destructor_body () begin_destructor_body (void)
{ {
tree if_stmt; tree if_stmt;
tree compound_stmt; tree compound_stmt;
...@@ -14254,7 +14005,7 @@ begin_destructor_body () ...@@ -14254,7 +14005,7 @@ begin_destructor_body ()
necessary. Do that now. */ necessary. Do that now. */
static void static void
finish_destructor_body () finish_destructor_body (void)
{ {
tree exprstmt; tree exprstmt;
...@@ -14296,7 +14047,7 @@ finish_destructor_body () ...@@ -14296,7 +14047,7 @@ finish_destructor_body ()
In other functions, this isn't necessary, but it doesn't hurt. */ In other functions, this isn't necessary, but it doesn't hurt. */
tree tree
begin_function_body () begin_function_body (void)
{ {
tree stmt; tree stmt;
...@@ -14331,8 +14082,7 @@ begin_function_body () ...@@ -14331,8 +14082,7 @@ begin_function_body ()
main() would also need to return 0. */ main() would also need to return 0. */
void void
finish_function_body (compstmt) finish_function_body (tree compstmt)
tree compstmt;
{ {
/* Close the block. */ /* Close the block. */
finish_compound_stmt (0, compstmt); finish_compound_stmt (0, compstmt);
...@@ -14356,8 +14106,7 @@ finish_function_body (compstmt) ...@@ -14356,8 +14106,7 @@ finish_function_body (compstmt)
after the class definition is complete.) */ after the class definition is complete.) */
tree tree
finish_function (flags) finish_function (int flags)
int flags;
{ {
register tree fndecl = current_function_decl; register tree fndecl = current_function_decl;
tree fntype, ctype = NULL_TREE; tree fntype, ctype = NULL_TREE;
...@@ -14555,8 +14304,7 @@ finish_function (flags) ...@@ -14555,8 +14304,7 @@ finish_function (flags)
CHANGES TO CODE IN `grokfield'. */ CHANGES TO CODE IN `grokfield'. */
tree tree
start_method (declspecs, declarator, attrlist) start_method (tree declspecs, tree declarator, tree attrlist)
tree declarator, declspecs, attrlist;
{ {
tree fndecl = grokdeclarator (declarator, declspecs, MEMFUNCDEF, 0, tree fndecl = grokdeclarator (declarator, declspecs, MEMFUNCDEF, 0,
&attrlist); &attrlist);
...@@ -14633,8 +14381,7 @@ start_method (declspecs, declarator, attrlist) ...@@ -14633,8 +14381,7 @@ start_method (declspecs, declarator, attrlist)
DECL is the ..._DECL that `start_method' provided. */ DECL is the ..._DECL that `start_method' provided. */
tree tree
finish_method (decl) finish_method (tree decl)
tree decl;
{ {
register tree fndecl = decl; register tree fndecl = decl;
tree old_initial; tree old_initial;
...@@ -14686,8 +14433,7 @@ finish_method (decl) ...@@ -14686,8 +14433,7 @@ finish_method (decl)
we can lay it out later, when and if its type becomes complete. */ we can lay it out later, when and if its type becomes complete. */
void void
maybe_register_incomplete_var (var) maybe_register_incomplete_var (tree var)
tree var;
{ {
my_friendly_assert (TREE_CODE (var) == VAR_DECL, 20020406); my_friendly_assert (TREE_CODE (var) == VAR_DECL, 20020406);
...@@ -14714,8 +14460,7 @@ maybe_register_incomplete_var (var) ...@@ -14714,8 +14460,7 @@ maybe_register_incomplete_var (var)
declaration, update them now. */ declaration, update them now. */
void void
complete_vars (type) complete_vars (tree type)
tree type;
{ {
tree *list = &incomplete_vars; tree *list = &incomplete_vars;
...@@ -14740,8 +14485,7 @@ complete_vars (type) ...@@ -14740,8 +14485,7 @@ complete_vars (type)
here. */ here. */
tree tree
cxx_maybe_build_cleanup (decl) cxx_maybe_build_cleanup (tree decl)
tree decl;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
...@@ -14779,7 +14523,7 @@ cxx_maybe_build_cleanup (decl) ...@@ -14779,7 +14523,7 @@ cxx_maybe_build_cleanup (decl)
/* When a stmt has been parsed, this function is called. */ /* When a stmt has been parsed, this function is called. */
void void
finish_stmt () finish_stmt (void)
{ {
/* Always assume this statement was not an expression statement. If /* Always assume this statement was not an expression statement. If
it actually was an expression statement, its our callers it actually was an expression statement, its our callers
...@@ -14791,8 +14535,7 @@ finish_stmt () ...@@ -14791,8 +14535,7 @@ finish_stmt ()
but turned out to be static. Update it accordingly. */ but turned out to be static. Update it accordingly. */
void void
revert_static_member_fn (decl) revert_static_member_fn (tree decl)
tree decl;
{ {
tree tmp; tree tmp;
tree function = TREE_TYPE (decl); tree function = TREE_TYPE (decl);
...@@ -14818,8 +14561,7 @@ revert_static_member_fn (decl) ...@@ -14818,8 +14561,7 @@ revert_static_member_fn (decl)
function. */ function. */
void void
cxx_push_function_context (f) cxx_push_function_context (struct function * f)
struct function *f;
{ {
struct language_function *p struct language_function *p
= ((struct language_function *) = ((struct language_function *)
...@@ -14839,8 +14581,7 @@ cxx_push_function_context (f) ...@@ -14839,8 +14581,7 @@ cxx_push_function_context (f)
compiling the function. */ compiling the function. */
void void
cxx_pop_function_context (f) cxx_pop_function_context (struct function * f)
struct function *f;
{ {
f->language = 0; f->language = 0;
} }
...@@ -14849,8 +14590,7 @@ cxx_pop_function_context (f) ...@@ -14849,8 +14590,7 @@ cxx_pop_function_context (f)
one of the language-independent trees. */ one of the language-independent trees. */
enum cp_tree_node_structure_enum enum cp_tree_node_structure_enum
cp_tree_node_structure (t) cp_tree_node_structure (union lang_tree_node * t)
union lang_tree_node *t;
{ {
switch (TREE_CODE (&t->generic)) switch (TREE_CODE (&t->generic))
{ {
...@@ -14870,15 +14610,14 @@ cp_tree_node_structure (t) ...@@ -14870,15 +14610,14 @@ cp_tree_node_structure (t)
the definition of IDENTIFIER_GLOBAL_VALUE is different for C and C++. */ the definition of IDENTIFIER_GLOBAL_VALUE is different for C and C++. */
tree tree
identifier_global_value (t) identifier_global_value (tree t)
tree t;
{ {
return IDENTIFIER_GLOBAL_VALUE (t); return IDENTIFIER_GLOBAL_VALUE (t);
} }
/* Build the void_list_node (void_type_node having been created). */ /* Build the void_list_node (void_type_node having been created). */
tree tree
build_void_list_node () build_void_list_node (void)
{ {
tree t = build_tree_list (NULL_TREE, void_type_node); tree t = build_tree_list (NULL_TREE, void_type_node);
TREE_PARMLIST (t) = 1; TREE_PARMLIST (t) = 1;
...@@ -14886,8 +14625,7 @@ build_void_list_node () ...@@ -14886,8 +14625,7 @@ build_void_list_node ()
} }
static int static int
cp_missing_noreturn_ok_p (decl) cp_missing_noreturn_ok_p (tree decl)
tree decl;
{ {
/* A missing noreturn is ok for the `main' function. */ /* A missing noreturn is ok for the `main' function. */
return DECL_MAIN_P (decl); return DECL_MAIN_P (decl);
......
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