osprey/kg++fe/gnu/c-typeck.c File Reference

#include "config.h"
#include "system.h"
#include "rtl.h"
#include "tree.h"
#include "c-tree.h"
#include "tm_p.h"
#include "flags.h"
#include "output.h"
#include "expr.h"
#include "toplev.h"
#include "intl.h"
#include "ggc.h"
#include "target.h"

Include dependency graph for c-typeck.c:

Go to the source code of this file.

Data Types

type  spelling
type  init_node
type  constructor_stack
type  constructor_range_stack
type  initializer_stack
type  c_switch

Defines

#define SPELLING_STRING   1
#define SPELLING_MEMBER   2
#define SPELLING_BOUNDS   3
#define SPELLING_DEPTH()   (spelling - spelling_base)
#define RESTORE_SPELLING_DEPTH(DEPTH)   (spelling = spelling_base + (DEPTH))
#define PUSH_SPELLING(KIND, VALUE, MEMBER)

Functions/Subroutines

static tree qualify_type PARAMS ((tree, tree))
static int comp_target_types PARAMS ((tree, tree, int))
static tree
decl_constant_value_for_broken_optimization 
PARAMS ((tree))
static tree convert_arguments PARAMS ((tree, tree, tree, tree))
static tree unary_complex_lvalue PARAMS ((enum tree_code, tree, int))
static void pedantic_lvalue_warning PARAMS ((enum tree_code))
static tree
internal_build_compound_expr 
PARAMS ((tree, int))
static tree convert_for_assignment PARAMS ((tree, tree, const char *, tree, tree, int))
static void warn_for_assignment PARAMS ((const char *, const char *, tree, int))
static void push_string PARAMS ((const char *))
static void push_array_bounds PARAMS ((int))
static int spelling_length PARAMS ((void))
static char *print_spelling PARAMS ((char *))
static void output_init_element PARAMS ((tree, tree, tree, int))
tree require_complete_type (tree value)
void c_incomplete_type_error (tree value, tree type)
tree c_type_promotes_to (tree type)
static tree qualify_type (tree type, tree like)
tree common_type (tree t1, tree t2)
int comptypes (tree type1, tree type2)
static int comp_target_types (tree ttl, tree ttr, int reflexive)
static int function_types_compatible_p (tree f1, tree f2)
static int type_lists_compatible_p (tree args1, tree args2)
tree c_size_in_bytes (tree type)
tree decl_constant_value (tree decl)
static tree decl_constant_value_for_broken_optimization (tree decl)
static tree default_function_array_conversion (tree exp)
tree default_conversion (tree exp)
static tree lookup_field (tree decl, tree component)
tree build_component_ref (tree datum, tree component)
tree build_indirect_ref (tree ptr, const char *errorstring)
tree build_array_ref (tree array, tree index)
tree build_external_ref (tree id, int fun)
tree build_function_call (tree function, tree params)
static tree convert_arguments (tree typelist, tree values, tree name, tree fundecl)
tree parser_build_binary_op (enum tree_code code, tree arg1, tree arg2)
tree build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, int convert_p)
int c_tree_expr_nonnegative_p (tree t)
static tree pointer_diff (tree op0, tree op1)
tree build_unary_op (enum tree_code code, tree xarg, int flag)
int lvalue_p (tree ref)
int lvalue_or_else (tree ref, const char *msgid)
static tree unary_complex_lvalue (enum tree_code code, tree arg, int flag)
static void pedantic_lvalue_warning (enum tree_code code)
void readonly_warning (tree arg, const char *msgid)
bool c_mark_addressable (tree exp)
tree build_conditional_expr (tree ifexp, tree op1, tree op2)
tree build_compound_expr (tree list)
static tree internal_build_compound_expr (tree list, int first_p)
tree build_c_cast (tree type, tree expr)
tree c_cast_expr (tree type, tree expr)
tree build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
static tree convert_for_assignment (tree type, tree rhs, const char *errtype, tree fundecl, tree funname, int parmnum)
tree c_convert_parm_for_inlining (tree parm, tree value, tree fn)
static void warn_for_assignment (char *msgid, const char *opname, tree function, int argnum) const
static tree valid_compound_expr_initializer (tree value, tree endtype)
void store_init_value (tree decl, tree init)
static void push_string (char *string) const
static void push_member_name (tree decl)
static void push_array_bounds (int bounds)
static int spelling_length ()
static char * print_spelling (char *buffer)
void error_init (char *msgid) const
void pedwarn_init (char *msgid) const
static void warning_init (char *msgid) const
static tree digest_init (tree type, tree init, int require_constant)
void start_init (tree decl, tree asmspec_tree, int top_level)
void finish_init ()
void really_start_incremental_init (tree type)
void push_init_level (int implicit)
tree pop_init_level (int implicit)
static int set_designator (int array)
static void push_range_stack (tree range_end)
void set_init_index (tree first, tree last)
void set_init_label (tree fieldname)
static void add_pending_init (tree purpose, tree value)
static void set_nonincremental_init ()
static void set_nonincremental_init_from_string (tree str)
static tree find_init_member (tree field)
static void output_init_element (tree value, tree type, tree field, int pending)
static void output_pending_init_elements (int all)
void process_init_element (tree value)
tree simple_asm_stmt (tree expr)
tree build_asm_stmt (tree cv_qualifier, tree string, tree outputs, tree inputs, tree clobbers)
void c_expand_asm_operands (tree string, tree outputs, tree inputs, tree clobbers, int vol, const char *filename, int line)
tree c_expand_return (tree retval)
tree c_start_case (tree exp)
tree do_case (tree low_value, tree high_value)
void c_finish_case ()

