osprey/kgccfe/gnu/c-decl.c File Reference

#include "config.h"
#include "system.h"
#include "intl.h"
#include "tree.h"
#include "tree-inline.h"
#include "rtl.h"
#include "flags.h"
#include "function.h"
#include "output.h"
#include "expr.h"
#include "c-tree.h"
#include "toplev.h"
#include "ggc.h"
#include "tm_p.h"
#include "cpplib.h"
#include "target.h"
#include "debug.h"
#include "timevar.h"
#include "c-common.h"
#include "c-pragma.h"
#include "libfuncs.h"
#include "except.h"
#include "gt-c-decl.h"

Include dependency graph for c-decl.c:

Go to the source code of this file.

Defines

#define NULL_BINDING_LEVEL   (struct binding_level *) NULL

Enumerations

enum  decl_context {
  NORMAL, FUNCDEF, PARM, FIELD,
  BITFIELD, TYPENAME, NORMAL, FUNCDEF,
  PARM, CATCHPARM, FIELD, BITFIELD,
  TYPENAME, MEMFUNCDEF, NORMAL, FUNCDEF,
  PARM, FIELD, BITFIELD, TYPENAME,
  NORMAL, FUNCDEF, PARM, CATCHPARM,
  FIELD, BITFIELD, TYPENAME, MEMFUNCDEF,
  NORMAL, FUNCDEF, PARM, FIELD,
  TYPENAME, NORMAL, FUNCDEF, PARM,
  CATCHPARM, FIELD, BITFIELD, TYPENAME,
  MEMFUNCDEF, NORMAL, FUNCDEF, PARM,
  FIELD, TYPENAME, NORMAL, FUNCDEF,
  PARM, CATCHPARM, FIELD, BITFIELD,
  TYPENAME, MEMFUNCDEF
}

Functions/Subroutines

static GTY (())
void c_print_identifier (FILE *file, tree node, int indent)
void c_finish_incomplete_decl (tree decl)
static struct binding_levelmake_binding_level ()
static void pop_binding_level (struct binding_level **lp)
int global_bindings_p ()
void keep_next_level ()
int kept_level_p ()
void declare_parm_level (definition_flag)
int in_parm_level_p ()
void pushlevel (int tag_transparent)
static void clear_limbo_values (tree block)
tree poplevel (int keep, int reverse, int functionbody)
void insert_block (tree block)
void set_block (tree block)
void push_label_level ()
void pop_label_level ()
void pushtag (tree name, tree type)
static int duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
static void warn_if_shadowing (tree x, tree oldlocal)
tree pushdecl (tree x)
tree pushdecl_top_level (tree x)
tree implicitly_declare (tree functionid)
void implicit_decl_warning (tree id)
static int redeclaration_error_message (tree newdecl, tree olddecl)
tree lookup_label (tree id)
tree shadow_label (tree name)
tree define_label (char *filename, int line, tree name) const
tree getdecls ()
tree gettags ()
static void storedecls (tree decls)
static void storetags (tree tags)
static tree lookup_tag (enum tree_code code, tree name, struct binding_level *binding_level, int thislevel_only)
void pending_xref_error ()
static tree lookup_tag_reverse (tree type)
tree lookup_name (tree name)
tree lookup_name_current_level (tree name)
void c_init_decl_processing ()
static tree c_make_fname_decl (tree id, int type_dep)
tree builtin_function (char *name, tree type, int function_code, enum built_in_class class, const char *library_name, tree attrs) const
void c_insert_default_attributes (tree decl)
void shadow_tag (tree declspecs)
void shadow_tag_warned (tree declspecs, int warned)
tree build_array_declarator (tree expr, tree quals, int static_p, int vla_unspec_p)
tree set_array_declarator_type (tree decl, tree type, int abstract_p)
tree groktypename (tree typename)
tree groktypename_in_parm_context (tree typename)
tree start_decl (tree declarator, tree declspecs, int initialized, tree attributes)
void finish_decl (tree decl, tree init, tree asmspec_tree)
void push_parm_decl (tree parm)
void clear_parm_order ()
tree build_compound_literal (tree type, tree init)
int complete_array_type (tree type, tree initial_value, int do_default)
static bool flexible_array_type_p (tree type)
static tree grokdeclarator (tree declarator, tree declspecs, enum decl_context decl_context, int initialized)
static tree grokparms (tree parms_info, int funcdef_flag)
tree get_parm_info (int void_at_end)
void parmlist_tags_warning ()
tree xref_tag (enum tree_code code, tree name)
tree start_struct (enum tree_code code, tree name)
tree grokfield (filename, line, tree declarator, tree declspecs, tree width) const
static int field_decl_cmp (PTR xp, const PTR yp) const
tree finish_struct (tree t, tree fieldlist, tree attributes)
static void layout_array_type (tree t)
tree start_enum (tree name)
tree finish_enum (tree enumtype, tree values, tree attributes)
tree build_enumerator (tree name, tree value)
int start_function (tree declspecs, tree declarator, tree attributes)
void store_parm_decls ()
void finish_function (int nested, int can_defer_p)
void c_expand_deferred_function (tree fndecl)
static tree set_save_expr_context (tree *tp, int *walk_subtrees, void *data)
static void c_expand_body (tree fndecl, int nested_p, int can_defer_p)
void check_for_loop_decls ()
void c_push_function_context (struct function *f)
void c_pop_function_context (struct function *f)
void c_dup_lang_specific_decl (tree decl)
int stmts_are_full_exprs_p ()
stmt_tree current_stmt_tree ()
treecurrent_scope_stmt_stack ()
int anon_aggr_type_p (node)
void extract_interface_info ()
tree c_begin_compound_stmt ()
void c_expand_decl_stmt (tree t)
tree identifier_global_value (tree t)
void record_builtin_type (enum rid rid_index, const char *name, tree type)
tree build_void_list_node ()
tree make_pointer_declarator (tree type_quals_attrs, tree target)

