osprey/kg++fe/gnu/cp/decl2.c File Reference

#include "config.h"
#include "system.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
#include "flags.h"
#include "cp-tree.h"
#include "decl.h"
#include "lex.h"
#include "output.h"
#include "except.h"
#include "toplev.h"
#include "ggc.h"
#include "timevar.h"
#include "cpplib.h"
#include "target.h"
#include "c-common.h"
#include "gt-cp-decl2.h"

Include dependency graph for decl2.c:

Go to the source code of this file.

Data Types

type  priority_info_s
type  arg_lookup

Defines

#define pending_statics_used   (pending_statics ? pending_statics->elements_used : 0)
#define deferred_fns_used   (deferred_fns ? deferred_fns->elements_used : 0)
#define INITIALIZE_P_IDENTIFIER   "__initialize_p"
#define PRIORITY_IDENTIFIER   "__priority"
#define SSDF_IDENTIFIER   "__static_initialization_and_destruction"

Typedefs

typedef struct priority_info_spriority_info

Functions/Subroutines

static void mark_vtable_entries PARAMS ((tree))
static void grok_function_init PARAMS ((tree, tree))
static int maybe_emit_vtables (tree)
static void add_using_namespace PARAMS ((tree, tree, int))
static cxx_bindingambiguous_decl (tree, cxx_binding *, cxx_binding *, int)
static tree build_anon_union_vars PARAMS ((tree, tree *, int, int))
static tree start_objects PARAMS ((int, int))
static void finish_objects PARAMS ((int, int, tree))
static tree
validate_nonmember_using_decl 
PARAMS ((tree, tree *, tree *))
static void do_nonmember_using_decl PARAMS ((tree, tree, tree, tree, tree *, tree *))
static tree
start_static_storage_duration_function 
PARAMS ((void))
static priority_info
get_priority_info 
PARAMS ((int))
static tree
start_static_initialization_or_destruction 
PARAMS ((tree, int))
static int
generate_ctor_and_dtor_functions_for_priority 
PARAMS ((splay_tree_node, void *))
static tree
prune_vars_needing_no_initialization 
PARAMS ((tree *))
static GTY (())
void warn_if_unknown_interface (tree decl)
void grok_x_components (tree specs)
tree cp_build_parm_decl (tree name, tree type)
tree build_artificial_parm (tree name, tree type)
void maybe_retrofit_in_chrg (tree fn)
void grokclassfn (tree ctype, tree function, enum overload_flags flags, tree quals)
tree grok_array_decl (tree array_expr, tree index_exp)
tree delete_sanity (tree exp, tree size, int doing_vec, int use_global_delete)
void check_member_template (tree tmpl)
static int acceptable_java_type (tree type)
int check_java_method (tree method)
tree check_classfn (tree ctype, tree function)
void finish_static_data_member_decl (tree decl, tree init, tree asmspec_tree, int flags)
tree grokfield (tree declarator, tree declspecs, tree init, tree asmspec_tree, tree attrlist)
tree grokbitfield (tree declarator, tree declspecs, tree width)
tree grokoptypename (tree declspecs, tree declarator, tree scope)
static void grok_function_init (tree decl, tree init)
void cplus_decl_attributes (tree *decl, tree attributes, int flags)
tree constructor_name_full (tree thing)
tree constructor_name (tree thing)
bool constructor_name_p (tree name, tree type)
void defer_fn (tree fn)
static tree build_anon_union_vars (tree anon_decl, tree *elems, int static_p, int external_p)
void finish_anon_union (tree anon_union_decl)
void finish_builtin_type (tree type, const char *name, fields, int len, tree align_type)
tree coerce_new_type (tree type)
tree coerce_delete_type (tree type)
static void mark_vtable_entries (tree decl)
void comdat_linkage (tree decl)
void maybe_make_one_only (tree decl)
void import_export_vtable (tree decl, tree type, int final)
static void import_export_class (tree ctype)
static void output_vtable_inherit (tree vars)
void import_export_decl (tree decl)
void import_export_tinfo (tree decl, tree type, int is_in_library)
tree build_cleanup (tree decl)
tree get_guard (tree decl)
static tree get_guard_bits (tree guard)
tree get_guard_cond (tree guard)
tree set_guard (tree guard)
static tree start_objects (int method_type, int initp)
static void finish_objects (int method_type, int initp, tree body)
static void finish_static_storage_duration_function (tree body)
static priority_info get_priority_info (int priority)
static tree start_static_initialization_or_destruction (tree decl, int initp)
static void finish_static_initialization_or_destruction (tree guard_if_stmt)
static void do_static_initialization (tree decl, tree init)
static void do_static_destruction (tree decl)
static tree prune_vars_needing_no_initialization (tree *vars)
static void write_out_vars (tree vars)
static void generate_ctor_or_dtor_function (int constructor_p, int priority)
static int generate_ctor_and_dtor_functions_for_priority (splay_tree_node n, data)
void finish_file ()
tree reparse_absdcl_as_expr (tree type, tree decl)
tree reparse_absdcl_as_casts (tree decl, tree expr)
tree build_expr_from_tree (tree t)
tree build_offset_ref_call_from_tree (tree fn, tree args)
tree build_call_from_tree (tree fn, tree args, bool disallow_virtual)
tree reparse_decl_as_expr (tree type, tree decl)
tree finish_decl_parsing (tree decl)
bool is_ancestor (tree root, tree child)
tree namespace_ancestor (tree ns1, tree ns2)
static void add_using_namespace (tree user, tree used, int indirect)
static tree merge_functions (tree s1, tree s2)
bool lookup_using_namespace (tree name, cxx_binding *val, tree usings, tree scope, int flags, tree *spacesp)
bool qualified_lookup_using_namespace (tree name, tree scope, cxx_binding *result, int flags)
void set_decl_namespace (tree decl, tree scope, int friendp)
static tree decl_namespace (tree decl)
tree current_decl_namespace ()
void push_decl_namespace (tree decl)
void pop_decl_namespace ()
void push_scope (tree t)
void pop_scope (tree t)
static int arg_assoc PARAMS ((struct arg_lookup *, tree))
static int add_function (struct arg_lookup *k, tree fn)
static int arg_assoc_namespace (struct arg_lookup *k, tree scope)
static int arg_assoc_template_arg (struct arg_lookup *k, tree arg)
static int arg_assoc_class (struct arg_lookup *k, tree type)
static int arg_assoc_type (struct arg_lookup *k, tree type)
static int arg_assoc_args (struct arg_lookup *k, tree args)
static int arg_assoc (struct arg_lookup *k, tree n)
tree lookup_arg_dependent (tree name, tree fns, tree args)
void do_namespace_alias (tree alias, tree namespace)
static tree validate_nonmember_using_decl (tree decl, tree *scope, tree *name)
static void do_nonmember_using_decl (tree scope, tree name, tree oldval, tree oldtype, tree *newval, tree *newtype)
void do_toplevel_using_decl (tree decl)
void do_local_using_decl (tree decl)
tree do_class_using_decl (tree decl)
void do_using_directive (tree namespace)
void check_default_args (tree x)
void mark_used (tree decl)
tree handle_class_head (enum tag_types tag_kind, tree scope, tree id, tree attributes, int defn_p, int *new_type_p)
tree handle_class_head_apparent_template (tree decl, int *new_type_p)

