} vtbl_init_data;
/* The type of a function passed to walk_subobject_offsets. */
-typedef int (*subobject_offset_fn) PARAMS ((tree, tree, splay_tree));
+typedef int (*subobject_offset_fn) (tree, tree, splay_tree);
/* The stack itself. This is a dynamically resized array. The
number of elements allocated is CURRENT_CLASS_STACK_SIZE. */
declaration order. */
varray_type local_classes;
-static tree get_vfield_name PARAMS ((tree));
-static void finish_struct_anon PARAMS ((tree));
-static tree get_vtable_name PARAMS ((tree));
-static tree get_basefndecls PARAMS ((tree, tree));
-static int build_primary_vtable PARAMS ((tree, tree));
-static int build_secondary_vtable PARAMS ((tree, tree));
-static void finish_vtbls PARAMS ((tree));
-static void modify_vtable_entry PARAMS ((tree, tree, tree, tree, tree *));
-static tree delete_duplicate_fields_1 PARAMS ((tree, tree));
-static void delete_duplicate_fields PARAMS ((tree));
-static void finish_struct_bits PARAMS ((tree));
-static int alter_access PARAMS ((tree, tree, tree));
-static void handle_using_decl PARAMS ((tree, tree));
-static void check_for_override PARAMS ((tree, tree));
-static tree dfs_modify_vtables PARAMS ((tree, void *));
-static tree modify_all_vtables PARAMS ((tree, tree));
-static void determine_primary_base PARAMS ((tree));
-static void finish_struct_methods PARAMS ((tree));
-static void maybe_warn_about_overly_private_class PARAMS ((tree));
-static int field_decl_cmp PARAMS ((const void *, const void *));
-static int resort_field_decl_cmp PARAMS ((const void *, const void *));
-static int method_name_cmp PARAMS ((const void *, const void *));
-static int resort_method_name_cmp PARAMS ((const void *, const void *));
-static void add_implicitly_declared_members PARAMS ((tree, int, int, int));
-static tree fixed_type_or_null PARAMS ((tree, int *, int *));
-static tree resolve_address_of_overloaded_function PARAMS ((tree, tree, int,
- int, int, tree));
-static tree build_vtable_entry_ref PARAMS ((tree, tree, tree));
-static tree build_vtbl_ref_1 PARAMS ((tree, tree));
-static tree build_vtbl_initializer PARAMS ((tree, tree, tree, tree, int *));
-static int count_fields PARAMS ((tree));
-static int add_fields_to_vec PARAMS ((tree, tree, int));
-static void check_bitfield_decl PARAMS ((tree));
+static tree get_vfield_name (tree);
+static void finish_struct_anon (tree);
+static tree get_vtable_name (tree);
+static tree get_basefndecls (tree, tree);
+static int build_primary_vtable (tree, tree);
+static int build_secondary_vtable (tree, tree);
+static void finish_vtbls (tree);
+static void modify_vtable_entry (tree, tree, tree, tree, tree *);
+static tree delete_duplicate_fields_1 (tree, tree);
+static void delete_duplicate_fields (tree);
+static void finish_struct_bits (tree);
+static int alter_access (tree, tree, tree);
+static void handle_using_decl (tree, tree);
+static void check_for_override (tree, tree);
+static tree dfs_modify_vtables (tree, void *);
+static tree modify_all_vtables (tree, tree);
+static void determine_primary_base (tree);
+static void finish_struct_methods (tree);
+static void maybe_warn_about_overly_private_class (tree);
+static int field_decl_cmp (const void *, const void *);
+static int resort_field_decl_cmp (const void *, const void *);
+static int method_name_cmp (const void *, const void *);
+static int resort_method_name_cmp (const void *, const void *);
+static void add_implicitly_declared_members (tree, int, int, int);
+static tree fixed_type_or_null (tree, int *, int *);
+static tree resolve_address_of_overloaded_function (tree, tree, int,
+ int, int, tree);
+static tree build_vtable_entry_ref (tree, tree, tree);
+static tree build_vtbl_ref_1 (tree, tree);
+static tree build_vtbl_initializer (tree, tree, tree, tree, int *);
+static int count_fields (tree);
+static int add_fields_to_vec (tree, tree, int);
+static void check_bitfield_decl (tree);
static void check_field_decl (tree, tree, int *, int *, int *, int *);
static void check_field_decls (tree, tree *, int *, int *, int *);
static tree *build_base_field (record_layout_info, tree, splay_tree, tree *);
static void build_base_fields (record_layout_info, splay_tree, tree *);
-static void check_methods PARAMS ((tree));
-static void remove_zero_width_bit_fields PARAMS ((tree));
-static void check_bases PARAMS ((tree, int *, int *, int *));
+static void check_methods (tree);
+static void remove_zero_width_bit_fields (tree);
+static void check_bases (tree, int *, int *, int *);
static void check_bases_and_members (tree);
static tree create_vtable_ptr (tree, tree *);
static void include_empty_classes (record_layout_info);
static void layout_class_type (tree, tree *);
-static void fixup_pending_inline PARAMS ((tree));
-static void fixup_inline_methods PARAMS ((tree));
-static void set_primary_base PARAMS ((tree, tree));
-static void propagate_binfo_offsets PARAMS ((tree, tree, tree));
+static void fixup_pending_inline (tree);
+static void fixup_inline_methods (tree);
+static void set_primary_base (tree, tree);
+static void propagate_binfo_offsets (tree, tree, tree);
static void layout_virtual_bases (record_layout_info, splay_tree);
-static tree dfs_set_offset_for_unshared_vbases PARAMS ((tree, void *));
-static void build_vbase_offset_vtbl_entries PARAMS ((tree, vtbl_init_data *));
-static void add_vcall_offset_vtbl_entries_r PARAMS ((tree, vtbl_init_data *));
-static void add_vcall_offset_vtbl_entries_1 PARAMS ((tree, vtbl_init_data *));
-static void build_vcall_offset_vtbl_entries PARAMS ((tree, vtbl_init_data *));
+static tree dfs_set_offset_for_unshared_vbases (tree, void *);
+static void build_vbase_offset_vtbl_entries (tree, vtbl_init_data *);
+static void add_vcall_offset_vtbl_entries_r (tree, vtbl_init_data *);
+static void add_vcall_offset_vtbl_entries_1 (tree, vtbl_init_data *);
+static void build_vcall_offset_vtbl_entries (tree, vtbl_init_data *);
static void add_vcall_offset (tree, tree, vtbl_init_data *);
-static void layout_vtable_decl PARAMS ((tree, int));
-static tree dfs_find_final_overrider PARAMS ((tree, void *));
-static tree find_final_overrider PARAMS ((tree, tree, tree));
-static int make_new_vtable PARAMS ((tree, tree));
-static int maybe_indent_hierarchy PARAMS ((FILE *, int, int));
-static void dump_class_hierarchy_r PARAMS ((FILE *, int, tree, tree, int));
-static void dump_class_hierarchy PARAMS ((tree));
-static void dump_array PARAMS ((FILE *, tree));
-static void dump_vtable PARAMS ((tree, tree, tree));
-static void dump_vtt PARAMS ((tree, tree));
-static tree build_vtable PARAMS ((tree, tree, tree));
-static void initialize_vtable PARAMS ((tree, tree));
-static void initialize_array PARAMS ((tree, tree));
-static void layout_nonempty_base_or_field PARAMS ((record_layout_info,
- tree, tree, splay_tree));
-static tree end_of_class PARAMS ((tree, int));
-static bool layout_empty_base PARAMS ((tree, tree, splay_tree, tree));
-static void accumulate_vtbl_inits PARAMS ((tree, tree, tree, tree, tree));
-static tree dfs_accumulate_vtbl_inits PARAMS ((tree, tree, tree, tree,
- tree));
-static void build_rtti_vtbl_entries PARAMS ((tree, vtbl_init_data *));
-static void build_vcall_and_vbase_vtbl_entries PARAMS ((tree,
- vtbl_init_data *));
-static void force_canonical_binfo_r PARAMS ((tree, tree, tree, tree));
-static void force_canonical_binfo PARAMS ((tree, tree, tree, tree));
-static tree dfs_unshared_virtual_bases PARAMS ((tree, void *));
-static void mark_primary_bases PARAMS ((tree));
-static tree mark_primary_virtual_base PARAMS ((tree, tree));
-static void clone_constructors_and_destructors PARAMS ((tree));
-static tree build_clone PARAMS ((tree, tree));
-static void update_vtable_entry_for_fn PARAMS ((tree, tree, tree, tree *));
-static tree copy_virtuals PARAMS ((tree));
-static void build_ctor_vtbl_group PARAMS ((tree, tree));
-static void build_vtt PARAMS ((tree));
-static tree binfo_ctor_vtable PARAMS ((tree));
-static tree *build_vtt_inits PARAMS ((tree, tree, tree *, tree *));
-static tree dfs_build_secondary_vptr_vtt_inits PARAMS ((tree, void *));
-static tree dfs_ctor_vtable_bases_queue_p PARAMS ((tree, void *data));
-static tree dfs_fixup_binfo_vtbls PARAMS ((tree, void *));
-static tree get_original_base PARAMS ((tree, tree));
-static tree dfs_get_primary_binfo PARAMS ((tree, void*));
-static int record_subobject_offset PARAMS ((tree, tree, splay_tree));
-static int check_subobject_offset PARAMS ((tree, tree, splay_tree));
-static int walk_subobject_offsets PARAMS ((tree, subobject_offset_fn,
- tree, splay_tree, tree, int));
-static void record_subobject_offsets PARAMS ((tree, tree, splay_tree, int));
-static int layout_conflict_p PARAMS ((tree, tree, splay_tree, int));
-static int splay_tree_compare_integer_csts PARAMS ((splay_tree_key k1,
- splay_tree_key k2));
-static void warn_about_ambiguous_bases PARAMS ((tree));
-static bool type_requires_array_cookie PARAMS ((tree));
+static void layout_vtable_decl (tree, int);
+static tree dfs_find_final_overrider (tree, void *);
+static tree find_final_overrider (tree, tree, tree);
+static int make_new_vtable (tree, tree);
+static int maybe_indent_hierarchy (FILE *, int, int);
+static void dump_class_hierarchy_r (FILE *, int, tree, tree, int);
+static void dump_class_hierarchy (tree);
+static void dump_array (FILE *, tree);
+static void dump_vtable (tree, tree, tree);
+static void dump_vtt (tree, tree);
+static tree build_vtable (tree, tree, tree);
+static void initialize_vtable (tree, tree);
+static void initialize_array (tree, tree);
+static void layout_nonempty_base_or_field (record_layout_info,
+ tree, tree, splay_tree);
+static tree end_of_class (tree, int);
+static bool layout_empty_base (tree, tree, splay_tree, tree);
+static void accumulate_vtbl_inits (tree, tree, tree, tree, tree);
+static tree dfs_accumulate_vtbl_inits (tree, tree, tree, tree,
+ tree);
+static void build_rtti_vtbl_entries (tree, vtbl_init_data *);
+static void build_vcall_and_vbase_vtbl_entries (tree,
+ vtbl_init_data *);
+static void force_canonical_binfo_r (tree, tree, tree, tree);
+static void force_canonical_binfo (tree, tree, tree, tree);
+static tree dfs_unshared_virtual_bases (tree, void *);
+static void mark_primary_bases (tree);
+static tree mark_primary_virtual_base (tree, tree);
+static void clone_constructors_and_destructors (tree);
+static tree build_clone (tree, tree);
+static void update_vtable_entry_for_fn (tree, tree, tree, tree *);
+static tree copy_virtuals (tree);
+static void build_ctor_vtbl_group (tree, tree);
+static void build_vtt (tree);
+static tree binfo_ctor_vtable (tree);
+static tree *build_vtt_inits (tree, tree, tree *, tree *);
+static tree dfs_build_secondary_vptr_vtt_inits (tree, void *);
+static tree dfs_ctor_vtable_bases_queue_p (tree, void *data);
+static tree dfs_fixup_binfo_vtbls (tree, void *);
+static tree get_original_base (tree, tree);
+static tree dfs_get_primary_binfo (tree, void*);
+static int record_subobject_offset (tree, tree, splay_tree);
+static int check_subobject_offset (tree, tree, splay_tree);
+static int walk_subobject_offsets (tree, subobject_offset_fn,
+ tree, splay_tree, tree, int);
+static void record_subobject_offsets (tree, tree, splay_tree, int);
+static int layout_conflict_p (tree, tree, splay_tree, int);
+static int splay_tree_compare_integer_csts (splay_tree_key k1,
+ splay_tree_key k2);
+static void warn_about_ambiguous_bases (tree);
+static bool type_requires_array_cookie (tree);
static bool contains_empty_class_p (tree);
static tree dfs_base_derived_from (tree, void *);
static bool base_derived_from (tree, tree);
from EXPR. */
tree
-build_base_path (code, expr, binfo, nonnull)
- enum tree_code code;
- tree expr;
- tree binfo;
- int nonnull;
+build_base_path (enum tree_code code,
+ tree expr,
+ tree binfo,
+ int nonnull)
{
tree v_binfo = NULL_TREE;
tree d_binfo = NULL_TREE;
/* Virtual function things. */
static tree
-build_vtable_entry_ref (array_ref, instance, idx)
- tree array_ref, instance, idx;
+build_vtable_entry_ref (tree array_ref, tree instance, tree idx)
{
tree i, i2, vtable, first_fn, basetype;
creating extra tree nodes when we don't have to. */
static tree
-build_vtbl_ref_1 (instance, idx)
- tree instance, idx;
+build_vtbl_ref_1 (tree instance, tree idx)
{
tree aref;
tree vtbl = NULL_TREE;
}
tree
-build_vtbl_ref (instance, idx)
- tree instance, idx;
+build_vtbl_ref (tree instance, tree idx)
{
tree aref = build_vtbl_ref_1 (instance, idx);
function pointer corresponding to vtable element INDEX. */
tree
-build_vfn_ref (instance, idx)
- tree instance, idx;
+build_vfn_ref (tree instance, tree idx)
{
tree aref = build_vtbl_ref_1 (instance, idx);
for the given TYPE. */
static tree
-get_vtable_name (type)
- tree type;
+get_vtable_name (tree type)
{
return mangle_vtbl_for_type (type);
}
for TYPE. */
tree
-get_vtt_name (type)
- tree type;
+get_vtt_name (tree type)
{
return mangle_vtt_for_type (type);
}
Use NAME for the name of the vtable, and VTABLE_TYPE for its type. */
static tree
-build_vtable (class_type, name, vtable_type)
- tree class_type;
- tree name;
- tree vtable_type;
+build_vtable (tree class_type, tree name, tree vtable_type)
{
tree decl;
which are known to exist in the runtime. */
tree
-get_vtable_decl (type, complete)
- tree type;
- int complete;
+get_vtable_decl (tree type, int complete)
{
tree decl;
BV_VCALL_INDEX for each entry is cleared. */
static tree
-copy_virtuals (binfo)
- tree binfo;
+copy_virtuals (tree binfo)
{
tree copies;
tree t;
created. */
static int
-build_primary_vtable (binfo, type)
- tree binfo, type;
+build_primary_vtable (tree binfo, tree type)
{
tree decl;
tree virtuals;
can result. */
static int
-build_secondary_vtable (binfo, for_type)
- tree binfo, for_type;
+build_secondary_vtable (tree binfo, tree for_type)
{
my_friendly_assert (binfo == CANONICAL_BINFO (binfo, for_type), 20010605);
T. Return nonzero if we actually created a new vtable. */
static int
-make_new_vtable (t, binfo)
- tree t;
- tree binfo;
+make_new_vtable (tree t, tree binfo)
{
if (binfo == TYPE_BINFO (t))
/* In this case, it is *type*'s vtable we are modifying. We start
the function is actually called. */
static void
-modify_vtable_entry (t, binfo, fndecl, delta, virtuals)
- tree t;
- tree binfo;
- tree fndecl;
- tree delta;
- tree *virtuals;
+modify_vtable_entry (tree t,
+ tree binfo,
+ tree fndecl,
+ tree delta,
+ tree* virtuals)
{
tree v;
add the method for improved error recovery.) */
void
-add_method (type, method, error_p)
- tree type;
- tree method;
- int error_p;
+add_method (tree type, tree method, int error_p)
{
int using = (DECL_CONTEXT (method) != type);
int len;
when we have unnamed bitfields, for example. */
static tree
-delete_duplicate_fields_1 (field, fields)
- tree field, fields;
+delete_duplicate_fields_1 (tree field, tree fields)
{
tree x;
tree prev = 0;
}
static void
-delete_duplicate_fields (fields)
- tree fields;
+delete_duplicate_fields (tree fields)
{
tree x;
for (x = fields; x && TREE_CHAIN (x); x = TREE_CHAIN (x))
legit, otherwise return 0. */
static int
-alter_access (t, fdecl, access)
- tree t;
- tree fdecl;
- tree access;
+alter_access (tree t, tree fdecl, tree access)
{
tree elem;
/* Process the USING_DECL, which is a member of T. */
static void
-handle_using_decl (using_decl, t)
- tree using_decl;
- tree t;
+handle_using_decl (tree using_decl, tree t)
{
tree ctype = DECL_INITIAL (using_decl);
tree name = DECL_NAME (using_decl);
the bases. */
static void
-check_bases (t, cant_have_default_ctor_p, cant_have_const_ctor_p,
- no_const_asn_ref_p)
- tree t;
- int *cant_have_default_ctor_p;
- int *cant_have_const_ctor_p;
- int *no_const_asn_ref_p;
+check_bases (tree t,
+ int* cant_have_default_ctor_p,
+ int* cant_have_const_ctor_p,
+ int* no_const_asn_ref_p)
{
int n_baseclasses;
int i;
assoc list of binfos that have already been reseated. */
static void
-force_canonical_binfo_r (to, from, type, mappings)
- tree to;
- tree from;
- tree type;
- tree mappings;
+force_canonical_binfo_r (tree to, tree from, tree type, tree mappings)
{
int i, n_baseclasses = BINFO_N_BASETYPES (from);
primary. */
static void
-force_canonical_binfo (to, from, type, mappings)
- tree to;
- tree from;
- tree type;
- tree mappings;
+force_canonical_binfo (tree to, tree from, tree type, tree mappings)
{
tree assoc = purpose_member (BINFO_TYPE (to),
CLASSTYPE_VBASECLASSES (type));
otherwise (because something else has already made it primary). */
static tree
-mark_primary_virtual_base (base_binfo, type)
- tree base_binfo;
- tree type;
+mark_primary_virtual_base (tree base_binfo, tree type)
{
tree shared_binfo = binfo_for_vbase (BINFO_TYPE (base_binfo), type);
mark_primary_bases. DATA is the most derived type. */
static tree
-dfs_unshared_virtual_bases (binfo, data)
- tree binfo;
- void *data;
+dfs_unshared_virtual_bases (tree binfo, void* data)
{
tree t = (tree) data;
dominated by TYPE that are primary bases. */
static void
-mark_primary_bases (type)
- tree type;
+mark_primary_bases (tree type)
{
tree binfo;
/* Make the BINFO the primary base of T. */
static void
-set_primary_base (t, binfo)
- tree t;
- tree binfo;
+set_primary_base (tree t, tree binfo)
{
tree basetype;
/* Determine the primary class for T. */
static void
-determine_primary_base (t)
- tree t;
+determine_primary_base (tree t)
{
int i, n_baseclasses = CLASSTYPE_N_BASECLASSES (t);
tree vbases;
use. */
static void
-finish_struct_bits (t)
- tree t;
+finish_struct_bits (tree t)
{
int i, n_baseclasses = CLASSTYPE_N_BASECLASSES (t);
non-private static member functions. */
static void
-maybe_warn_about_overly_private_class (t)
- tree t;
+maybe_warn_about_overly_private_class (tree t)
{
int has_member_fn = 0;
int has_nonprivate_method = 0;
/* Function to help qsort sort FIELD_DECLs by name order. */
static int
-field_decl_cmp (x_p, y_p)
- const void *x_p, *y_p;
+field_decl_cmp (const void* x_p, const void* y_p)
{
const tree *const x = x_p;
const tree *const y = y_p;
pointer operator in resort_data. */
static int
-resort_field_decl_cmp (x_p, y_p)
- const void *x_p, *y_p;
+resort_field_decl_cmp (const void* x_p, const void* y_p)
{
const tree *const x = x_p;
const tree *const y = y_p;
/* Resort DECL_SORTED_FIELDS because pointers have been reordered. */
void
-resort_sorted_fields (obj, orig_obj, new_value, cookie)
- void *obj;
- void *orig_obj ATTRIBUTE_UNUSED;
- gt_pointer_operator new_value;
- void *cookie;
+resort_sorted_fields (void* obj,
+ void* orig_obj ATTRIBUTE_UNUSED ,
+ gt_pointer_operator new_value,
+ void* cookie)
{
tree sf = obj;
resort_data.new_value = new_value;
/* Comparison function to compare two TYPE_METHOD_VEC entries by name. */
static int
-method_name_cmp (m1_p, m2_p)
- const void *m1_p, *m2_p;
+method_name_cmp (const void* m1_p, const void* m2_p)
{
const tree *const m1 = m1_p;
const tree *const m2 = m2_p;
pointer operator in resort_field_decl_data. */
static int
-resort_method_name_cmp (m1_p, m2_p)
- const void *m1_p, *m2_p;
+resort_method_name_cmp (const void* m1_p, const void* m2_p)
{
const tree *const m1 = m1_p;
const tree *const m2 = m2_p;
/* Resort TYPE_METHOD_VEC because pointers have been reordered. */
void
-resort_type_method_vec (obj, orig_obj, new_value, cookie)
- void *obj;
- void *orig_obj ATTRIBUTE_UNUSED;
- gt_pointer_operator new_value;
- void *cookie;
+resort_type_method_vec (void* obj,
+ void* orig_obj ATTRIBUTE_UNUSED ,
+ gt_pointer_operator new_value,
+ void* cookie)
{
tree method_vec = obj;
int len = TREE_VEC_LENGTH (method_vec);
search. */
static void
-finish_struct_methods (t)
- tree t;
+finish_struct_methods (tree t)
{
tree fn_fields;
tree method_vec;
/* Emit error when a duplicate definition of a type is seen. Patch up. */
void
-duplicate_tag_error (t)
- tree t;
+duplicate_tag_error (tree t)
{
error ("redefinition of `%#T'", t);
cp_error_at ("previous definition of `%#T'", t);
to lay it out. */
static void
-layout_vtable_decl (binfo, n)
- tree binfo;
- int n;
+layout_vtable_decl (tree binfo, int n)
{
tree atype;
tree vtable;
have the same signature. */
int
-same_signature_p (fndecl, base_fndecl)
- tree fndecl, base_fndecl;
+same_signature_p (tree fndecl, tree base_fndecl)
{
/* One destructor overrides another if they are the same kind of
destructor. */
/* Called from find_final_overrider via dfs_walk. */
static tree
-dfs_find_final_overrider (binfo, data)
- tree binfo;
- void *data;
+dfs_find_final_overrider (tree binfo, void* data)
{
find_final_overrider_data *ffod = (find_final_overrider_data *) data;
DERIVED) is the base object in which FN is declared. */
static tree
-find_final_overrider (derived, binfo, fn)
- tree derived;
- tree binfo;
- tree fn;
+find_final_overrider (tree derived, tree binfo, tree fn)
{
find_final_overrider_data ffod;
corresponding position in the BINFO_VIRTUALS list. */
static void
-update_vtable_entry_for_fn (t, binfo, fn, virtuals)
- tree t;
- tree binfo;
- tree fn;
- tree *virtuals;
+update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals)
{
tree b;
tree overrider;
/* Called from modify_all_vtables via dfs_walk. */
static tree
-dfs_modify_vtables (binfo, data)
- tree binfo;
- void *data;
+dfs_modify_vtables (tree binfo, void* data)
{
if (/* There's no need to modify the vtable for a non-virtual
primary base; we're not going to use that vtable anyhow.
should therefore be appended to the end of the vtable for T. */
static tree
-modify_all_vtables (t, virtuals)
- tree t;
- tree virtuals;
+modify_all_vtables (tree t, tree virtuals)
{
tree binfo = TYPE_BINFO (t);
tree *fnsp;
indicated NAME. */
static tree
-get_basefndecls (name, t)
- tree name, t;
+get_basefndecls (tree name, tree t)
{
tree methods;
tree base_fndecls = NULL_TREE;
mark this field as being virtual as well. */
static void
-check_for_override (decl, ctype)
- tree decl, ctype;
+check_for_override (tree decl, tree ctype)
{
if (TREE_CODE (decl) == TEMPLATE_DECL)
/* In [temp.mem] we have:
We know that constructors and destructors don't apply. */
void
-warn_hidden (t)
- tree t;
+warn_hidden (tree t)
{
tree method_vec = CLASSTYPE_METHOD_VEC (t);
int n_methods = method_vec ? TREE_VEC_LENGTH (method_vec) : 0;
things we should check for also. */
static void
-finish_struct_anon (t)
- tree t;
+finish_struct_anon (tree t)
{
tree field;
(FUNCTION_DECL, TEMPLATE_DECL). */
void
-maybe_add_class_template_decl_list (type, t, friend_p)
- tree type;
- tree t;
- int friend_p;
+maybe_add_class_template_decl_list (tree type, tree t, int friend_p)
{
/* Save some memory by not creating TREE_LIST if TYPE is not template. */
if (CLASSTYPE_TEMPLATE_INFO (type))
DECL is returned; otherwise the return value is NULL_TREE. */
static void
-add_implicitly_declared_members (t, cant_have_default_ctor,
- cant_have_const_cctor,
- cant_have_const_assignment)
- tree t;
- int cant_have_default_ctor;
- int cant_have_const_cctor;
- int cant_have_const_assignment;
+add_implicitly_declared_members (tree t,
+ int cant_have_default_ctor,
+ int cant_have_const_cctor,
+ int cant_have_const_assignment)
{
tree default_fn;
tree implicit_fns = NULL_TREE;
in TYPE, including anonymous union members. */
static int
-count_fields (fields)
- tree fields;
+count_fields (tree fields)
{
tree x;
int n_fields = 0;
TREE_LIST FIELDS to the TREE_VEC FIELD_VEC, starting at offset IDX. */
static int
-add_fields_to_vec (fields, field_vec, idx)
- tree fields, field_vec;
- int idx;
+add_fields_to_vec (tree fields, tree field_vec, int idx)
{
tree x;
for (x = fields; x; x = TREE_CHAIN (x))
flags. */
static void
-check_bitfield_decl (field)
- tree field;
+check_bitfield_decl (tree field)
{
tree type = TREE_TYPE (field);
tree w = NULL_TREE;
flags. */
static void
-check_field_decl (field, t, cant_have_const_ctor,
- cant_have_default_ctor, no_const_asn_ref,
- any_default_members)
- tree field;
- tree t;
- int *cant_have_const_ctor;
- int *cant_have_default_ctor;
- int *no_const_asn_ref;
- int *any_default_members;
+check_field_decl (tree field,
+ tree t,
+ int* cant_have_const_ctor,
+ int* cant_have_default_ctor,
+ int* no_const_asn_ref,
+ int* any_default_members)
{
tree type = strip_array_types (TREE_TYPE (field));
OFFSETS. */
static int
-record_subobject_offset (type, offset, offsets)
- tree type;
- tree offset;
- splay_tree offsets;
+record_subobject_offset (tree type, tree offset, splay_tree offsets)
{
splay_tree_node n;
already an entry in OFFSETS for the same TYPE as the same OFFSET. */
static int
-check_subobject_offset (type, offset, offsets)
- tree type;
- tree offset;
- splay_tree offsets;
+check_subobject_offset (tree type, tree offset, splay_tree offsets)
{
splay_tree_node n;
tree t;
is returned. Otherwise, returns zero. */
static int
-walk_subobject_offsets (type, f, offset, offsets, max_offset, vbases_p)
- tree type;
- subobject_offset_fn f;
- tree offset;
- splay_tree offsets;
- tree max_offset;
- int vbases_p;
+walk_subobject_offsets (tree type,
+ subobject_offset_fn f,
+ tree offset,
+ splay_tree offsets,
+ tree max_offset,
+ int vbases_p)
{
int r = 0;
tree type_binfo = NULL_TREE;
examined. */
static void
-record_subobject_offsets (type, offset, offsets, vbases_p)
- tree type;
- tree offset;
- splay_tree offsets;
- int vbases_p;
+record_subobject_offsets (tree type,
+ tree offset,
+ splay_tree offsets,
+ int vbases_p)
{
walk_subobject_offsets (type, record_subobject_offset, offset,
offsets, /*max_offset=*/NULL_TREE, vbases_p);
virtual bases of TYPE are examined. */
static int
-layout_conflict_p (type, offset, offsets, vbases_p)
- tree type;
- tree offset;
- splay_tree offsets;
- int vbases_p;
+layout_conflict_p (tree type,
+ tree offset,
+ splay_tree offsets,
+ int vbases_p)
{
splay_tree_node max_node;
type. Return nonzero iff we added it at the end. */
static bool
-layout_empty_base (binfo, eoc, offsets, t)
- tree binfo;
- tree eoc;
- splay_tree offsets;
- tree t;
+layout_empty_base (tree binfo, tree eoc, splay_tree offsets, tree t)
{
tree alignment;
tree basetype = BINFO_TYPE (binfo);
methods, and so forth. */
static void
-check_methods (t)
- tree t;
+check_methods (tree t)
{
tree x;
NAME. */
static tree
-build_clone (fn, name)
- tree fn;
- tree name;
+build_clone (tree fn, tree name)
{
tree parms;
tree clone;
CLASTYPE_METHOD_VEC as well. */
void
-clone_function_decl (fn, update_method_vec_p)
- tree fn;
- int update_method_vec_p;
+clone_function_decl (tree fn, int update_method_vec_p)
{
tree clone;
clones. */
void
-adjust_clone_args (decl)
- tree decl;
+adjust_clone_args (tree decl)
{
tree clone;
in-charge and not-in-charge variant. */
static void
-clone_constructors_and_destructors (t)
- tree t;
+clone_constructors_and_destructors (tree t)
{
tree fns;
/* Remove all zero-width bit-fields from T. */
static void
-remove_zero_width_bit_fields (t)
- tree t;
+remove_zero_width_bit_fields (tree t)
{
tree *fieldsp;
array whose elements have the indicated class TYPE. */
static bool
-type_requires_array_cookie (type)
- tree type;
+type_requires_array_cookie (tree type)
{
tree fns;
bool has_two_argument_delete_p = false;
on VIRTUALS_P. */
static tree
-create_vtable_ptr (t, virtuals_p)
- tree t;
- tree *virtuals_p;
+create_vtable_ptr (tree t, tree* virtuals_p)
{
tree fn;
complete. */
static void
-fixup_pending_inline (fn)
- tree fn;
+fixup_pending_inline (tree fn)
{
if (DECL_PENDING_INLINE_INFO (fn))
{
complete. */
static void
-fixup_inline_methods (type)
- tree type;
+fixup_inline_methods (tree type)
{
tree method = TYPE_METHODS (type);
OFFSET, which is a type offset, is number of bytes. */
static void
-propagate_binfo_offsets (binfo, offset, t)
- tree binfo;
- tree offset;
- tree t;
+propagate_binfo_offsets (tree binfo, tree offset, tree t)
{
int i;
tree primary_binfo;
/* Called via dfs_walk from layout_virtual bases. */
static tree
-dfs_set_offset_for_unshared_vbases (binfo, data)
- tree binfo;
- void *data;
+dfs_set_offset_for_unshared_vbases (tree binfo, void* data)
{
/* If this is a virtual base, make sure it has the same offset as
the shared copy. If it's a primary base, then we know it's
only non-virtual bases are included. */
static tree
-end_of_class (t, include_virtuals_p)
- tree t;
- int include_virtuals_p;
+end_of_class (tree t, int include_virtuals_p)
{
tree result = size_zero_node;
tree binfo;
subobjects of U. */
static void
-warn_about_ambiguous_bases (t)
- tree t;
+warn_about_ambiguous_bases (tree t)
{
int i;
tree vbases;
/* Compare two INTEGER_CSTs K1 and K2. */
static int
-splay_tree_compare_integer_csts (k1, k2)
- splay_tree_key k1;
- splay_tree_key k2;
+splay_tree_compare_integer_csts (splay_tree_key k1, splay_tree_key k2)
{
return tree_int_cst_compare ((tree) k1, (tree) k2);
}
is complete. */
void
-finish_struct_1 (t)
- tree t;
+finish_struct_1 (tree t)
{
tree x;
/* A TREE_LIST. The TREE_VALUE of each node is a FUNCTION_DECL. */
order. Rearrange them to declaration order. */
void
-unreverse_member_declarations (t)
- tree t;
+unreverse_member_declarations (tree t)
{
tree next;
tree prev;
}
tree
-finish_struct (t, attributes)
- tree t, attributes;
+finish_struct (tree t, tree attributes)
{
const char *saved_filename = input_filename;
int saved_lineno = lineno;
before this function is called. */
static tree
-fixed_type_or_null (instance, nonnull, cdtorp)
- tree instance;
- int *nonnull;
- int *cdtorp;
+fixed_type_or_null (tree instance, int* nonnull, int* cdtorp)
{
switch (TREE_CODE (instance))
{
before this function is called. */
int
-resolves_to_fixed_type_p (instance, nonnull)
- tree instance;
- int *nonnull;
+resolves_to_fixed_type_p (tree instance, int* nonnull)
{
tree t = TREE_TYPE (instance);
int cdtorp = 0;
\f
void
-init_class_processing ()
+init_class_processing (void)
{
current_class_depth = 0;
current_class_stack_size = 10;
that name becomes `error_mark_node'. */
void
-pushclass (type, modify)
- tree type;
- int modify;
+pushclass (tree type, int modify)
{
type = TYPE_MAIN_VARIANT (type);
must invalidate our cache. */
void
-invalidate_class_lookup_cache ()
+invalidate_class_lookup_cache (void)
{
tree t;
previously, that is the one popped to. */
void
-popclass ()
+popclass (void)
{
poplevel_class ();
pop_class_decls ();
no type. */
int
-currently_open_class (t)
- tree t;
+currently_open_class (tree t)
{
int i;
if (t == current_class_type)
something via unqualified lookup. */
tree
-currently_open_derived_class (t)
- tree t;
+currently_open_derived_class (tree t)
{
int i;
formal of the same name. */
void
-push_nested_class (type, modify)
- tree type;
- int modify;
+push_nested_class (tree type, int modify)
{
tree context;
/* Undoes a push_nested_class call. */
void
-pop_nested_class ()
+pop_nested_class (void)
{
tree context = DECL_CONTEXT (TYPE_MAIN_DECL (current_class_type));
/* Returns the number of extern "LANG" blocks we are nested within. */
int
-current_lang_depth ()
+current_lang_depth (void)
{
return VARRAY_ACTIVE_SIZE (current_lang_base);
}
so that behavior of name-mangling machinery is correct. */
void
-push_lang_context (name)
- tree name;
+push_lang_context (tree name)
{
VARRAY_PUSH_TREE (current_lang_base, current_lang_name);
/* Get out of the current language scope. */
void
-pop_lang_context ()
+pop_lang_context (void)
{
current_lang_name = VARRAY_TOP_TREE (current_lang_base);
VARRAY_POP (current_lang_base);
template arguments. */
static tree
-resolve_address_of_overloaded_function (target_type,
- overload,
- complain,
- ptrmem,
- template_only,
- explicit_targs)
- tree target_type;
- tree overload;
- int complain;
- int ptrmem;
- int template_only;
- tree explicit_targs;
+resolve_address_of_overloaded_function (tree target_type,
+ tree overload,
+ int complain,
+ int ptrmem,
+ int template_only,
+ tree explicit_targs)
{
/* Here's what the standard says:
function, or a pointer to member function. */
tree
-instantiate_type (lhstype, rhs, flags)
- tree lhstype, rhs;
- tsubst_flags_t flags;
+instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags)
{
int complain = (flags & tf_error);
int strict = (flags & tf_no_attributes)
all be the same name. Who knows for multiple inheritance). */
static tree
-get_vfield_name (type)
- tree type;
+get_vfield_name (tree type)
{
tree binfo = TYPE_BINFO (type);
char *buf;
}
void
-print_class_statistics ()
+print_class_statistics (void)
{
#ifdef GATHER_STATISTICS
fprintf (stderr, "convert_harshness = %d\n", n_convert_harshness);
the inserted class name is treated as if it were a public member name. */
void
-build_self_reference ()
+build_self_reference (void)
{
tree name = constructor_name (current_class_type);
tree value = build_lang_decl (TYPE_DECL, name, current_class_type);
/* Returns 1 if TYPE contains only padding bytes. */
int
-is_empty_class (type)
- tree type;
+is_empty_class (tree type)
{
if (type == error_mark_node)
return 0;
a *_TYPE node. NODE can also be a local class. */
tree
-get_enclosing_class (type)
- tree type;
+get_enclosing_class (tree type)
{
tree node = type;
/* Return 1 if TYPE or one of its enclosing classes is derived from BASE. */
int
-is_base_of_enclosing_class (base, type)
- tree base, type;
+is_base_of_enclosing_class (tree base, tree type)
{
while (type)
{
defined and that the result of that lookup was DECL. */
void
-maybe_note_name_used_in_class (name, decl)
- tree name;
- tree decl;
+maybe_note_name_used_in_class (tree name, tree decl)
{
splay_tree names_used;
to see that the declaration is valid. */
void
-note_name_declared_in_class (name, decl)
- tree name;
- tree decl;
+note_name_declared_in_class (tree name, tree decl)
{
splay_tree names_used;
splay_tree_node n;
will return the VAR_DECL for the primary vtable. */
tree
-get_vtbl_decl_for_binfo (binfo)
- tree binfo;
+get_vtbl_decl_for_binfo (tree binfo)
{
tree decl;
who's TREE_VALUE is a list of candidate binfos that we fill in. */
static tree
-dfs_get_primary_binfo (binfo, data)
- tree binfo;
- void *data;
+dfs_get_primary_binfo (tree binfo, void* data)
{
tree cons = (tree) data;
tree primary_base = TREE_PURPOSE (cons);
object. Check BINFO_PRIMARY_P to be sure. */
tree
-get_primary_binfo (binfo)
- tree binfo;
+get_primary_binfo (tree binfo)
{
tree primary_base;
tree result = NULL_TREE;
/* If INDENTED_P is zero, indent to INDENT. Return nonzero. */
static int
-maybe_indent_hierarchy (stream, indent, indented_p)
- FILE *stream;
- int indent;
- int indented_p;
+maybe_indent_hierarchy (FILE * stream, int indent, int indented_p)
{
if (!indented_p)
fprintf (stream, "%*s", indent, "");
the top level; it is incremented recursively. */
static void
-dump_class_hierarchy_r (stream, flags, t, binfo, indent)
- FILE *stream;
- int flags;
- tree t;
- tree binfo;
- int indent;
+dump_class_hierarchy_r (FILE * stream,
+ int flags,
+ tree t,
+ tree binfo,
+ int indent)
{
int i;
int indented = 0;
/* Dump the BINFO hierarchy for T. */
static void
-dump_class_hierarchy (t)
- tree t;
+dump_class_hierarchy (tree t)
{
int flags;
FILE *stream = dump_begin (TDI_class, &flags);
}
static void
-dump_array (stream, decl)
- FILE *stream;
- tree decl;
+dump_array (FILE * stream, tree decl)
{
tree inits;
int ix;
}
static void
-dump_vtable (t, binfo, vtable)
- tree t;
- tree binfo;
- tree vtable;
+dump_vtable (tree t, tree binfo, tree vtable)
{
int flags;
FILE *stream = dump_begin (TDI_class, &flags);
}
static void
-dump_vtt (t, vtt)
- tree t;
- tree vtt;
+dump_vtt (tree t, tree vtt)
{
int flags;
FILE *stream = dump_begin (TDI_class, &flags);
/* Create all the necessary vtables for T and its base classes. */
static void
-finish_vtbls (t)
- tree t;
+finish_vtbls (tree t)
{
tree list;
tree vbase;
/* Initialize the vtable for BINFO with the INITS. */
static void
-initialize_vtable (binfo, inits)
- tree binfo;
- tree inits;
+initialize_vtable (tree binfo, tree inits)
{
tree decl;
the INITS. */
static void
-initialize_array (decl, inits)
- tree decl;
- tree inits;
+initialize_array (tree decl, tree inits)
{
tree context;
Secondary VTTs look like complete object VTTs without part 4. */
static void
-build_vtt (t)
- tree t;
+build_vtt (tree t)
{
tree inits;
tree type;
BINFO. */
static tree
-get_original_base (base_binfo, binfo)
- tree base_binfo;
- tree binfo;
+get_original_base (tree base_binfo, tree binfo)
{
tree derived;
int ix;
complete. VALUE can also be another BINFO, in which case we recurse. */
static tree
-binfo_ctor_vtable (binfo)
- tree binfo;
+binfo_ctor_vtable (tree binfo)
{
tree vt;
vtables for the BINFO-in-T variant. */
static tree *
-build_vtt_inits (binfo, t, inits, index)
- tree binfo;
- tree t;
- tree *inits;
- tree *index;
+build_vtt_inits (tree binfo, tree t, tree* inits, tree* index)
{
int i;
tree b;
TREE_TOP_LEVEL flag indicates that this is the primary VTT. */
static tree
-dfs_build_secondary_vptr_vtt_inits (binfo, data)
- tree binfo;
- void *data;
+dfs_build_secondary_vptr_vtt_inits (tree binfo, void* data)
{
tree l;
tree t;
hierarchy. */
static tree
-dfs_ctor_vtable_bases_queue_p (binfo, data)
- tree binfo;
- void *data;
+dfs_ctor_vtable_bases_queue_p (tree binfo, void* data)
{
if (TREE_VIA_VIRTUAL (binfo))
/* Get the shared version. */
TREE_VALUE is the TREE_TYPE of the base whose sub vtt was generated. */
static tree
-dfs_fixup_binfo_vtbls (binfo, data)
- tree binfo;
- void *data;
+dfs_fixup_binfo_vtbls (tree binfo, void* data)
{
CLEAR_BINFO_MARKED (binfo);
hierarchy dominated by T. */
static void
-build_ctor_vtbl_group (binfo, t)
- tree binfo;
- tree t;
+build_ctor_vtbl_group (tree binfo, tree t)
{
tree list;
tree type;
but are not necessarily the same in terms of layout. */
static void
-accumulate_vtbl_inits (binfo, orig_binfo, rtti_binfo, t, inits)
- tree binfo;
- tree orig_binfo;
- tree rtti_binfo;
- tree t;
- tree inits;
+accumulate_vtbl_inits (tree binfo,
+ tree orig_binfo,
+ tree rtti_binfo,
+ tree t,
+ tree inits)
{
int i;
int ctor_vtbl_p = !same_type_p (BINFO_TYPE (rtti_binfo), t);
the BINFO vtable. */
static tree
-dfs_accumulate_vtbl_inits (binfo, orig_binfo, rtti_binfo, t, l)
- tree binfo;
- tree orig_binfo;
- tree rtti_binfo;
- tree t;
- tree l;
+dfs_accumulate_vtbl_inits (tree binfo,
+ tree orig_binfo,
+ tree rtti_binfo,
+ tree t,
+ tree l)
{
tree inits = NULL_TREE;
tree vtbl = NULL_TREE;
constructed. */
static tree
-build_vtbl_initializer (binfo, orig_binfo, t, rtti_binfo, non_fn_entries_p)
- tree binfo;
- tree orig_binfo;
- tree t;
- tree rtti_binfo;
- int *non_fn_entries_p;
+build_vtbl_initializer (tree binfo,
+ tree orig_binfo,
+ tree t,
+ tree rtti_binfo,
+ int* non_fn_entries_p)
{
tree v, b;
tree vfun_inits;
offsets in BINFO, which is in the hierarchy dominated by T. */
static void
-build_vcall_and_vbase_vtbl_entries (binfo, vid)
- tree binfo;
- vtbl_init_data *vid;
+build_vcall_and_vbase_vtbl_entries (tree binfo, vtbl_init_data* vid)
{
tree b;
where the next vbase offset will go. */
static void
-build_vbase_offset_vtbl_entries (binfo, vid)
- tree binfo;
- vtbl_init_data *vid;
+build_vbase_offset_vtbl_entries (tree binfo, vtbl_init_data* vid)
{
tree vbase;
tree t;
to VID->INITS. */
static void
-build_vcall_offset_vtbl_entries (binfo, vid)
- tree binfo;
- vtbl_init_data *vid;
+build_vcall_offset_vtbl_entries (tree binfo, vtbl_init_data* vid)
{
/* We only need these entries if this base is a virtual base. We
compute the indices -- but do not add to the vtable -- when
/* Build vcall offsets, starting with those for BINFO. */
static void
-add_vcall_offset_vtbl_entries_r (binfo, vid)
- tree binfo;
- vtbl_init_data *vid;
+add_vcall_offset_vtbl_entries_r (tree binfo, vtbl_init_data* vid)
{
int i;
tree primary_binfo;
/* Called from build_vcall_offset_vtbl_entries_r. */
static void
-add_vcall_offset_vtbl_entries_1 (binfo, vid)
- tree binfo;
- vtbl_init_data* vid;
+add_vcall_offset_vtbl_entries_1 (tree binfo, vtbl_init_data* vid)
{
/* Make entries for the rest of the virtuals. */
if (abi_version_at_least (2))
by VID->rtti_binfo. */
static void
-build_rtti_vtbl_entries (binfo, vid)
- tree binfo;
- vtbl_init_data *vid;
+build_rtti_vtbl_entries (tree binfo, vtbl_init_data* vid)
{
tree b;
tree t;
/* Prototypes. */
static cp_lexer *cp_lexer_new_main
- PARAMS ((void));
+ (void);
static cp_lexer *cp_lexer_new_from_tokens
- PARAMS ((struct cp_token_cache *));
+ (struct cp_token_cache *);
static int cp_lexer_saving_tokens
- PARAMS ((const cp_lexer *));
+ (const cp_lexer *);
static cp_token *cp_lexer_next_token
- PARAMS ((cp_lexer *, cp_token *));
-static ptrdiff_t cp_lexer_token_difference
- PARAMS ((cp_lexer *, cp_token *, cp_token *));
+ (cp_lexer *, cp_token *);
+static ptrdiff_t cp_lexer_token_difference
+ (cp_lexer *, cp_token *, cp_token *);
static cp_token *cp_lexer_read_token
- PARAMS ((cp_lexer *));
+ (cp_lexer *);
static void cp_lexer_maybe_grow_buffer
- PARAMS ((cp_lexer *));
+ (cp_lexer *);
static void cp_lexer_get_preprocessor_token
- PARAMS ((cp_lexer *, cp_token *));
+ (cp_lexer *, cp_token *);
static cp_token *cp_lexer_peek_token
- PARAMS ((cp_lexer *));
+ (cp_lexer *);
static cp_token *cp_lexer_peek_nth_token
- PARAMS ((cp_lexer *, size_t));
+ (cp_lexer *, size_t);
static inline bool cp_lexer_next_token_is
- PARAMS ((cp_lexer *, enum cpp_ttype));
+ (cp_lexer *, enum cpp_ttype);
static bool cp_lexer_next_token_is_not
- PARAMS ((cp_lexer *, enum cpp_ttype));
+ (cp_lexer *, enum cpp_ttype);
static bool cp_lexer_next_token_is_keyword
- PARAMS ((cp_lexer *, enum rid));
-static cp_token *cp_lexer_consume_token
- PARAMS ((cp_lexer *));
+ (cp_lexer *, enum rid);
+static cp_token *cp_lexer_consume_token
+ (cp_lexer *);
static void cp_lexer_purge_token
(cp_lexer *);
static void cp_lexer_purge_tokens_after
(cp_lexer *, cp_token *);
static void cp_lexer_save_tokens
- PARAMS ((cp_lexer *));
+ (cp_lexer *);
static void cp_lexer_commit_tokens
- PARAMS ((cp_lexer *));
+ (cp_lexer *);
static void cp_lexer_rollback_tokens
- PARAMS ((cp_lexer *));
+ (cp_lexer *);
static inline void cp_lexer_set_source_position_from_token
- PARAMS ((cp_lexer *, const cp_token *));
+ (cp_lexer *, const cp_token *);
static void cp_lexer_print_token
- PARAMS ((FILE *, cp_token *));
+ (FILE *, cp_token *);
static inline bool cp_lexer_debugging_p
- PARAMS ((cp_lexer *));
+ (cp_lexer *);
static void cp_lexer_start_debugging
- PARAMS ((cp_lexer *)) ATTRIBUTE_UNUSED;
+ (cp_lexer *) ATTRIBUTE_UNUSED;
static void cp_lexer_stop_debugging
- PARAMS ((cp_lexer *)) ATTRIBUTE_UNUSED;
+ (cp_lexer *) ATTRIBUTE_UNUSED;
/* Manifest constants. */
TOKEN. */
static inline void
-cp_lexer_set_source_position_from_token (lexer, token)
- cp_lexer *lexer ATTRIBUTE_UNUSED;
- const cp_token *token;
+cp_lexer_set_source_position_from_token (cp_lexer *lexer ATTRIBUTE_UNUSED ,
+ const cp_token *token)
{
/* Ideally, the source position information would not be a global
variable, but it is. */
the next token in the buffer. */
static inline cp_token *
-cp_lexer_next_token (lexer, token)
- cp_lexer *lexer;
- cp_token *token;
+cp_lexer_next_token (cp_lexer* lexer, cp_token* token)
{
token++;
if (token == lexer->buffer_end)
/* Non-zero if we are presently saving tokens. */
static int
-cp_lexer_saving_tokens (lexer)
- const cp_lexer *lexer;
+cp_lexer_saving_tokens (const cp_lexer* lexer)
{
return VARRAY_ACTIVE_SIZE (lexer->saved_tokens) != 0;
}
to reach FINISH. If START and FINISH are the same, returns zero. */
static ptrdiff_t
-cp_lexer_token_difference (lexer, start, finish)
- cp_lexer *lexer;
- cp_token *start;
- cp_token *finish;
+cp_lexer_token_difference (cp_lexer* lexer, cp_token* start, cp_token* finish)
{
if (finish >= start)
return finish - start;
token buffer. Returns the newly read token. */
static cp_token *
-cp_lexer_read_token (lexer)
- cp_lexer *lexer;
+cp_lexer_read_token (cp_lexer* lexer)
{
cp_token *token;
/* If the circular buffer is full, make it bigger. */
static void
-cp_lexer_maybe_grow_buffer (lexer)
- cp_lexer *lexer;
+cp_lexer_maybe_grow_buffer (cp_lexer* lexer)
{
/* If the buffer is full, enlarge it. */
if (lexer->last_token == lexer->first_token)
/* Store the next token from the preprocessor in *TOKEN. */
static void
-cp_lexer_get_preprocessor_token (lexer, token)
- cp_lexer *lexer ATTRIBUTE_UNUSED;
- cp_token *token;
+cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED ,
+ cp_token *token)
{
bool done;
consume it. */
static cp_token *
-cp_lexer_peek_token (lexer)
- cp_lexer *lexer;
+cp_lexer_peek_token (cp_lexer* lexer)
{
cp_token *token;
/* Return true if the next token has the indicated TYPE. */
static bool
-cp_lexer_next_token_is (lexer, type)
- cp_lexer *lexer;
- enum cpp_ttype type;
+cp_lexer_next_token_is (cp_lexer* lexer, enum cpp_ttype type)
{
cp_token *token;
/* Return true if the next token does not have the indicated TYPE. */
static bool
-cp_lexer_next_token_is_not (lexer, type)
- cp_lexer *lexer;
- enum cpp_ttype type;
+cp_lexer_next_token_is_not (cp_lexer* lexer, enum cpp_ttype type)
{
return !cp_lexer_next_token_is (lexer, type);
}
/* Return true if the next token is the indicated KEYWORD. */
static bool
-cp_lexer_next_token_is_keyword (lexer, keyword)
- cp_lexer *lexer;
- enum rid keyword;
+cp_lexer_next_token_is_keyword (cp_lexer* lexer, enum rid keyword)
{
cp_token *token;
then this is precisely equivalent to cp_lexer_peek_token. */
static cp_token *
-cp_lexer_peek_nth_token (lexer, n)
- cp_lexer *lexer;
- size_t n;
+cp_lexer_peek_nth_token (cp_lexer* lexer, size_t n)
{
cp_token *token;
time. */
static cp_token *
-cp_lexer_consume_token (lexer)
- cp_lexer *lexer;
+cp_lexer_consume_token (cp_lexer* lexer)
{
cp_token *token;
preserved. */
static void
-cp_lexer_save_tokens (lexer)
- cp_lexer *lexer;
+cp_lexer_save_tokens (cp_lexer* lexer)
{
/* Provide debugging output. */
if (cp_lexer_debugging_p (lexer))
/* Commit to the portion of the token stream most recently saved. */
static void
-cp_lexer_commit_tokens (lexer)
- cp_lexer *lexer;
+cp_lexer_commit_tokens (cp_lexer* lexer)
{
/* Provide debugging output. */
if (cp_lexer_debugging_p (lexer))
to the token stream. Stop saving tokens. */
static void
-cp_lexer_rollback_tokens (lexer)
- cp_lexer *lexer;
+cp_lexer_rollback_tokens (cp_lexer* lexer)
{
size_t delta;
/* Print a representation of the TOKEN on the STREAM. */
static void
-cp_lexer_print_token (stream, token)
- FILE *stream;
- cp_token *token;
+cp_lexer_print_token (FILE * stream, cp_token* token)
{
const char *token_type = NULL;
/* Start emitting debugging information. */
static void
-cp_lexer_start_debugging (lexer)
- cp_lexer *lexer;
+cp_lexer_start_debugging (cp_lexer* lexer)
{
++lexer->debugging_p;
}
/* Stop emitting debugging information. */
static void
-cp_lexer_stop_debugging (lexer)
- cp_lexer *lexer;
+cp_lexer_stop_debugging (cp_lexer* lexer)
{
--lexer->debugging_p;
}
/* Constructors and destructors. */
static cp_parser_context *cp_parser_context_new
- PARAMS ((cp_parser_context *));
+ (cp_parser_context *);
/* Class variables. */
is given by NEXT. */
static cp_parser_context *
-cp_parser_context_new (next)
- cp_parser_context *next;
+cp_parser_context_new (cp_parser_context* next)
{
cp_parser_context *context;
} cp_parser;
/* The type of a function that parses some kind of expression */
-typedef tree (*cp_parser_expression_fn) PARAMS ((cp_parser *));
+typedef tree (*cp_parser_expression_fn) (cp_parser *);
/* Prototypes. */
/* Constructors and destructors. */
static cp_parser *cp_parser_new
- PARAMS ((void));
+ (void);
/* Routines to parse various constructs.
/* Lexical conventions [gram.lex] */
static tree cp_parser_identifier
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Basic concepts [gram.basic] */
static bool cp_parser_translation_unit
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Expressions [gram.expr] */
static tree cp_parser_primary_expression
(cp_parser *, cp_parser_id_kind *, tree *);
static tree cp_parser_id_expression
- PARAMS ((cp_parser *, bool, bool, bool *));
+ (cp_parser *, bool, bool, bool *);
static tree cp_parser_unqualified_id
- PARAMS ((cp_parser *, bool, bool));
+ (cp_parser *, bool, bool);
static tree cp_parser_nested_name_specifier_opt
(cp_parser *, bool, bool, bool);
static tree cp_parser_nested_name_specifier
static tree cp_parser_postfix_expression
(cp_parser *, bool);
static tree cp_parser_expression_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_pseudo_destructor_name
- PARAMS ((cp_parser *, tree *, tree *));
+ (cp_parser *, tree *, tree *);
static tree cp_parser_unary_expression
(cp_parser *, bool);
static enum tree_code cp_parser_unary_operator
- PARAMS ((cp_token *));
+ (cp_token *);
static tree cp_parser_new_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_new_placement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_new_type_id
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_new_declarator_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_direct_new_declarator
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_new_initializer
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_delete_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_cast_expression
(cp_parser *, bool);
static tree cp_parser_pm_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_multiplicative_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_additive_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_shift_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_relational_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_equality_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_and_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_exclusive_or_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_inclusive_or_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_logical_and_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_logical_or_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_conditional_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_question_colon_clause
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static tree cp_parser_assignment_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static enum tree_code cp_parser_assignment_operator_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_constant_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Statements [gram.stmt.stmt] */
static void cp_parser_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_labeled_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_expression_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_compound_statement
(cp_parser *);
static void cp_parser_statement_seq_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_selection_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_condition
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_iteration_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_for_init_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_jump_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_declaration_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_implicitly_scoped_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_already_scoped_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Declarations [gram.dcl.dcl] */
static void cp_parser_declaration_seq_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_declaration
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_block_declaration
- PARAMS ((cp_parser *, bool));
+ (cp_parser *, bool);
static void cp_parser_simple_declaration
- PARAMS ((cp_parser *, bool));
+ (cp_parser *, bool);
static tree cp_parser_decl_specifier_seq
- PARAMS ((cp_parser *, cp_parser_flags, tree *, bool *));
+ (cp_parser *, cp_parser_flags, tree *, bool *);
static tree cp_parser_storage_class_specifier_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_function_specifier_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_type_specifier
- (cp_parser *, cp_parser_flags, bool, bool, bool *, bool *);
+ (cp_parser *, cp_parser_flags, bool, bool, bool *, bool *);
static tree cp_parser_simple_type_specifier
- PARAMS ((cp_parser *, cp_parser_flags));
+ (cp_parser *, cp_parser_flags);
static tree cp_parser_type_name
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_elaborated_type_specifier
- PARAMS ((cp_parser *, bool, bool));
+ (cp_parser *, bool, bool);
static tree cp_parser_enum_specifier
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_enumerator_list
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static void cp_parser_enumerator_definition
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static tree cp_parser_namespace_name
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_namespace_definition
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_namespace_body
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_qualified_namespace_specifier
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_namespace_alias_definition
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_using_declaration
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_using_directive
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_asm_definition
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_linkage_specification
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Declarators [gram.dcl.decl] */
static tree cp_parser_init_declarator
- PARAMS ((cp_parser *, tree, tree, bool, bool, bool *));
+ (cp_parser *, tree, tree, bool, bool, bool *);
static tree cp_parser_declarator
- PARAMS ((cp_parser *, cp_parser_declarator_kind, bool *));
+ (cp_parser *, cp_parser_declarator_kind, bool *);
static tree cp_parser_direct_declarator
- PARAMS ((cp_parser *, cp_parser_declarator_kind, bool *));
+ (cp_parser *, cp_parser_declarator_kind, bool *);
static enum tree_code cp_parser_ptr_operator
- PARAMS ((cp_parser *, tree *, tree *));
+ (cp_parser *, tree *, tree *);
static tree cp_parser_cv_qualifier_seq_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_cv_qualifier_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_declarator_id
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_type_id
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_type_specifier_seq
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_parameter_declaration_clause
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_parameter_declaration_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_parameter_declaration
- PARAMS ((cp_parser *, bool));
+ (cp_parser *, bool);
static tree cp_parser_function_definition
- PARAMS ((cp_parser *, bool *));
+ (cp_parser *, bool *);
static void cp_parser_function_body
(cp_parser *);
static tree cp_parser_initializer
- PARAMS ((cp_parser *, bool *));
+ (cp_parser *, bool *);
static tree cp_parser_initializer_clause
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_initializer_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_ctor_initializer_opt_and_function_body
(cp_parser *);
static tree cp_parser_class_name
(cp_parser *, bool, bool, bool, bool, bool, bool);
static tree cp_parser_class_specifier
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_class_head
- PARAMS ((cp_parser *, bool *));
+ (cp_parser *, bool *);
static enum tag_types cp_parser_class_key
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_member_specification_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_member_declaration
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_pure_specifier
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_constant_initializer
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Derived classes [gram.class.derived] */
static tree cp_parser_base_clause
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_base_specifier
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Special member functions [gram.special] */
static tree cp_parser_conversion_function_id
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_conversion_type_id
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_conversion_declarator_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_ctor_initializer_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_mem_initializer_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_mem_initializer
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_mem_initializer_id
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Overloading [gram.over] */
static tree cp_parser_operator_function_id
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_operator
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Templates [gram.temp] */
static void cp_parser_template_declaration
- PARAMS ((cp_parser *, bool));
+ (cp_parser *, bool);
static tree cp_parser_template_parameter_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_template_parameter
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_type_parameter
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_template_id
- PARAMS ((cp_parser *, bool, bool));
+ (cp_parser *, bool, bool);
static tree cp_parser_template_name
- PARAMS ((cp_parser *, bool, bool));
+ (cp_parser *, bool, bool);
static tree cp_parser_template_argument_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_template_argument
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_explicit_instantiation
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_explicit_specialization
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Exception handling [gram.exception] */
static tree cp_parser_try_block
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_function_try_block
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_handler_seq
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_handler
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_exception_declaration
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_throw_expression
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_exception_specification_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_type_id_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* GNU Extensions */
static tree cp_parser_asm_specification_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_asm_operand_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_asm_clobber_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_attributes_opt
- PARAMS ((cp_parser *));
+ (cp_parser *);
static tree cp_parser_attribute_list
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_extension_opt
- PARAMS ((cp_parser *, int *));
+ (cp_parser *, int *);
static void cp_parser_label_declaration
- PARAMS ((cp_parser *));
+ (cp_parser *);
/* Utility Routines */
static tree cp_parser_lookup_name
- PARAMS ((cp_parser *, tree, bool, bool, bool, bool));
+ (cp_parser *, tree, bool, bool, bool, bool);
static tree cp_parser_lookup_name_simple
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static tree cp_parser_resolve_typename_type
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static tree cp_parser_maybe_treat_template_as_class
(tree, bool);
static bool cp_parser_check_declarator_template_parameters
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static bool cp_parser_check_template_parameters
- PARAMS ((cp_parser *, unsigned));
+ (cp_parser *, unsigned);
static tree cp_parser_binary_expression
- PARAMS ((cp_parser *,
- const cp_parser_token_tree_map,
- cp_parser_expression_fn));
+ (cp_parser *, const cp_parser_token_tree_map, cp_parser_expression_fn);
static tree cp_parser_global_scope_opt
- PARAMS ((cp_parser *, bool));
+ (cp_parser *, bool);
static bool cp_parser_constructor_declarator_p
(cp_parser *, bool);
static tree cp_parser_function_definition_from_specifiers_and_declarator
- PARAMS ((cp_parser *, tree, tree, tree));
+ (cp_parser *, tree, tree, tree);
static tree cp_parser_function_definition_after_declarator
- PARAMS ((cp_parser *, bool));
+ (cp_parser *, bool);
static void cp_parser_template_declaration_after_export
- PARAMS ((cp_parser *, bool));
+ (cp_parser *, bool);
static tree cp_parser_single_declaration
- PARAMS ((cp_parser *, bool, bool *));
+ (cp_parser *, bool, bool *);
static tree cp_parser_functional_cast
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static void cp_parser_late_parsing_for_member
- PARAMS ((cp_parser *, tree));
+ (cp_parser *, tree);
static void cp_parser_late_parsing_default_args
(cp_parser *, tree);
static tree cp_parser_sizeof_operand
- PARAMS ((cp_parser *, enum rid));
+ (cp_parser *, enum rid);
static bool cp_parser_declares_only_class_p
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_friend_p
- PARAMS ((tree));
+ (tree);
static cp_token *cp_parser_require
- PARAMS ((cp_parser *, enum cpp_ttype, const char *));
+ (cp_parser *, enum cpp_ttype, const char *);
static cp_token *cp_parser_require_keyword
- PARAMS ((cp_parser *, enum rid, const char *));
+ (cp_parser *, enum rid, const char *);
static bool cp_parser_token_starts_function_definition_p
- PARAMS ((cp_token *));
+ (cp_token *);
static bool cp_parser_next_token_starts_class_definition_p
(cp_parser *);
static enum tag_types cp_parser_token_is_class_key
- PARAMS ((cp_token *));
+ (cp_token *);
static void cp_parser_check_class_key
(enum tag_types, tree type);
static bool cp_parser_optional_template_keyword
static void cp_parser_cache_group
(cp_parser *, cp_token_cache *, enum cpp_ttype, unsigned);
static void cp_parser_parse_tentatively
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_commit_to_tentative_parse
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_abort_tentative_parse
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_parse_definitely
- PARAMS ((cp_parser *));
+ (cp_parser *);
static inline bool cp_parser_parsing_tentatively
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_committed_to_tentative_parse
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_error
- PARAMS ((cp_parser *, const char *));
+ (cp_parser *, const char *);
static bool cp_parser_simulate_error
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_check_type_definition
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_diagnose_invalid_type_name
(cp_parser *);
static bool cp_parser_skip_to_closing_parenthesis
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_skip_to_closing_parenthesis_or_comma
(cp_parser *);
static void cp_parser_skip_to_end_of_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_consume_semicolon_at_end_of_statement
(cp_parser *);
static void cp_parser_skip_to_end_of_block_or_statement
- PARAMS ((cp_parser *));
+ (cp_parser *);
static void cp_parser_skip_to_closing_brace
(cp_parser *);
static void cp_parser_skip_until_found
- PARAMS ((cp_parser *, enum cpp_ttype, const char *));
+ (cp_parser *, enum cpp_ttype, const char *);
static bool cp_parser_error_occurred
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_allow_gnu_extensions_p
- PARAMS ((cp_parser *));
+ (cp_parser *);
static bool cp_parser_is_string_literal
- PARAMS ((cp_token *));
+ (cp_token *);
static bool cp_parser_is_keyword
- PARAMS ((cp_token *, enum rid));
+ (cp_token *, enum rid);
static tree cp_parser_scope_through_which_access_occurs
(tree, tree, tree);
/* Returns non-zero if we are parsing tentatively. */
static inline bool
-cp_parser_parsing_tentatively (parser)
- cp_parser *parser;
+cp_parser_parsing_tentatively (cp_parser* parser)
{
return parser->context->next != NULL;
}
/* Returns non-zero if TOKEN is a string literal. */
static bool
-cp_parser_is_string_literal (token)
- cp_token *token;
+cp_parser_is_string_literal (cp_token* token)
{
return (token->type == CPP_STRING || token->type == CPP_WSTRING);
}
/* Returns non-zero if TOKEN is the indicated KEYWORD. */
static bool
-cp_parser_is_keyword (token, keyword)
- cp_token *token;
- enum rid keyword;
+cp_parser_is_keyword (cp_token* token, enum rid keyword)
{
return token->keyword == keyword;
}
NESTED_NAME_SPECIFIER is `A'. */
tree
-cp_parser_scope_through_which_access_occurs (decl,
- object_type,
- nested_name_specifier)
- tree decl;
- tree object_type;
- tree nested_name_specifier;
+cp_parser_scope_through_which_access_occurs (tree decl,
+ tree object_type,
+ tree nested_name_specifier)
{
tree scope;
tree qualifying_type = NULL_TREE;
/* Issue the indicated error MESSAGE. */
static void
-cp_parser_error (parser, message)
- cp_parser *parser;
- const char *message;
+cp_parser_error (cp_parser* parser, const char* message)
{
/* Output the MESSAGE -- unless we're parsing tentatively. */
if (!cp_parser_simulate_error (parser))
simulated; false if a messgae should be issued by the caller. */
static bool
-cp_parser_simulate_error (parser)
- cp_parser *parser;
+cp_parser_simulate_error (cp_parser* parser)
{
if (cp_parser_parsing_tentatively (parser)
&& !cp_parser_committed_to_tentative_parse (parser))
issued. */
static void
-cp_parser_check_type_definition (parser)
- cp_parser *parser;
+cp_parser_check_type_definition (cp_parser* parser)
{
/* If types are forbidden here, issue a message. */
if (parser->type_definition_forbidden_message)
non-nested `}' comes first, then we stop before consuming that. */
static void
-cp_parser_skip_to_end_of_statement (parser)
- cp_parser *parser;
+cp_parser_skip_to_end_of_statement (cp_parser* parser)
{
unsigned nesting_depth = 0;
have consumed a non-nested `;'. */
static void
-cp_parser_skip_to_end_of_block_or_statement (parser)
- cp_parser *parser;
+cp_parser_skip_to_end_of_block_or_statement (cp_parser* parser)
{
unsigned nesting_depth = 0;
/* Create a new C++ parser. */
static cp_parser *
-cp_parser_new ()
+cp_parser_new (void)
{
cp_parser *parser;
cp_lexer *lexer;
identifier. */
static tree
-cp_parser_identifier (parser)
- cp_parser *parser;
+cp_parser_identifier (cp_parser* parser)
{
cp_token *token;
Returns TRUE if all went well. */
static bool
-cp_parser_translation_unit (parser)
- cp_parser *parser;
+cp_parser_translation_unit (cp_parser* parser)
{
while (true)
{
names are looked up in uninstantiated templates. */
static tree
-cp_parser_unqualified_id (parser, template_keyword_p,
- check_dependency_p)
- cp_parser *parser;
- bool template_keyword_p;
- bool check_dependency_p;
+cp_parser_unqualified_id (cp_parser* parser,
+ bool template_keyword_p,
+ bool check_dependency_p)
{
cp_token *token;
is returned even if there is only a single expression in the list. */
static tree
-cp_parser_expression_list (parser)
- cp_parser *parser;
+cp_parser_expression_list (cp_parser* parser)
{
tree expression_list = NULL_TREE;
or ERROR_MARK_NODE if no type-name is present. */
static void
-cp_parser_pseudo_destructor_name (parser, scope, type)
- cp_parser *parser;
- tree *scope;
- tree *type;
+cp_parser_pseudo_destructor_name (cp_parser* parser,
+ tree* scope,
+ tree* type)
{
bool nested_name_specifier_p;
unary-operator, the corresponding tree code is returned. */
static enum tree_code
-cp_parser_unary_operator (token)
- cp_token *token;
+cp_parser_unary_operator (cp_token* token)
{
switch (token->type)
{
Returns a representation of the expression. */
static tree
-cp_parser_new_expression (parser)
- cp_parser *parser;
+cp_parser_new_expression (cp_parser* parser)
{
bool global_scope_p;
tree placement;
Returns the same representation as for an expression-list. */
static tree
-cp_parser_new_placement (parser)
- cp_parser *parser;
+cp_parser_new_placement (cp_parser* parser)
{
tree expression_list;
and whose TREE_VALUE is the new-declarator. */
static tree
-cp_parser_new_type_id (parser)
- cp_parser *parser;
+cp_parser_new_type_id (cp_parser* parser)
{
tree type_specifier_seq;
tree declarator;
cp_parser_declarator for the representations used. */
static tree
-cp_parser_new_declarator_opt (parser)
- cp_parser *parser;
+cp_parser_new_declarator_opt (cp_parser* parser)
{
enum tree_code code;
tree type;
documented for cp_parser_direct_declarator. */
static tree
-cp_parser_direct_new_declarator (parser)
- cp_parser *parser;
+cp_parser_direct_new_declarator (cp_parser* parser)
{
tree declarator = NULL_TREE;
expression-list, VOID_ZERO_NODE is returned. */
static tree
-cp_parser_new_initializer (parser)
- cp_parser *parser;
+cp_parser_new_initializer (cp_parser* parser)
{
tree expression_list;
Returns a representation of the expression. */
static tree
-cp_parser_delete_expression (parser)
- cp_parser *parser;
+cp_parser_delete_expression (cp_parser* parser)
{
bool global_scope_p;
bool array_p;
Returns a representation of the expression. */
static tree
-cp_parser_pm_expression (parser)
- cp_parser *parser;
+cp_parser_pm_expression (cp_parser* parser)
{
tree cast_expr;
tree pm_expr;
Returns a representation of the expression. */
static tree
-cp_parser_multiplicative_expression (parser)
- cp_parser *parser;
+cp_parser_multiplicative_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_MULT, MULT_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_additive_expression (parser)
- cp_parser *parser;
+cp_parser_additive_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_PLUS, PLUS_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_shift_expression (parser)
- cp_parser *parser;
+cp_parser_shift_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_LSHIFT, LSHIFT_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_relational_expression (parser)
- cp_parser *parser;
+cp_parser_relational_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_LESS, LT_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_equality_expression (parser)
- cp_parser *parser;
+cp_parser_equality_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_EQ_EQ, EQ_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_and_expression (parser)
- cp_parser *parser;
+cp_parser_and_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_AND, BIT_AND_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_exclusive_or_expression (parser)
- cp_parser *parser;
+cp_parser_exclusive_or_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_XOR, BIT_XOR_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_inclusive_or_expression (parser)
- cp_parser *parser;
+cp_parser_inclusive_or_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_OR, BIT_IOR_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_logical_and_expression (parser)
- cp_parser *parser;
+cp_parser_logical_and_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_AND_AND, TRUTH_ANDIF_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_logical_or_expression (parser)
- cp_parser *parser;
+cp_parser_logical_or_expression (cp_parser* parser)
{
static const cp_parser_token_tree_map map = {
{ CPP_OR_OR, TRUTH_ORIF_EXPR },
Returns a representation of the expression. */
static tree
-cp_parser_conditional_expression (parser)
- cp_parser *parser;
+cp_parser_conditional_expression (cp_parser* parser)
{
tree logical_or_expr;
? : assignment-expression */
static tree
-cp_parser_question_colon_clause (parser, logical_or_expr)
- cp_parser *parser;
- tree logical_or_expr;
+cp_parser_question_colon_clause (cp_parser* parser, tree logical_or_expr)
{
tree expr;
tree assignment_expr;
Returns a representation for the expression. */
static tree
-cp_parser_assignment_expression (parser)
- cp_parser *parser;
+cp_parser_assignment_expression (cp_parser* parser)
{
tree expr;
operator, ERROR_MARK is returned. */
static enum tree_code
-cp_parser_assignment_operator_opt (parser)
- cp_parser *parser;
+cp_parser_assignment_operator_opt (cp_parser* parser)
{
enum tree_code op;
cp_token *token;
Returns a representation of the expression. */
static tree
-cp_parser_expression (parser)
- cp_parser *parser;
+cp_parser_expression (cp_parser* parser)
{
tree expression = NULL_TREE;
bool saw_comma_p = false;
conditional-expression */
static tree
-cp_parser_constant_expression (parser)
- cp_parser *parser;
+cp_parser_constant_expression (cp_parser* parser)
{
bool saved_constant_expression_p;
tree expression;
try-block */
static void
-cp_parser_statement (parser)
- cp_parser *parser;
+cp_parser_statement (cp_parser* parser)
{
tree statement;
cp_token *token;
an ordinary label, returns a LABEL_STMT. */
static tree
-cp_parser_labeled_statement (parser)
- cp_parser *parser;
+cp_parser_labeled_statement (cp_parser* parser)
{
cp_token *token;
tree statement = NULL_TREE;
statement consists of nothing more than an `;'. */
static tree
-cp_parser_expression_statement (parser)
- cp_parser *parser;
+cp_parser_expression_statement (cp_parser* parser)
{
tree statement;
statement-seq [opt] statement */
static void
-cp_parser_statement_seq_opt (parser)
- cp_parser *parser;
+cp_parser_statement_seq_opt (cp_parser* parser)
{
/* Scan statements until there aren't any more. */
while (true)
Returns the new IF_STMT or SWITCH_STMT. */
static tree
-cp_parser_selection_statement (parser)
- cp_parser *parser;
+cp_parser_selection_statement (cp_parser* parser)
{
cp_token *token;
enum rid keyword;
Returns the expression that should be tested. */
static tree
-cp_parser_condition (parser)
- cp_parser *parser;
+cp_parser_condition (cp_parser* parser)
{
tree type_specifiers;
const char *saved_message;
Returns the new WHILE_STMT, DO_STMT, or FOR_STMT. */
static tree
-cp_parser_iteration_statement (parser)
- cp_parser *parser;
+cp_parser_iteration_statement (cp_parser* parser)
{
cp_token *token;
enum rid keyword;
simple-declaration */
static void
-cp_parser_for_init_statement (parser)
- cp_parser *parser;
+cp_parser_for_init_statement (cp_parser* parser)
{
/* If the next token is a `;', then we have an empty
expression-statement. Gramatically, this is also a
GOTO_STMT. */
static tree
-cp_parser_jump_statement (parser)
- cp_parser *parser;
+cp_parser_jump_statement (cp_parser* parser)
{
tree statement = error_mark_node;
cp_token *token;
block-declaration */
static void
-cp_parser_declaration_statement (parser)
- cp_parser *parser;
+cp_parser_declaration_statement (cp_parser* parser)
{
/* Parse the block-declaration. */
cp_parser_block_declaration (parser, /*statement_p=*/true);
Returns the new statement. */
static tree
-cp_parser_implicitly_scoped_statement (parser)
- cp_parser *parser;
+cp_parser_implicitly_scoped_statement (cp_parser* parser)
{
tree statement;
scope. */
static void
-cp_parser_already_scoped_statement (parser)
- cp_parser *parser;
+cp_parser_already_scoped_statement (cp_parser* parser)
{
/* If the token is not a `{', then we must take special action. */
if (cp_lexer_next_token_is_not(parser->lexer, CPP_OPEN_BRACE))
declaration-seq declaration */
static void
-cp_parser_declaration_seq_opt (parser)
- cp_parser *parser;
+cp_parser_declaration_seq_opt (cp_parser* parser)
{
while (true)
{
__extension__ declaration */
static void
-cp_parser_declaration (parser)
- cp_parser *parser;
+cp_parser_declaration (cp_parser* parser)
{
cp_token token1;
cp_token token2;
function-definition as a simple-declaration. */
static void
-cp_parser_simple_declaration (parser, function_definition_allowed_p)
- cp_parser *parser;
- bool function_definition_allowed_p;
+cp_parser_simple_declaration (cp_parser* parser,
+ bool function_definition_allowed_p)
{
tree decl_specifiers;
tree attributes;
friendship is granted might not be a class. */
static tree
-cp_parser_decl_specifier_seq (parser, flags, attributes,
- declares_class_or_enum)
- cp_parser *parser;
- cp_parser_flags flags;
- tree *attributes;
- bool *declares_class_or_enum;
+cp_parser_decl_specifier_seq (cp_parser* parser,
+ cp_parser_flags flags,
+ tree* attributes,
+ bool* declares_class_or_enum)
{
tree decl_specs = NULL_TREE;
bool friend_p = false;
Returns an IDENTIFIER_NODE corresponding to the keyword used. */
static tree
-cp_parser_storage_class_specifier_opt (parser)
- cp_parser *parser;
+cp_parser_storage_class_specifier_opt (cp_parser* parser)
{
switch (cp_lexer_peek_token (parser->lexer)->keyword)
{
Returns an IDENTIFIER_NODE corresponding to the keyword used. */
static tree
-cp_parser_function_specifier_opt (parser)
- cp_parser *parser;
+cp_parser_function_specifier_opt (cp_parser* parser)
{
switch (cp_lexer_peek_token (parser->lexer)->keyword)
{
extern string-literal declaration */
static void
-cp_parser_linkage_specification (parser)
- cp_parser *parser;
+cp_parser_linkage_specification (cp_parser* parser)
{
cp_token *token;
tree linkage;
Returns an IDENTIFIER_NODE representing the operator. */
static tree
-cp_parser_conversion_function_id (parser)
- cp_parser *parser;
+cp_parser_conversion_function_id (cp_parser* parser)
{
tree type;
tree saved_scope;
Returns the TYPE specified. */
static tree
-cp_parser_conversion_type_id (parser)
- cp_parser *parser;
+cp_parser_conversion_type_id (cp_parser* parser)
{
tree attributes;
tree type_specifiers;
cp_parser_declarator for details. */
static tree
-cp_parser_conversion_declarator_opt (parser)
- cp_parser *parser;
+cp_parser_conversion_declarator_opt (cp_parser* parser)
{
enum tree_code code;
tree class_type;
Returns TRUE iff the ctor-initializer was actually present. */
static bool
-cp_parser_ctor_initializer_opt (parser)
- cp_parser *parser;
+cp_parser_ctor_initializer_opt (cp_parser* parser)
{
/* If the next token is not a `:', then there is no
ctor-initializer. */
mem-initializer , mem-initializer-list */
static void
-cp_parser_mem_initializer_list (parser)
- cp_parser *parser;
+cp_parser_mem_initializer_list (cp_parser* parser)
{
tree mem_initializer_list = NULL_TREE;
the TREE_VALUE is the expression-list. */
static tree
-cp_parser_mem_initializer (parser)
- cp_parser *parser;
+cp_parser_mem_initializer (cp_parser* parser)
{
tree mem_initializer_id;
tree expression_list;
to be initialized for the second production. */
static tree
-cp_parser_mem_initializer_id (parser)
- cp_parser *parser;
+cp_parser_mem_initializer_id (cp_parser* parser)
{
bool global_scope_p;
bool nested_name_specifier_p;
human-readable spelling of the identifier, e.g., `operator +'. */
static tree
-cp_parser_operator_function_id (parser)
- cp_parser *parser;
+cp_parser_operator_function_id (cp_parser* parser)
{
/* Look for the `operator' keyword. */
if (!cp_parser_require_keyword (parser, RID_OPERATOR, "`operator'"))
human-readable spelling of the identifier, e.g., `operator +'. */
static tree
-cp_parser_operator (parser)
- cp_parser *parser;
+cp_parser_operator (cp_parser* parser)
{
tree id = NULL_TREE;
cp_token *token;
template < template-parameter-list > */
static void
-cp_parser_template_declaration (parser, member_p)
- cp_parser *parser;
- bool member_p;
+cp_parser_template_declaration (cp_parser* parser, bool member_p)
{
/* Check for `export'. */
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_EXPORT))
The nodes are connected via their TREE_CHAINs. */
static tree
-cp_parser_template_parameter_list (parser)
- cp_parser *parser;
+cp_parser_template_parameter_list (cp_parser* parser)
{
tree parameter_list = NULL_TREE;
TREE_PURPOSE is the default value, if any. */
static tree
-cp_parser_template_parameter (parser)
- cp_parser *parser;
+cp_parser_template_parameter (cp_parser* parser)
{
cp_token *token;
the declaration of the parameter. */
static tree
-cp_parser_type_parameter (parser)
- cp_parser *parser;
+cp_parser_type_parameter (cp_parser* parser)
{
cp_token *token;
tree parameter;
names are looked up inside uninstantiated templates. */
static tree
-cp_parser_template_name (parser, template_keyword_p, check_dependency_p)
- cp_parser *parser;
- bool template_keyword_p;
- bool check_dependency_p;
+cp_parser_template_name (cp_parser* parser,
+ bool template_keyword_p,
+ bool check_dependency_p)
{
tree identifier;
tree decl;
argument. */
static tree
-cp_parser_template_argument_list (parser)
- cp_parser *parser;
+cp_parser_template_argument_list (cp_parser* parser)
{
tree arguments = NULL_TREE;
OVERLOAD. */
static tree
-cp_parser_template_argument (parser)
- cp_parser *parser;
+cp_parser_template_argument (cp_parser* parser)
{
tree argument;
bool template_p;
decl-specifier-seq [opt] declarator [opt] ; */
static void
-cp_parser_explicit_instantiation (parser)
- cp_parser *parser;
+cp_parser_explicit_instantiation (cp_parser* parser)
{
bool declares_class_or_enum;
tree decl_specifiers;
template <> template-declaration */
static void
-cp_parser_explicit_specialization (parser)
- cp_parser *parser;
+cp_parser_explicit_specialization (cp_parser* parser)
{
/* Look for the `template' keyword. */
cp_parser_require_keyword (parser, RID_TEMPLATE, "`template'");
is set to FALSE. */
static tree
-cp_parser_type_specifier (parser,
- flags,
- is_friend,
- is_declaration,
- declares_class_or_enum,
- is_cv_qualifier)
- cp_parser *parser;
- cp_parser_flags flags;
- bool is_friend;
- bool is_declaration;
- bool *declares_class_or_enum;
- bool *is_cv_qualifier;
+cp_parser_type_specifier (cp_parser* parser,
+ cp_parser_flags flags,
+ bool is_friend,
+ bool is_declaration,
+ bool* declares_class_or_enum,
+ bool* is_cv_qualifier)
{
tree type_spec = NULL_TREE;
cp_token *token;
productions, the value returned is the indicated TYPE_DECL. */
static tree
-cp_parser_simple_type_specifier (parser, flags)
- cp_parser *parser;
- cp_parser_flags flags;
+cp_parser_simple_type_specifier (cp_parser* parser, cp_parser_flags flags)
{
tree type = NULL_TREE;
cp_token *token;
Returns a TYPE_DECL for the the type. */
static tree
-cp_parser_type_name (parser)
- cp_parser *parser;
+cp_parser_type_name (cp_parser* parser)
{
tree type_decl;
tree identifier;
Returns the TYPE specified. */
static tree
-cp_parser_elaborated_type_specifier (parser, is_friend, is_declaration)
- cp_parser *parser;
- bool is_friend;
- bool is_declaration;
+cp_parser_elaborated_type_specifier (cp_parser* parser,
+ bool is_friend,
+ bool is_declaration)
{
enum tag_types tag_type;
tree identifier;
Returns an ENUM_TYPE representing the enumeration. */
static tree
-cp_parser_enum_specifier (parser)
- cp_parser *parser;
+cp_parser_enum_specifier (cp_parser* parser)
{
cp_token *token;
tree identifier = NULL_TREE;
enumerator-list , enumerator-definition */
static void
-cp_parser_enumerator_list (parser, type)
- cp_parser *parser;
- tree type;
+cp_parser_enumerator_list (cp_parser* parser, tree type)
{
while (true)
{
identifier */
static void
-cp_parser_enumerator_definition (parser, type)
- cp_parser *parser;
- tree type;
+cp_parser_enumerator_definition (cp_parser* parser, tree type)
{
cp_token *token;
tree identifier;
Returns the NAMESPACE_DECL for the namespace. */
static tree
-cp_parser_namespace_name (parser)
- cp_parser *parser;
+cp_parser_namespace_name (cp_parser* parser)
{
tree identifier;
tree namespace_decl;
namespace { namespace-body } */
static void
-cp_parser_namespace_definition (parser)
- cp_parser *parser;
+cp_parser_namespace_definition (cp_parser* parser)
{
tree identifier;
declaration-seq [opt] */
static void
-cp_parser_namespace_body (parser)
- cp_parser *parser;
+cp_parser_namespace_body (cp_parser* parser)
{
cp_parser_declaration_seq_opt (parser);
}
namespace identifier = qualified-namespace-specifier ; */
static void
-cp_parser_namespace_alias_definition (parser)
- cp_parser *parser;
+cp_parser_namespace_alias_definition (cp_parser* parser)
{
tree identifier;
tree namespace_specifier;
namespace. */
static tree
-cp_parser_qualified_namespace_specifier (parser)
- cp_parser *parser;
+cp_parser_qualified_namespace_specifier (cp_parser* parser)
{
/* Look for the optional `::'. */
cp_parser_global_scope_opt (parser,
using :: unqualified-id ; */
static void
-cp_parser_using_declaration (parser)
- cp_parser *parser;
+cp_parser_using_declaration (cp_parser* parser)
{
cp_token *token;
bool typename_p = false;
namespace-name ; */
static void
-cp_parser_using_directive (parser)
- cp_parser *parser;
+cp_parser_using_directive (cp_parser* parser)
{
tree namespace_decl;
: asm-operand-list [opt] ) ; */
static void
-cp_parser_asm_definition (parser)
- cp_parser *parser;
+cp_parser_asm_definition (cp_parser* parser)
{
cp_token *token;
tree string;
is FALSE. */
static tree
-cp_parser_init_declarator (parser,
- decl_specifiers,
- prefix_attributes,
- function_definition_allowed_p,
- member_p,
- function_definition_p)
- cp_parser *parser;
- tree decl_specifiers;
- tree prefix_attributes;
- bool function_definition_allowed_p;
- bool member_p;
- bool *function_definition_p;
+cp_parser_init_declarator (cp_parser* parser,
+ tree decl_specifiers,
+ tree prefix_attributes,
+ bool function_definition_allowed_p,
+ bool member_p,
+ bool* function_definition_p)
{
cp_token *token;
tree declarator;
expression, not a declaration.) */
static tree
-cp_parser_declarator (parser, dcl_kind, ctor_dtor_or_conv_p)
- cp_parser *parser;
- cp_parser_declarator_kind dcl_kind;
- bool *ctor_dtor_or_conv_p;
+cp_parser_declarator (cp_parser* parser,
+ cp_parser_declarator_kind dcl_kind,
+ bool* ctor_dtor_or_conv_p)
{
cp_token *token;
tree declarator;
indicating the size of the array is the second operand. */
static tree
-cp_parser_direct_declarator (parser, dcl_kind, ctor_dtor_or_conv_p)
- cp_parser *parser;
- cp_parser_declarator_kind dcl_kind;
- bool *ctor_dtor_or_conv_p;
+cp_parser_direct_declarator (cp_parser* parser,
+ cp_parser_declarator_kind dcl_kind,
+ bool* ctor_dtor_or_conv_p)
{
cp_token *token;
tree declarator = NULL_TREE;
cv-qualifiers. Returns ERROR_MARK if an error occurred. */
static enum tree_code
-cp_parser_ptr_operator (parser, type, cv_qualifier_seq)
- cp_parser *parser;
- tree *type;
- tree *cv_qualifier_seq;
+cp_parser_ptr_operator (cp_parser* parser,
+ tree* type,
+ tree* cv_qualifier_seq)
{
enum tree_code code = ERROR_MARK;
cp_token *token;
representation of a cv-qualifier. */
static tree
-cp_parser_cv_qualifier_seq_opt (parser)
- cp_parser *parser;
+cp_parser_cv_qualifier_seq_opt (cp_parser* parser)
{
tree cv_qualifiers = NULL_TREE;
__restrict__ */
static tree
-cp_parser_cv_qualifier_opt (parser)
- cp_parser *parser;
+cp_parser_cv_qualifier_opt (cp_parser* parser)
{
cp_token *token;
tree cv_qualifier = NULL_TREE;
unqualified-id. */
static tree
-cp_parser_declarator_id (parser)
- cp_parser *parser;
+cp_parser_declarator_id (cp_parser* parser)
{
tree id_expression;
Returns the TYPE specified. */
static tree
-cp_parser_type_id (parser)
- cp_parser *parser;
+cp_parser_type_id (cp_parser* parser)
{
tree type_specifier_seq;
tree abstract_declarator;
type-specifier, or the TREE_PURPOSE is a list of attributes. */
static tree
-cp_parser_type_specifier_seq (parser)
- cp_parser *parser;
+cp_parser_type_specifier_seq (cp_parser* parser)
{
bool seen_type_specifier = false;
tree type_specifier_seq = NULL_TREE;
parameter-declaration-clause consisting only of an ellipsis. */
static tree
-cp_parser_parameter_declaration_clause (parser)
- cp_parser *parser;
+cp_parser_parameter_declaration_clause (cp_parser* parser)
{
tree parameters;
cp_token *token;
`void_list_node' is never appended to the list. */
static tree
-cp_parser_parameter_declaration_list (parser)
- cp_parser *parser;
+cp_parser_parameter_declaration_list (cp_parser* parser)
{
tree parameters = NULL_TREE;
be a `friend'. */
static tree
-cp_parser_function_definition (parser, friend_p)
- cp_parser *parser;
- bool *friend_p;
+cp_parser_function_definition (cp_parser* parser, bool* friend_p)
{
tree decl_specifiers;
tree attributes;
set to FALSE if there is no initializer present. */
static tree
-cp_parser_initializer (parser, is_parenthesized_init)
- cp_parser *parser;
- bool *is_parenthesized_init;
+cp_parser_initializer (cp_parser* parser, bool* is_parenthesized_init)
{
cp_token *token;
tree init;
trailing `,' was provided. */
static tree
-cp_parser_initializer_clause (parser)
- cp_parser *parser;
+cp_parser_initializer_clause (cp_parser* parser)
{
tree initializer;
IDENTIFIER_NODE naming the field to initialize. */
static tree
-cp_parser_initializer_list (parser)
- cp_parser *parser;
+cp_parser_initializer_list (cp_parser* parser)
{
tree initializers = NULL_TREE;
Returns the TREE_TYPE representing the class. */
static tree
-cp_parser_class_specifier (parser)
- cp_parser *parser;
+cp_parser_class_specifier (cp_parser* parser)
{
cp_token *token;
tree type;
body of the class. */
static tree
-cp_parser_class_head (parser,
- nested_name_specifier_p)
- cp_parser *parser;
- bool *nested_name_specifier_p;
+cp_parser_class_head (cp_parser* parser,
+ bool* nested_name_specifier_p)
{
cp_token *token;
tree nested_name_specifier;
error. */
static enum tag_types
-cp_parser_class_key (parser)
- cp_parser *parser;
+cp_parser_class_key (cp_parser* parser)
{
cp_token *token;
enum tag_types tag_type;
access-specifier : member-specification [opt] */
static void
-cp_parser_member_specification_opt (parser)
- cp_parser *parser;
+cp_parser_member_specification_opt (cp_parser* parser)
{
while (true)
{
identifier [opt] attributes [opt] : constant-expression */
static void
-cp_parser_member_declaration (parser)
- cp_parser *parser;
+cp_parser_member_declaration (cp_parser* parser)
{
tree decl_specifiers;
tree prefix_attributes;
Otherwiser, ERROR_MARK_NODE is returned. */
static tree
-cp_parser_pure_specifier (parser)
- cp_parser *parser;
+cp_parser_pure_specifier (cp_parser* parser)
{
cp_token *token;
Returns a representation of the constant-expression. */
static tree
-cp_parser_constant_initializer (parser)
- cp_parser *parser;
+cp_parser_constant_initializer (cp_parser* parser)
{
/* Look for the `=' token. */
if (!cp_parser_require (parser, CPP_EQ, "`='"))
NULL_TREE, not ERROR_MARK_NODE. */
static tree
-cp_parser_base_clause (parser)
- cp_parser *parser;
+cp_parser_base_clause (cp_parser* parser)
{
tree bases = NULL_TREE;
(or the ERROR_MARK_NODE) indicating the type that was specified. */
static tree
-cp_parser_base_specifier (parser)
- cp_parser *parser;
+cp_parser_base_specifier (cp_parser* parser)
{
cp_token *token;
bool done = false;
TREE_VALUE of each node is a type. */
static tree
-cp_parser_exception_specification_opt (parser)
- cp_parser *parser;
+cp_parser_exception_specification_opt (cp_parser* parser)
{
cp_token *token;
tree type_id_list;
in the order that the types were presented. */
static tree
-cp_parser_type_id_list (parser)
- cp_parser *parser;
+cp_parser_type_id_list (cp_parser* parser)
{
tree types = NULL_TREE;
try compound-statement handler-seq */
static tree
-cp_parser_try_block (parser)
- cp_parser *parser;
+cp_parser_try_block (cp_parser* parser)
{
tree try_block;
try ctor-initializer [opt] function-body handler-seq */
static bool
-cp_parser_function_try_block (parser)
- cp_parser *parser;
+cp_parser_function_try_block (cp_parser* parser)
{
tree try_block;
bool ctor_initializer_p;
handler handler-seq [opt] */
static void
-cp_parser_handler_seq (parser)
- cp_parser *parser;
+cp_parser_handler_seq (cp_parser* parser)
{
while (true)
{
catch ( exception-declaration ) compound-statement */
static void
-cp_parser_handler (parser)
- cp_parser *parser;
+cp_parser_handler (cp_parser* parser)
{
tree handler;
tree declaration;
ellipsis variant is used. */
static tree
-cp_parser_exception_declaration (parser)
- cp_parser *parser;
+cp_parser_exception_declaration (cp_parser* parser)
{
tree type_specifiers;
tree declarator;
Returns a THROW_EXPR representing the throw-expression. */
static tree
-cp_parser_throw_expression (parser)
- cp_parser *parser;
+cp_parser_throw_expression (cp_parser* parser)
{
tree expression;
NULL_TREE. */
static tree
-cp_parser_asm_specification_opt (parser)
- cp_parser *parser;
+cp_parser_asm_specification_opt (cp_parser* parser)
{
cp_token *token;
tree asm_specification;
is a STRING_CST for the string literal before the parenthesis. */
static tree
-cp_parser_asm_operand_list (parser)
- cp_parser *parser;
+cp_parser_asm_operand_list (cp_parser* parser)
{
tree asm_operands = NULL_TREE;
appeared. The TREE_VALUE of each node is a STRING_CST. */
static tree
-cp_parser_asm_clobber_list (parser)
- cp_parser *parser;
+cp_parser_asm_clobber_list (cp_parser* parser)
{
tree clobbers = NULL_TREE;
The return value is as for cp_parser_attribute_list. */
static tree
-cp_parser_attributes_opt (parser)
- cp_parser *parser;
+cp_parser_attributes_opt (cp_parser* parser)
{
tree attributes = NULL_TREE;
any. */
static tree
-cp_parser_attribute_list (parser)
- cp_parser *parser;
+cp_parser_attribute_list (cp_parser* parser)
{
tree attribute_list = NULL_TREE;
for restoring the value of the PEDANTIC flag. */
static bool
-cp_parser_extension_opt (parser, saved_pedantic)
- cp_parser *parser;
- int *saved_pedantic;
+cp_parser_extension_opt (cp_parser* parser, int* saved_pedantic)
{
/* Save the old value of the PEDANTIC flag. */
*saved_pedantic = pedantic;
identifier */
static void
-cp_parser_label_declaration (parser)
- cp_parser *parser;
+cp_parser_label_declaration (cp_parser* parser)
{
/* Look for the `__label__' keyword. */
cp_parser_require_keyword (parser, RID_LABEL, "`__label__'");
TRUE. */
static tree
-cp_parser_lookup_name_simple (parser, name)
- cp_parser *parser;
- tree name;
+cp_parser_lookup_name_simple (cp_parser* parser, tree name)
{
return cp_parser_lookup_name (parser, name,
/*check_access=*/true,
extremely limited situations. */
static tree
-cp_parser_resolve_typename_type (parser, type)
- cp_parser *parser;
- tree type;
+cp_parser_resolve_typename_type (cp_parser* parser, tree type)
{
tree scope;
tree name;
and FALSE otherwise. */
static bool
-cp_parser_check_declarator_template_parameters (parser, declarator)
- cp_parser *parser;
- tree declarator;
+cp_parser_check_declarator_template_parameters (cp_parser* parser,
+ tree declarator)
{
unsigned num_templates;
return TRUE. */
static bool
-cp_parser_check_template_parameters (parser, num_templates)
- cp_parser *parser;
- unsigned num_templates;
+cp_parser_check_template_parameters (cp_parser* parser,
+ unsigned num_templates)
{
/* If there are more template classes than parameter lists, we have
something like:
the two sub-expressions. */
static tree
-cp_parser_binary_expression (parser, token_tree_map, fn)
- cp_parser *parser;
- const cp_parser_token_tree_map token_tree_map;
- cp_parser_expression_fn fn;
+cp_parser_binary_expression (cp_parser* parser,
+ const cp_parser_token_tree_map token_tree_map,
+ cp_parser_expression_fn fn)
{
tree lhs;
present, and NULL_TREE otherwise. */
static tree
-cp_parser_global_scope_opt (parser, current_scope_valid_p)
- cp_parser *parser;
- bool current_scope_valid_p;
+cp_parser_global_scope_opt (cp_parser* parser, bool current_scope_valid_p)
{
cp_token *token;
static tree
cp_parser_function_definition_from_specifiers_and_declarator
- (parser, decl_specifiers, attributes, declarator)
- cp_parser *parser;
- tree decl_specifiers;
- tree attributes;
- tree declarator;
+ (cp_parser* parser,
+ tree decl_specifiers,
+ tree attributes,
+ tree declarator)
{
tree fn;
bool success_p;
Returns the function defined. */
static tree
-cp_parser_function_definition_after_declarator (parser,
- inline_p)
- cp_parser *parser;
- bool inline_p;
+cp_parser_function_definition_after_declarator (cp_parser* parser,
+ bool inline_p)
{
tree fn;
bool ctor_initializer_p = false;
is as for cp_parser_template_declaration. */
static void
-cp_parser_template_declaration_after_export (parser, member_p)
- cp_parser *parser;
- bool member_p;
+cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
{
tree decl = NULL_TREE;
tree parameter_list;
*FRIEND_P is set to TRUE iff the declaration is a friend. */
static tree
-cp_parser_single_declaration (parser,
- member_p,
- friend_p)
- cp_parser *parser;
- bool member_p;
- bool *friend_p;
+cp_parser_single_declaration (cp_parser* parser,
+ bool member_p,
+ bool* friend_p)
{
bool declares_class_or_enum;
tree decl = NULL_TREE;
representing the cast. */
static tree
-cp_parser_functional_cast (parser, type)
- cp_parser *parser;
- tree type;
+cp_parser_functional_cast (cp_parser* parser, tree type)
{
tree expression_list;
parse them now. */
static void
-cp_parser_late_parsing_for_member (parser, member_function)
- cp_parser *parser;
- tree member_function;
+cp_parser_late_parsing_for_member (cp_parser* parser, tree member_function)
{
cp_lexer *saved_lexer;
encountered. */
static tree
-cp_parser_sizeof_operand (parser, keyword)
- cp_parser *parser;
- enum rid keyword;
+cp_parser_sizeof_operand (cp_parser* parser, enum rid keyword)
{
static const char *format;
tree expr = NULL_TREE;
Returns TRUE iff `friend' appears among the DECL_SPECIFIERS. */
static bool
-cp_parser_friend_p (decl_specifiers)
- tree decl_specifiers;
+cp_parser_friend_p (tree decl_specifiers)
{
while (decl_specifiers)
{
Otherwise, returns NULL. */
static cp_token *
-cp_parser_require (parser, type, token_desc)
- cp_parser *parser;
- enum cpp_ttype type;
- const char *token_desc;
+cp_parser_require (cp_parser* parser,
+ enum cpp_ttype type,
+ const char* token_desc)
{
if (cp_lexer_next_token_is (parser->lexer, type))
return cp_lexer_consume_token (parser->lexer);
the next token is not as expected. */
static void
-cp_parser_skip_until_found (parser, type, token_desc)
- cp_parser *parser;
- enum cpp_ttype type;
- const char *token_desc;
+cp_parser_skip_until_found (cp_parser* parser,
+ enum cpp_ttype type,
+ const char* token_desc)
{
cp_token *token;
unsigned nesting_depth = 0;
Otherwise, returns NULL. */
static cp_token *
-cp_parser_require_keyword (parser, keyword, token_desc)
- cp_parser *parser;
- enum rid keyword;
- const char *token_desc;
+cp_parser_require_keyword (cp_parser* parser,
+ enum rid keyword,
+ const char* token_desc)
{
cp_token *token = cp_parser_require (parser, CPP_KEYWORD, token_desc);
function-definition. */
static bool
-cp_parser_token_starts_function_definition_p (token)
- cp_token *token;
+cp_parser_token_starts_function_definition_p (cp_token* token)
{
return (/* An ordinary function-body begins with an `{'. */
token->type == CPP_OPEN_BRACE
or none_type otherwise. */
static enum tag_types
-cp_parser_token_is_class_key (token)
- cp_token *token;
+cp_parser_token_is_class_key (cp_token* token)
{
switch (token->keyword)
{
tokens. */
static void
-cp_parser_parse_tentatively (parser)
- cp_parser *parser;
+cp_parser_parse_tentatively (cp_parser* parser)
{
/* Enter a new parsing context. */
parser->context = cp_parser_context_new (parser->context);
/* Commit to the currently active tentative parse. */
static void
-cp_parser_commit_to_tentative_parse (parser)
- cp_parser *parser;
+cp_parser_commit_to_tentative_parse (cp_parser* parser)
{
cp_parser_context *context;
cp_lexer *lexer;
will be rolled back, and no diagnostics will be issued. */
static void
-cp_parser_abort_tentative_parse (parser)
- cp_parser *parser;
+cp_parser_abort_tentative_parse (cp_parser* parser)
{
cp_parser_simulate_error (parser);
/* Now, pretend that we want to see if the construct was
Returns true if no error occurred; false otherwise. */
static bool
-cp_parser_parse_definitely (parser)
- cp_parser *parser;
+cp_parser_parse_definitely (cp_parser* parser)
{
bool error_occurred;
cp_parser_context *context;
we will stick with this tentative parse, even if errors occur. */
static bool
-cp_parser_committed_to_tentative_parse (parser)
- cp_parser *parser;
+cp_parser_committed_to_tentative_parse (cp_parser* parser)
{
return (cp_parser_parsing_tentatively (parser)
&& parser->context->status == CP_PARSER_STATUS_KIND_COMMITTED);
tentative parse. */
static bool
-cp_parser_error_occurred (parser)
- cp_parser *parser;
+cp_parser_error_occurred (cp_parser* parser)
{
return (cp_parser_parsing_tentatively (parser)
&& parser->context->status == CP_PARSER_STATUS_KIND_ERROR);
/* Returns non-zero if GNU extensions are allowed. */
static bool
-cp_parser_allow_gnu_extensions_p (parser)
- cp_parser *parser;
+cp_parser_allow_gnu_extensions_p (cp_parser* parser)
{
return parser->allow_gnu_extensions_p;
}
/* Parse the entire translation unit. */
int
-yyparse ()
+yyparse (void)
{
bool error_occurred;
/* Clean up after parsing the entire translation unit. */
void
-free_parser_stacks ()
+free_parser_stacks (void)
{
/* Nothing to do. */
}