Variables

tree pending_invalid_xref
const char * pending_invalid_xref_file
int pending_invalid_xref_line
static tree enum_next_value
static int enum_overflow
static tree last_function_parms
static tree last_function_parm_tags
static tree current_function_parms
static tree current_function_parm_tags
static const char * current_function_prototype_file
static int current_function_prototype_line
static int keep_next_level_flag
static int keep_next_if_subblocks
static enum deprecated_states deprecated_state = DEPRECATED_NORMAL


Define Documentation

#define NULL_BINDING_LEVEL   (struct binding_level *) NULL

Definition at line 247 of file c-decl.c.


Enumeration Type Documentation

Enumerator:
NORMAL 
FUNCDEF 
PARM 
FIELD 
BITFIELD 
TYPENAME 
NORMAL 
FUNCDEF 
PARM 
CATCHPARM 
FIELD 
BITFIELD 
TYPENAME 
MEMFUNCDEF 
NORMAL 
FUNCDEF 
PARM 
FIELD 
BITFIELD 
TYPENAME 
NORMAL 
FUNCDEF 
PARM 
CATCHPARM 
FIELD 
BITFIELD 
TYPENAME 
MEMFUNCDEF 
NORMAL 
FUNCDEF 
PARM 
FIELD 
TYPENAME 
NORMAL 
FUNCDEF 
PARM 
CATCHPARM 
FIELD 
BITFIELD 
TYPENAME 
MEMFUNCDEF 
NORMAL 
FUNCDEF 
PARM 
FIELD 
TYPENAME 
NORMAL 
FUNCDEF 
PARM 
CATCHPARM 
FIELD 
BITFIELD 
TYPENAME 
MEMFUNCDEF 

Definition at line 70 of file c-decl.c.


Function Documentation

int anon_aggr_type_p ( node   ) 

Definition at line 7368 of file c-decl.c.

tree build_array_declarator ( tree  expr,
tree  quals,
int  static_p,
int  vla_unspec_p 
)

Definition at line 2789 of file c-decl.c.

References build_nt(), flag_isoc99, NULL_TREE, pedantic, pedwarn(), TREE_STATIC, TREE_TYPE, and warning.

tree build_compound_literal ( tree  type,
tree  init 
)