Variables

cpp_readerparse_in


Define Documentation

#define deferred_fns_used   (deferred_fns ? deferred_fns->elements_used : 0)

Referenced by cp_finish_file(), and finish_file().

#define INITIALIZE_P_IDENTIFIER   "__initialize_p"

Definition at line 2249 of file decl2.c.

#define pending_statics_used   (pending_statics ? pending_statics->elements_used : 0)

Referenced by cp_finish_file(), and finish_file().

#define PRIORITY_IDENTIFIER   "__priority"

Definition at line 2250 of file decl2.c.

#define SSDF_IDENTIFIER   "__static_initialization_and_destruction"

Definition at line 2254 of file decl2.c.


Typedef Documentation


Function Documentation

static int acceptable_java_type ( tree  type  )  [static]

static int add_function ( struct arg_lookup k,
tree  fn 
) [static]

Definition at line 4161 of file decl2.c.

References build_overload(), cp_error_at(), error(), f1, f2, is_overloaded_fn(), and OVL_CURRENT.

Referenced by arg_assoc_class(), and arg_assoc_namespace().

static void add_using_namespace ( tree  user,
tree  used,
int  indirect 
) [static]

static cxx_binding * ambiguous_decl ( tree  name,
cxx_binding old,
cxx_binding new,
int  flags 
) [static]

static int arg_assoc ( struct arg_lookup k,
tree  n 
) [static]

static int arg_assoc_args ( struct arg_lookup k,
tree  args 
) [static]

Definition at line 4378 of file decl2.c.

References arg_assoc(), TREE_CHAIN, and TREE_VALUE.