Variables

static int missing_braces_mentioned
static int undeclared_variable_notice
static struct spellingspelling
static struct spellingspelling_base
static int spelling_size
static tree constructor_type
static tree constructor_fields
static tree constructor_index
static tree constructor_max_index
static tree constructor_unfilled_fields
static tree constructor_unfilled_index
static tree constructor_bit_index
static tree constructor_elements
static int constructor_incremental
static int constructor_constant
static int constructor_simple
static int constructor_erroneous
static int constructor_subconstants_deferred
static struct init_nodeconstructor_pending_elts
static int constructor_depth
int constructor_no_implicit = 0
static int require_constant_value
static int require_constant_elements
static tree constructor_decl
static const char * constructor_asmspec
static int constructor_top_level
static int constructor_designated
static int designator_depth
static int designator_errorneous
struct constructor_stackconstructor_stack
struct constructor_range_stackconstructor_range_stack
struct initializer_stackinitializer_stack
static struct c_switchswitch_stack


Define Documentation

#define PUSH_SPELLING ( KIND,
VALUE,
MEMBER   ) 

Value:

{                 \
  int depth = SPELLING_DEPTH ();          \
                  \
  if (depth >= spelling_size)           \
    {                 \
      spelling_size += 10;            \
      if (spelling_base == 0)           \
  spelling_base             \
    = (struct spelling *) xmalloc (spelling_size * sizeof (struct spelling)); \
      else                \
        spelling_base             \
    = (struct spelling *) xrealloc (spelling_base,    \
            spelling_size * sizeof (struct spelling));  \
      RESTORE_SPELLING_DEPTH (depth);         \
    }                 \
                  \
  spelling->kind = (KIND);            \
  spelling->MEMBER = (VALUE);           \
  spelling++;               \
}

Definition at line 4604 of file c-typeck.c.

Referenced by push_array_bounds(), push_member_name(), and push_string().

#define RESTORE_SPELLING_DEPTH ( DEPTH   )     (spelling = spelling_base + (DEPTH))

Definition at line 4599 of file c-typeck.c.

Referenced by pop_init_level(), process_init_element(), and start_init().

#define SPELLING_BOUNDS   3

Definition at line 4589 of file c-typeck.c.

Referenced by print_spelling(), push_array_bounds(), and spelling_length().

 
#define SPELLING_DEPTH (  )     (spelling - spelling_base)

Definition at line 4598 of file c-typeck.c.

Referenced by push_init_level(), and really_start_incremental_init().

#define SPELLING_MEMBER   2

Definition at line 4588 of file c-typeck.c.

Referenced by print_spelling(), and push_member_name().

#define SPELLING_STRING   1

Definition at line 4587 of file c-typeck.c.

Referenced by push_string().


Function Documentation