tree build_enumerator ( tree  name,
tree  value 
)

tree build_void_list_node ( void   ) 

Definition at line 7440 of file c-decl.c.

References build_tree_list, NULL_TREE, and void_type_node.

tree builtin_function ( char *  name,
tree  type,
int  function_code,
enum built_in_class  class,
const char *  library_name,
tree  attrs 
) const

tree c_begin_compound_stmt (  ) 

Definition at line 7385 of file c-decl.c.

References add_stmt(), build_stmt(), and NULL_TREE.

void c_dup_lang_specific_decl ( tree  decl  ) 

Definition at line 7317 of file c-decl.c.

References DECL_LANG_SPECIFIC, ggc_alloc, and memcpy.

static void c_expand_body ( tree  fndecl,
int  nested_p,
int  can_defer_p 
) [static]

void c_expand_decl_stmt ( tree  t  ) 

void c_expand_deferred_function ( tree  fndecl  ) 

void c_finish_incomplete_decl ( tree  decl  ) 

void c_init_decl_processing ( void   ) 

void c_insert_default_attributes ( tree  decl  ) 

Definition at line 2682 of file c-decl.c.

References c_common_insert_default_attributes(), and TREE_PUBLIC.

static tree c_make_fname_decl ( tree  id,
int  type_dep 
) [static]

void c_pop_function_context ( struct function f  ) 

void c_print_identifier ( FILE file,
tree  node,
int  indent 
)

void c_push_function_context ( struct function f  ) 

void check_for_loop_decls ( void   ) 

static void clear_limbo_values ( tree  block  )  [static]

void clear_parm_order (  ) 

Definition at line 3383 of file c-decl.c.

References current_binding_level, and NULL_TREE.

int complete_array_type ( tree  type,
tree  initial_value,
int  do_default 
)

tree* current_scope_stmt_stack (  ) 

Definition at line 7359 of file c-decl.c.

stmt_tree current_stmt_tree ( void   ) 

Definition at line 7351 of file c-decl.c.

void declare_parm_level ( definition_flag   ) 

Definition at line 433 of file c-decl.c.

References current_binding_level.

tree define_label ( char *  filename,
int  line,
tree  name 
) const

static int duplicate_decls ( tree  newdecl,
tree  olddecl,
int  different_binding_level 
) [static]

Definition at line 884 of file c-decl.c.

References abort, build_function_type(), build_type_attribute_variant(), c_type_promotes_to(), char_type_node, common_type(), comptypes(), COPY_DECL_ASSEMBLER_NAME, COPY_DECL_RTL, Create_ST_For_Tree(), current_binding_level, debug_hooks, DECL_ABSTRACT_ORIGIN, DECL_ALIGN, DECL_ARGUMENTS, DECL_ATTRIBUTES, DECL_BUILT_IN, DECL_BUILT_IN_CLASS, DECL_BUILT_IN_NONANSI, DECL_CONTEXT, DECL_DECLARED_INLINE_P, DECL_EXTERNAL, DECL_FUNCTION_CODE, DECL_IN_SYSTEM_HEADER, DECL_INITIAL, DECL_INLINE, DECL_MODE, DECL_NAME, DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK, DECL_NUM_STMTS, DECL_ORIGIN, DECL_P, DECL_RESULT, DECL_RTL_SET_P, DECL_SAVED_INSNS, DECL_SAVED_TREE, DECL_SECTION_NAME, DECL_SIZE, DECL_SIZE_UNIT, DECL_SOURCE_FILE, DECL_SOURCE_LINE, DECL_ST, DECL_ST2(), DECL_STATIC_CONSTRUCTOR, DECL_STATIC_DESTRUCTOR, DECL_THREAD_LOCAL, DECL_UID, DECL_UNINLINABLE, DECL_USER_ALIGN, error(), error_mark_node, global_binding_level, in_system_header, layout_decl(), layout_type(), lookup_attribute(), make_decl_rtl(), make_var_volatile(), memcpy, merge_attributes(), gcc_target::merge_decl_attributes, merge_weak(), NOT_BUILT_IN, NULL, NULL_TREE, gcc_debug_hooks::outlining_inline_function, pedantic, redeclaration_error_message(), self_promoting_args_p(), targetm, TREE_ASM_WRITTEN, TREE_CHAIN, TREE_CODE, tree_cons, TREE_PUBLIC, TREE_READONLY, TREE_SIDE_EFFECTS, TREE_STATIC, TREE_THIS_VOLATILE, TREE_TYPE, TREE_USED, TREE_VALUE, TYPE_ACTUAL_ARG_TYPES, TYPE_ARG_TYPES, TYPE_ATTRIBUTES, TYPE_MAIN_VARIANT, TYPE_MODE, void_type_node, warn_redundant_decls, warn_shadow, warn_traditional, and WFE_Resolve_Duplicate_Decls().