Referenced by arg_assoc_type(), and lookup_arg_dependent().

static int arg_assoc_class ( struct arg_lookup k,
tree  type 
) [static]

static int arg_assoc_namespace ( struct arg_lookup k,
tree  scope 
) [static]

static int arg_assoc_template_arg ( struct arg_lookup k,
tree  arg 
) [static]

static int arg_assoc_type ( struct arg_lookup k,
tree  type 
) [static]

static tree build_anon_union_vars ( tree  anon_decl,
tree elems,
int  static_p,
int  external_p 
) [static]

tree build_artificial_parm ( tree  name,
tree  type 
)

Definition at line 260 of file decl2.c.

Referenced by build_this_parm(), grokclassfn(), and maybe_retrofit_in_chrg().

tree build_call_from_tree ( tree  fn,
tree  args,
bool  disallow_virtual 
)

Definition at line 3586 of file decl2.c.

tree build_cleanup ( tree  decl  ) 

tree build_expr_from_tree ( tree  t  ) 

tree build_offset_ref_call_from_tree ( tree  fn,
tree  args 
)

Definition at line 3545 of file decl2.c.

tree check_classfn ( tree  ctype,
tree  function 
)

void check_default_args ( tree  x  ) 

int check_java_method ( tree  method  ) 

Definition at line 662 of file decl2.c.

Referenced by grokfndecl().

void check_member_template ( tree  tmpl  ) 

Definition at line 585 of file decl2.c.

Referenced by finish_member_template_decl().

tree coerce_delete_type ( tree  type  ) 

Definition at line 1542 of file decl2.c.

Referenced by grok_op_properties().

tree coerce_new_type ( tree  type  ) 

Definition at line 1507 of file decl2.c.

Referenced by grok_op_properties().

void comdat_linkage ( tree  decl  ) 

tree constructor_name ( tree  thing  ) 

tree constructor_name_full ( tree  thing  ) 

bool constructor_name_p ( tree  name,
tree  type 
)

Definition at line 1294 of file decl2.c.

tree cp_build_parm_decl ( tree  name,
tree  type 
)

void cplus_decl_attributes ( tree decl,
tree  attributes,
int  flags 
)

tree current_decl_namespace ( void   ) 

static tree decl_namespace ( tree  decl  )  [static]

void defer_fn ( tree  fn  ) 

Definition at line 1304 of file decl2.c.

References DECL_DEFERRED_FN, VARRAY_PUSH_TREE, and VARRAY_TREE_INIT.

tree delete_sanity ( tree  exp,
tree  size,
int  doing_vec,
int  use_global_delete 
)

tree do_class_using_decl ( tree  decl  ) 

void do_local_using_decl ( tree  decl  ) 

void do_namespace_alias ( tree  alias,
tree  namespace 
)

Definition at line 4502 of file decl2.c.

Referenced by cp_parser_namespace_alias_definition().

static void do_nonmember_using_decl ( tree  scope,
tree  name,
tree  oldval,
tree  oldtype,
tree newval,
tree newtype 
) [static]

static void do_static_destruction ( tree  decl  )  [static]

static void do_static_initialization ( tree  decl,
tree  init 
) [static]

void do_toplevel_using_decl ( tree  decl  ) 

void do_using_directive ( tree  namespace  ) 

void finish_anon_union ( tree  anon_union_decl  ) 

Definition at line 1417 of file decl2.c.

Referenced by shadow_tag(), and tsubst_expr().

void finish_builtin_type ( tree  type,
const char *  name,
fields  ,
int  len,
tree  align_type 
)

tree finish_decl_parsing ( tree  decl  ) 

void finish_file ( void   ) 

Definition at line 2777 of file decl2.c.