static void add_pending_init ( tree  purpose,
tree  value 
) [static]

tree build_array_ref ( tree  array,
tree  index 
)

tree build_asm_stmt ( tree  cv_qualifier,
tree  string,
tree  outputs,
tree  inputs,
tree  clobbers 
)

tree build_binary_op ( enum tree_code  code,
tree  orig_op0,
tree  orig_op1,
int convert_p   
)

tree build_c_cast ( tree  type,
tree  expr 
)

tree build_component_ref ( tree  datum,
tree  component 
)

tree build_compound_expr ( tree  list  ) 

tree build_conditional_expr ( tree  ifexp,
tree  op1,
tree  op2 
)

tree build_external_ref ( tree  id,
int  fun 
)

Definition at line 1378 of file c-typeck.c.

Referenced by c_parser_postfix_expression().

tree build_function_call ( tree  function,
tree  params 
)

tree build_indirect_ref ( tree  ptr,
const char *  errorstring 
)

tree build_modify_expr ( tree  lhs,
enum tree_code  modifycode,
tree  rhs 
)

tree build_unary_op ( enum tree_code  code,
tree  xarg,
int  flag 
)

Definition at line 2748 of file c-typeck.c.

Referenced by add_objc_string(), array_to_pointer_conversion(), build_base_path(), build_category_initializer(), build_const_cast(), build_const_cast_1(), build_delete(), build_dispatch_table_initializer(), build_dynamic_cast_1(), build_method_call(), build_module_descriptor(), build_new_op(), build_objc_string_object(), build_offset_ref(), build_offset_ref_call_from_tree(), build_over_call(), build_protocol_expr(), build_protocol_initializer(), build_reinterpret_cast(), build_reinterpret_cast_1(), build_shared_structure_initializer(), build_this(), build_typed_selector_reference(), build_unary_op(), build_up_reference(), build_vbase_delete(), build_vec_delete(), build_vec_init(), build_vfn_ref(), build_vtable_entry_ref(), build_x_unary_op(), c_common_truthvalue_conversion(), c_finish_omp_atomic(), c_parser_postfix_expression_after_primary(), convert_like_real(), convert_nontype_argument(), convert_to_base_statically(), convert_to_reference(), cxx_maybe_build_cleanup(), decay_conversion(), default_function_array_conversion(), expand_tree_builtin(), expand_unordered_cmp(), finish_decl(), finish_for_cond(), finish_message_expr(), finish_while_stmt_cond(), function_to_pointer_conversion(), generate_protocol_list(), generate_protocols(), generate_shared_structures(), generate_static_references(), get_member_function_from_ptrfunc(), get_super_receiver(), get_tinfo_ptr(), GTY(), init_def_list(), init_module_descriptor(), init_objc_symtab(), initialize_handler_parm(), initialize_reference(), one_static_initialization_or_destruction(), parser_build_unary_op(), rationalize_conditional_expr(), register_dtor_fn(), resolve_address_of_overloaded_function(), resolve_offset_ref(), simplify_loop_decl_cond(), stabilize_expr(), start_static_initialization_or_destruction(), tinfo_base_init(), truthvalue_conversion(), and unary_complex_lvalue().

tree c_cast_expr ( tree  type,
tree  expr 
)

Definition at line 3874 of file c-typeck.c.

References build_c_cast(), groktypename(), TREE_CODE, and warn_strict_prototypes.

Referenced by c_parser_cast_expression().

tree c_convert_parm_for_inlining ( tree  parm,
tree  value,
tree  fn 
)

void c_expand_asm_operands ( tree  string,
tree  outputs,
tree  inputs,
tree  clobbers,
int  vol,
const char *  filename,
int  line 
)

tree c_expand_return ( tree  retval  ) 

void c_finish_case (  ) 

void c_incomplete_type_error ( tree  value,
tree  type 
)

Definition at line 115 of file c-typeck.c.

Referenced by build_component_ref(), and require_complete_type().

bool c_mark_addressable ( tree  exp  ) 

tree c_size_in_bytes ( tree  type  ) 

tree c_start_case ( tree  exp  ) 

Definition at line 7239 of file c-typeck.c.

Referenced by c_parser_switch_statement().

int c_tree_expr_nonnegative_p ( tree  t  ) 