void extract_interface_info (  ) 

Definition at line 7377 of file c-decl.c.

static int field_decl_cmp ( PTR  xp,
const PTR  yp 
) const [static]

Definition at line 5390 of file c-decl.c.

References DECL_NAME, NULL, x, and is::y.

void finish_decl ( tree  decl,
tree  init,
tree  asmspec_tree 
)

tree finish_enum ( tree  enumtype,
tree  values,
tree  attributes 
)

void finish_function ( int  nested,
int  can_defer_p 
)

tree finish_struct ( tree  t,
tree  fieldlist,
tree  attributes 
)

static bool flexible_array_type_p ( tree  type  )  [static]

tree get_parm_info ( int  void_at_end  )  [read]

tree getdecls ( void   ) 

Definition at line 2378 of file c-decl.c.

References current_binding_level.

tree gettags (  ) 

Definition at line 2386 of file c-decl.c.

References current_binding_level.

int global_bindings_p ( void   ) 

Definition at line 403 of file c-decl.c.

References current_binding_level, and global_binding_level.

static tree grokdeclarator ( tree  declarator,
tree  declspecs,
enum decl_context  decl_context,
int  initialized 
) [static]

Definition at line 3584 of file c-decl.c.

References abort, arg_types, ATTR_FLAG_ARRAY_NEXT, ATTR_FLAG_DECL_NEXT, ATTR_FLAG_FUNCTION_NEXT, BITFIELD, bitsize_zero_node, build(), build_array_type(), build_complex_type(), build_decl, build_decl_attribute_variant(), build_function_type(), build_index_type(), build_pointer_type(), build_range_type(), c_apply_type_quals_to_decl(), c_build_qualified_type(), c_common_signed_type(), c_common_unsigned_type(), C_DECL_VARIABLE_SIZE, C_FUNCTION_IMPLICIT_INT, C_IS_RESERVED_WORD, c_mark_addressable(), C_RID_CODE, C_TYPE_FIELDS_VOLATILE, c_type_promotes_to(), C_TYPE_VARIABLE_SIZE, C_TYPEDEF_EXPLICITLY_SIGNED, chainon(), char_type_node, COMPLETE_OR_UNBOUND_ARRAY_TYPE_P, COMPLETE_TYPE_P, complex_double_type_node, complex_float_type_node, complex_integer_type_node, complex_long_double_type_node, constant_expression_warning(), convert(), current_binding_level, current_function_decl, DECL_ARG_TYPE, DECL_ARG_TYPE_AS_WRITTEN, DECL_ATTRIBUTES, decl_attributes(), DECL_DECLARED_INLINE_P, DECL_EXTERNAL, DECL_IN_SYSTEM_HEADER, DECL_INLINE, DECL_LANG_SPECIFIC, DECL_NONADDRESSABLE_P, DECL_REGISTER, DECL_THREAD_LOCAL, DEPRECATED_SUPPRESS, DID_INLINE_FUNC, double_type_node, error(), error_mark_node, extra_warnings, FALSE, FIELD, flag_gen_aux_info, flag_inline_trees, flag_isoc99, flag_signed_bitfields, flexible_array_type_p(), float_type_node, fold(), FUNCDEF, ggc_alloc_cleared, global_binding_level, grokparms(), gcc_target::have_tls, i, IDENTIFIER_POINTER, in_system_header, index_type, int, integer_one_node, integer_type_node, integer_zerop(), INTEGRAL_TYPE_P, last_function_parm_tags, layout_type(), long_double_type_node, long_integer_type_node, long_long_integer_type_node, long_long_unsigned_type_node, long_unsigned_type_node, lookup_name(), MAIN_NAME_P, NORMAL, NULL_TREE, ok(), PARM, pedantic, pedwarn(), pedwarn_c99(), RID_AUTO, RID_CHAR, RID_COMPLEX, RID_CONST, RID_EXTERN, RID_INLINE, RID_INT, RID_LAST_MODIFIER, RID_LONG, RID_REGISTER, RID_RESTRICT, RID_SHORT, RID_SIGNED, RID_STATIC, RID_THREAD, RID_TYPEDEF, RID_UNSIGNED, RID_VOLATILE, ridpointers, short_integer_type_node, short_unsigned_type_node, signed_char_type_node, size, size_one_node, size_zero_node, sizetype, split_specs_attrs(), STRIP_TYPE_NOPS, targetm, TREE_CHAIN, TREE_CODE, TREE_CONSTANT, TREE_DEPRECATED, tree_int_cst_sgn(), TREE_OPERAND, TREE_OVERFLOW, TREE_PUBLIC, TREE_PURPOSE, TREE_STATIC, TREE_TYPE, TREE_VALUE, TRUE, TYPE_ALIGN, TYPE_CONTEXT, TYPE_DOMAIN, TYPE_MAIN_VARIANT, TYPE_QUAL_CONST, TYPE_QUAL_RESTRICT, TYPE_QUAL_VOLATILE, TYPE_QUALS, TYPE_READONLY, TYPE_RESTRICT, TYPE_SIZE, TYPE_SIZE_UNIT, TYPE_UNQUALIFIED, TYPE_VOLATILE, TYPENAME, unsigned_char_type_node, unsigned_type_node, variable_size(), VOID_TYPE_P, warn_deprecated_use(), warn_implicit_int, warn_long_long, warn_return_type, and warning.