References back_end_hook, check_global_declarations(), cp_warning_at(), current_class_type, DECL_ARTIFICIAL, DECL_DECLARED_INLINE_P, DECL_EXPLICIT_INSTANTIATION, DECL_EXTERNAL, DECL_IN_AGGR_P, DECL_INITIAL, DECL_INLINE, decl_namespace_list, DECL_NEEDED_P, DECL_NOT_REALLY_EXTERN, DECL_REALLY_EXTERN, DECL_SAVED_TREE, DEFAULT_INIT_PRIORITY, deferred_fns_used, do_static_destruction(), do_static_initialization(), dump_begin(), dump_end(), dump_node(), dump_time_statistics(), dump_tree_statistics(), emit_support_tinfos(), emit_tinfo_decl(), expand_body(), finish_repo(), finish_static_storage_duration_function(), flag_detailed_statistics, flag_syntax_only, flag_use_cxa_atexit, flags, generate_ctor_and_dtor_functions_for_priority(), generate_ctor_or_dtor_function(), global_bindings_p(), i, import_export_decl(), instantiate_pending_templates(), interface_only, interface_unknown, keyed_classes, lang_name_c, lineno, maybe_emit_vtables(), next, nreverse(), NULL_TREE, pending_statics_used, pop_from_top_level(), pop_lang_context(), prune_vars_needing_no_initialization(), push_lang_context(), push_to_top_level(), splay_tree_delete(), splay_tree_foreach(), start_static_storage_duration_function(), static_aggregates, stream, synthesize_method(), TDF_SLIM, TDI_all, timevar_pop, timevar_push, TREE_ASM_WRITTEN, TREE_CHAIN, TREE_PURPOSE, TREE_USED, TREE_VALUE, unemitted_tinfo_decl_p(), VARRAY_TREE, vars, walk_globals(), walk_namespaces(), wrapup_global_declarations(), wrapup_globals_for_namespace(), and write_out_vars().

static void finish_objects ( int  method_type,
int  initp,
tree  body 
) [static]

void finish_static_data_member_decl ( tree  decl,
tree  init,
tree  asmspec_tree,
int  flags 
)

Definition at line 822 of file decl2.c.

Referenced by grokfield(), and instantiate_class_template().

static void finish_static_initialization_or_destruction ( tree  guard_if_stmt  )  [static]

static void finish_static_storage_duration_function ( tree  body  )  [static]

Definition at line 2386 of file decl2.c.

References expand_body(), finish_compound_stmt(), and finish_function().

Referenced by cp_finish_file(), and finish_file().

static int generate_ctor_and_dtor_functions_for_priority ( splay_tree_node  n,
data   
) [static]

Definition at line 2749 of file decl2.c.

References DEFAULT_INIT_PRIORITY, generate_ctor_or_dtor_function(), int, and pi.

Referenced by cp_finish_file(), and finish_file().

static void generate_ctor_or_dtor_function ( int  constructor_p,
int  priority 
) [static]

tree get_guard ( tree  decl  ) 

static tree get_guard_bits ( tree  guard  )  [static]

Definition at line 2102 of file decl2.c.

References build1, build_pointer_type(), char_type_node, and TREE_TYPE.

Referenced by get_guard_cond(), and set_guard().

tree get_guard_cond ( tree  guard  ) 

static priority_info get_priority_info ( int  priority  )  [static]

tree grok_array_decl ( tree  array_expr,
tree  index_exp 
)

Definition at line 431 of file decl2.c.

Referenced by build_expr_from_tree(), and cp_parser_postfix_open_square_expression().

static void grok_function_init ( tree  decl,
tree  init 
) [static]

Definition at line 1211 of file decl2.c.

References DECL_PURE_VIRTUAL_P, error(), integer_zerop(), TREE_CODE, and TREE_TYPE.

Referenced by grokfield().

void grok_x_components ( tree  specs  ) 

tree grokbitfield ( tree  declarator,
tree  declspecs,
tree  width 
)

void grokclassfn ( tree  ctype,
tree  function,
enum overload_flags  flags,
tree  quals 
)

tree grokfield ( tree  declarator,
tree  declspecs,
tree  init,
tree  asmspec_tree,
tree  attrlist 
)

tree grokoptypename ( tree  declspecs,
tree  declarator,
tree  scope 
)

static GTY ( ()   )  [static]

tree handle_class_head ( enum tag_types  tag_kind,
tree  scope,
tree  id,
tree  attributes,
int  defn_p,
int *  new_type_p 
)

Definition at line 4935 of file decl2.c.

tree handle_class_head_apparent_template ( tree  decl,
int *  new_type_p 
)

Definition at line 5078 of file decl2.c.

static void import_export_class ( tree  ctype  )  [static]

void import_export_decl ( tree  decl  ) 

void import_export_tinfo ( tree  decl,
tree  type,
int  is_in_library 
)

void import_export_vtable ( tree  decl,
tree  type,
int  final 
)

bool is_ancestor ( tree  root,
tree  child 
)

Definition at line 3703 of file decl2.c.

tree lookup_arg_dependent ( tree  name,
tree  fns,
tree  args 
)

Definition at line 4470 of file decl2.c.

Referenced by do_identifier(), lookup_function_nonclass(), and perform_koenig_lookup().

bool lookup_using_namespace ( tree  name,
cxx_binding val,
tree  usings,
tree  scope,
int  flags,
tree spacesp 
)