tree c_type_promotes_to ( tree  type  ) 

tree common_type ( tree  t1,
tree  t2 
)

static int comp_target_types ( tree  ttl,
tree  ttr,
int  reflexive 
) [static]

int comptypes ( tree  type1,
tree  type2 
)

static tree convert_arguments ( tree  typelist,
tree  values,
tree  name,
tree  fundecl 
) [static]

static tree convert_for_assignment ( tree  type,
tree  rhs,
const char *  errtype,
tree  fundecl,
tree  funname,
int  parmnum 
) [static]

tree decl_constant_value ( tree  decl  ) 

static tree decl_constant_value_for_broken_optimization ( tree  decl  )  [static]

Definition at line 803 of file c-typeck.c.

References decl_constant_value(), DECL_MODE, and pedantic.

Referenced by convert_for_assignment(), default_conversion(), and digest_init().

tree default_conversion ( tree  exp  ) 

static tree default_function_array_conversion ( tree  exp  )  [static]

static tree digest_init ( tree  type,
tree  init,
int  require_constant 
) [static]

tree do_case ( tree  low_value,
tree  high_value 
)

Definition at line 7284 of file c-typeck.c.

Referenced by c_parser_label().

void error_init ( char *  msgid  )  const

static tree find_init_member ( tree  field  )  [static]

void finish_init ( void   ) 

static int function_types_compatible_p ( tree  f1,
tree  f2 
) [static]

static tree internal_build_compound_expr ( tree  list,
int  first_p 
) [static]

static tree lookup_field ( tree  decl,
tree  component 
) [static]

int lvalue_or_else ( tree  ref,
const char *  msgid 
)

Definition at line 3209 of file c-typeck.c.

References error(), and lvalue_p().

Referenced by build_asm_expr(), build_asm_stmt(), build_modify_expr(), build_unary_op(), and finish_asm_stmt().

static int lvalue_p ( tree  ref  ) 

static void output_init_element ( tree  value,
tree  type,
tree  field,
int  pending 
) [static]

static void output_pending_init_elements ( int  all  )  [static]

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

static char* print_spelling PARAMS ( (char *)   )  [static]