tree grokfield ( filename  ,
line  ,
tree  declarator,
tree  declspecs,
tree  width 
) const

static tree grokparms ( tree  parms_info,
int  funcdef_flag 
) [static]

tree groktypename ( tree  typename  ) 

tree groktypename_in_parm_context ( tree  typename  ) 

Definition at line 2854 of file c-decl.c.

References grokdeclarator(), PARM, TREE_CODE, TREE_PURPOSE, and TREE_VALUE.

static GTY ( ()   )  [static]

Definition at line 130 of file c-decl.c.

References blocks, binding_level::level_chain, and names.

tree identifier_global_value ( tree  t  ) 

Definition at line 7415 of file c-decl.c.

References IDENTIFIER_GLOBAL_VALUE.

void implicit_decl_warning ( tree  id  ) 

Definition at line 2172 of file c-decl.c.

References error(), IDENTIFIER_POINTER, mesg_implicit_function_declaration, and warning.

tree implicitly_declare ( tree  functionid  ) 

int in_parm_level_p (  ) 

Definition at line 442 of file c-decl.c.

References current_binding_level.

void insert_block ( tree  block  ) 

Definition at line 738 of file c-decl.c.

References chainon(), current_binding_level, and TREE_USED.

void keep_next_level ( void   ) 

Definition at line 409 of file c-decl.c.

int kept_level_p ( void   ) 

Definition at line 417 of file c-decl.c.

References current_binding_level.

static void layout_array_type ( tree  t  )  [static]

Definition at line 5786 of file c-decl.c.

References layout_array_type(), layout_type(), TREE_CODE, and TREE_TYPE.

tree lookup_label ( tree  id  ) 

tree lookup_name ( tree  name  ) 

tree lookup_name_current_level ( tree  name  ) 

static tree lookup_tag ( enum tree_code  code,
tree  name,
struct binding_level binding_level,
int  thislevel_only 
) [static]

static tree lookup_tag_reverse ( tree  type  )  [static]

static struct binding_level* make_binding_level ( void   )  [static, read]

Definition at line 374 of file c-decl.c.