Definition at line 3930 of file decl2.c.

void mark_used ( tree  decl  ) 

Definition at line 4860 of file decl2.c.

static void mark_vtable_entries ( tree  decl  )  [static]

static int maybe_emit_vtables ( tree  ctype  )  [static]

void maybe_make_one_only ( tree  decl  ) 

void maybe_retrofit_in_chrg ( tree  fn  ) 

Definition at line 286 of file decl2.c.

Referenced by grokclassfn(), and tsubst_decl().

static tree merge_functions ( tree  s1,
tree  s2 
) [static]

Definition at line 3802 of file decl2.c.

References build_overload(), DECL_EXTERN_C_P, DECL_NAME, OVL_CURRENT, and OVL_NEXT.

Referenced by ambiguous_decl().

tree namespace_ancestor ( tree  ns1,
tree  ns2 
)

static void output_vtable_inherit ( tree  vars  )  [static]

static int arg_assoc PARAMS ( (struct arg_lookup *, tree  )  [static]

static tree prune_vars_needing_no_initialization PARAMS ( (tree *)   )  [static]

static int generate_ctor_and_dtor_functions_for_priority PARAMS ( (splay_tree_node, void *)   )  [static]

static tree start_static_initialization_or_destruction PARAMS ( (tree, int)   )  [static]

static priority_info get_priority_info PARAMS ( (int)   )  [static]

static tree start_static_storage_duration_function PARAMS ( (void  )  [static, read]

Definition at line 77 of file cplus-dem.c.

static void do_nonmember_using_decl PARAMS ( (tree, tree, tree, tree, tree *, tree *)   )  [static]

static tree validate_nonmember_using_decl PARAMS ( (tree, tree *, tree *)   )  [static]

static void finish_objects PARAMS ( (int, int, tree  )  [static]

static tree start_objects PARAMS ( (int, int)   )  [static]

static tree build_anon_union_vars PARAMS ( (tree, tree *, int, int)   )  [static]

static void add_using_namespace PARAMS ( (tree, tree, int)   )  [static]

static void grok_function_init PARAMS ( (tree, tree  )  [static]

static void mark_vtable_entries PARAMS ( (tree  )  [static]

void pop_decl_namespace ( void   ) 

Definition at line 4109 of file decl2.c.

Referenced by cp_finish_decl(), grokdeclarator(), lookup_template_class(), and pop_scope().

void pop_scope ( tree  t  ) 

static tree prune_vars_needing_no_initialization ( tree vars  )  [static]

void push_decl_namespace ( tree  decl  ) 

Definition at line 4099 of file decl2.c.

Referenced by enter_scope_of(), lookup_template_class(), push_scope(), and start_decl().

void push_scope ( tree  t  ) 

bool qualified_lookup_using_namespace ( tree  name,
tree  scope,
cxx_binding result,
int  flags 
)

Definition at line 3959 of file decl2.c.

tree reparse_absdcl_as_casts ( tree  decl,
tree  expr 
)

tree reparse_absdcl_as_expr ( tree  type,
tree  decl 
)

Definition at line 3112 of file decl2.c.

References build_functional_cast(), finish_call_expr(), NULL_TREE, and TREE_OPERAND.

Referenced by reparse_absdcl_as_expr().

tree reparse_decl_as_expr ( tree  type,
tree  decl 
)

Definition at line 3649 of file decl2.c.

References build_expr_from_tree(), build_functional_cast(), build_tree_list, and NULL_TREE.

void set_decl_namespace ( tree  decl,
tree  scope,
int  friendp 
)

Definition at line 4005 of file decl2.c.

Referenced by grokfndecl(), and grokvardecl().

tree set_guard ( tree  guard  ) 

static tree start_objects ( int  method_type,
int  initp 
) [static]

static tree start_static_initialization_or_destruction ( tree  decl,
int  initp 
) [static]

static tree validate_nonmember_using_decl ( tree  decl,
tree scope,
tree name 
) [static]

void warn_if_unknown_interface ( tree  decl  ) 

static void write_out_vars ( tree  vars  )  [static]

Definition at line 2681 of file decl2.c.

References rest_of_decl_compilation(), TREE_ASM_WRITTEN, TREE_CHAIN, and TREE_VALUE.

Referenced by cp_finish_file(), and finish_file().


Variable Documentation

Definition at line 54 of file c-common.c.


Generated on Wed Apr 8 15:28:36 2009 for Open64 by  doxygen 1.5.6