static int spelling_length PARAMS ( (void  )  [static, read]

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

static void push_array_bounds PARAMS ( (int)   )  [static]

static void push_string PARAMS ( (const char *)   )  [static]

Definition at line 635 of file mips-tfile.c.

static void warn_for_assignment PARAMS ( (const char *, const char *, tree, int)   )  [static]

static tree convert_for_assignment PARAMS ( (tree, tree, const char *, tree, tree, int)   )  [static]

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

static void pedantic_lvalue_warning PARAMS ( (enum tree_code  )  [static]

static tree unary_complex_lvalue PARAMS ( (enum tree_code, tree, int)   )  [static]

static tree convert_arguments PARAMS ( (tree, tree, tree, tree  )  [static]

static tree decl_constant_value_for_broken_optimization PARAMS ( (tree  )  [static]

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

static tree qualify_type PARAMS ( (tree, tree  )  [static]

tree parser_build_binary_op ( enum tree_code  code,
tree  arg1,
tree  arg2 
)

static void pedantic_lvalue_warning ( enum tree_code  code  )  [static]

Definition at line 3270 of file c-typeck.c.

References pedantic, and pedwarn().

Referenced by build_modify_expr(), build_unary_op(), and unary_complex_lvalue().

void pedwarn_init ( char *  msgid  )  const

static tree pointer_diff ( tree  op0,
tree  op1 
) [static]

tree pop_init_level ( int  implicit  )  [read]

static char* print_spelling ( char *  buffer  )  [static]

void process_init_element ( tree  value  ) 

static void push_array_bounds ( int  bounds  )  [static]

Definition at line 4650 of file c-typeck.c.

References PUSH_SPELLING, and SPELLING_BOUNDS.

Referenced by process_init_element(), and push_init_level().

void push_init_level ( int  implicit  ) 

Definition at line 5354 of file c-typeck.c.

Referenced by c_parser_braced_init(), process_init_element(), and set_designator().

static void push_member_name ( tree  decl  )  [static]

static void push_range_stack ( tree  range_end  )  [static]

static void push_string ( char *  string  )  const [static]

Definition at line 4629 of file c-typeck.c.

References PUSH_SPELLING, and SPELLING_STRING.

Referenced by start_init().

static tree qualify_type ( tree  type,
tree  like 
) [static]

Definition at line 206 of file c-typeck.c.

References c_build_qualified_type(), and TYPE_QUALS.

Referenced by build_conditional_expr(), and composite_type().

void readonly_warning ( tree  arg,
const char *  msgid 
)

void really_start_incremental_init ( tree  type  ) 

Definition at line 5247 of file c-typeck.c.

Referenced by c_parser_braced_init().

tree require_complete_type ( tree  value  ) 

static int set_designator ( int  array  )  [static]

void set_init_index ( tree  first,
tree  last 
)

Definition at line 5800 of file c-typeck.c.

Referenced by c_parser_initelt().

void set_init_label ( tree  fieldname  ) 

Definition at line 5869 of file c-typeck.c.

Referenced by c_parser_initelt().

static void set_nonincremental_init ( void   )  [static]

static void set_nonincremental_init_from_string ( tree  str  )  [static]

tree simple_asm_stmt ( tree  expr  ) 

static int spelling_length ( void   )  [static]

Definition at line 4659 of file c-typeck.c.

References spelling::kind, p, spelling::s, size, SPELLING_BOUNDS, strlen(), and spelling::u.

Referenced by error_init(), pedwarn_init(), and warning_init().

void start_init ( tree  decl,
tree asmspec_tree  ,
int  top_level 
)

void store_init_value ( tree  decl,
tree  init 
)

static int type_lists_compatible_p ( tree  args1,
tree  args2 
) [static]

static tree unary_complex_lvalue ( enum tree_code  code,
tree  arg,
int  flag 
) [static]

static tree valid_compound_expr_initializer ( tree  value,
tree  endtype 
) [static]

static void warn_for_assignment ( char *  msgid,
const char *  opname,
tree  function,
int  argnum 
) const [static]

static void warning_init ( char *  msgid  )  const [static]


Variable Documentation

const char* constructor_asmspec [static]

Definition at line 5036 of file c-typeck.c.

Definition at line 4979 of file c-typeck.c.

int constructor_constant [static]

Definition at line 4991 of file c-typeck.c.

Definition at line 5033 of file c-typeck.c.

int constructor_depth [static]

Definition at line 5022 of file c-typeck.c.

int constructor_designated [static]

Definition at line 5042 of file c-typeck.c.

int constructor_erroneous [static]

Definition at line 4997 of file c-typeck.c.

Definition at line 4961 of file c-typeck.c.

Definition at line 4988 of file c-typeck.c.

Definition at line 4965 of file c-typeck.c.

Definition at line 4968 of file c-typeck.c.

Definition at line 5025 of file c-typeck.c.

Definition at line 5019 of file c-typeck.c.

Definition at line 5099 of file c-typeck.c.

int constructor_simple [static]

Definition at line 4994 of file c-typeck.c.

Definition at line 5084 of file c-typeck.c.

Definition at line 5000 of file c-typeck.c.

int constructor_top_level [static]

Definition at line 5039 of file c-typeck.c.

Definition at line 4957 of file c-typeck.c.

Definition at line 4971 of file c-typeck.c.

Definition at line 4975 of file c-typeck.c.

int designator_depth [static]

Definition at line 5045 of file c-typeck.c.

int designator_errorneous [static]

Definition at line 5048 of file c-typeck.c.

Definition at line 5122 of file c-typeck.c.

Definition at line 52 of file c-typeck.c.

Referenced by push_init_level(), and start_init().

Definition at line 5028 of file c-typeck.c.

Referenced by finish_init(), output_init_element(), and start_init().

int require_constant_value [static]

Definition at line 4591 of file c-typeck.c.

Definition at line 4592 of file c-typeck.c.

int spelling_size [static]

Definition at line 4593 of file c-typeck.c.

Definition at line 7233 of file c-typeck.c.

Referenced by finish_case_label(), pop_switch(), and push_switch().

Definition at line 55 of file c-typeck.c.

Referenced by build_external_ref(), and unqualified_name_lookup_error().


Generated on Wed Apr 8 15:13:18 2009 for Open64 by  doxygen 1.5.6