References free_binding_level, ggc_alloc, binding_level::level_chain, and result.

tree make_pointer_declarator ( tree  type_quals_attrs,
tree  target 
)

Definition at line 7456 of file c-decl.c.

References build1, NULL_TREE, split_specs_attrs(), and tree_cons.

void parmlist_tags_warning (  ) 

void pending_xref_error ( void   ) 

static void pop_binding_level ( struct binding_level **  lp  )  [static]

Definition at line 389 of file c-decl.c.

References free_binding_level, binding_level::level_chain, and memset.

void pop_label_level (  ) 

tree poplevel ( int  keep,
int  reverse,
int  functionbody 
)

void push_label_level (  ) 

void push_parm_decl ( tree  parm  ) 

tree pushdecl ( tree  x  ) 

tree pushdecl_top_level ( tree  x  ) 

Definition at line 2096 of file c-decl.c.

References b, current_binding_level, global_binding_level, and pushdecl().

void pushlevel ( int  tag_transparent  ) 

void pushtag ( tree  name,
tree  type 
)

void record_builtin_type ( enum rid  rid_index,
const char *  name,
tree  type 
)

Definition at line 7425 of file c-decl.c.

References build_decl, get_identifier(), int, pushdecl(), and ridpointers.

static int redeclaration_error_message ( tree  newdecl,
tree  olddecl 
) [static]

tree set_array_declarator_type ( tree  decl,
tree  type,
int  abstract_p 
)

Definition at line 2819 of file c-decl.c.

References error(), NULL_TREE, TREE_OPERAND, TREE_STATIC, and TREE_TYPE.

void set_block ( tree  block  ) 

Definition at line 750 of file c-decl.c.

References BLOCK_SUBBLOCKS, BLOCK_VARS, chainon(), and current_binding_level.

static tree set_save_expr_context ( tree tp,
int *  walk_subtrees,
void data 
) [static]

Definition at line 6906 of file c-decl.c.

References DECL_P, NULL_TREE, SAVE_EXPR_CONTEXT, and TREE_CODE.

tree shadow_label ( tree  name  ) 

void shadow_tag ( tree  declspecs  ) 

Definition at line 2699 of file c-decl.c.

References shadow_tag_warned().

void shadow_tag_warned ( tree  declspecs,
int  warned 
)

tree start_decl ( tree  declarator,
tree  declspecs,
int  initialized,
tree  attributes 
)

tree start_enum ( tree  name  ) 

int start_function ( tree  declspecs,
tree  declarator,
tree  attributes 
)

tree start_struct ( enum tree_code  code,
tree  name 
)

int stmts_are_full_exprs_p ( void   ) 

Definition at line 7341 of file c-decl.c.

void store_parm_decls ( void   ) 

static void storedecls ( tree  decls  )  [static]

Definition at line 2396 of file c-decl.c.

References current_binding_level.

static void storetags ( tree  tags  )  [static]

Definition at line 2405 of file c-decl.c.

References current_binding_level.

static void warn_if_shadowing ( tree  x,
tree  oldlocal 
) [static]

tree xref_tag ( enum tree_code  code,
tree  name 
)


Variable Documentation

Definition at line 121 of file c-decl.c.

Definition at line 118 of file c-decl.c.

const char* current_function_prototype_file [static]

Definition at line 125 of file c-decl.c.

Definition at line 126 of file c-decl.c.

enum deprecated_states deprecated_state = DEPRECATED_NORMAL [static]

Definition at line 323 of file c-decl.c.

Definition at line 98 of file c-decl.c.

int enum_overflow [static]

Definition at line 102 of file c-decl.c.

int keep_next_if_subblocks [static]

Definition at line 276 of file c-decl.c.

int keep_next_level_flag [static]

Definition at line 267 of file c-decl.c.

Definition at line 112 of file c-decl.c.

Definition at line 107 of file c-decl.c.

Definition at line 87 of file c-decl.c.

Definition at line 89 of file c-decl.c.

Definition at line 90 of file c-decl.c.


Generated on Wed Apr 8 15:12:39 2009 for Open64 by  doxygen 1.5.6