osprey/kgccfe/gnu/cp/error.c File Reference

#include "config.h"
#include "system.h"
#include "tree.h"
#include "cp-tree.h"
#include "real.h"
#include "toplev.h"
#include "flags.h"
#include "diagnostic.h"
#include "langhooks-def.h"

Include dependency graph for error.c:

Go to the source code of this file.

Defines

#define sorry_for_unsupported_tree(T)
#define print_scope_operator(BUFFER)   output_add_string ((BUFFER), "::")
#define print_left_paren(BUFFER)   output_add_character ((BUFFER), '(')
#define print_right_paren(BUFFER)   output_add_character ((BUFFER), ')')
#define print_left_bracket(BUFFER)   output_add_character ((BUFFER), '[')
#define print_right_bracket(BUFFER)   output_add_character ((BUFFER), ']')
#define print_template_argument_list_start(BUFFER)   print_non_consecutive_character ((BUFFER), '<')
#define print_template_argument_list_end(BUFFER)   print_non_consecutive_character ((BUFFER), '>')
#define print_tree_identifier(BUFFER, TID)   output_add_string ((BUFFER), IDENTIFIER_POINTER (TID))
#define print_identifier(BUFFER, ID)   output_add_string ((BUFFER), (ID))
#define separate_with_comma(BUFFER)   output_add_string ((BUFFER), ", ")
#define NEXT_CODE(T)   (TREE_CODE (TREE_TYPE (T)))
#define reinit_global_formatting_buffer()   output_clear_message_text (scratch_buffer)
#define next_tree   va_arg (*text->args_ptr, tree)
#define next_tcode   va_arg (*text->args_ptr, enum tree_code)
#define next_lang   va_arg (*text->args_ptr, enum languages)
#define next_int   va_arg (*text->args_ptr, int)

Enumerations

enum  pad {
  none, before, after, none,
  before, after
}

Functions/Subroutines

static const char *args_to_string PARAMS ((tree, int))
static const char *assop_to_string PARAMS ((enum tree_code, int))
static const char *parm_to_string PARAMS ((int, int))
static void dump_simple_decl PARAMS ((tree, tree, int))
static void dump_unary_op PARAMS ((const char *, tree, int))
static void dump_global_iord PARAMS ((tree))
static enum pad dump_qualifiers PARAMS ((tree, enum pad))
static void dump_char PARAMS ((int))
static void dump_template_bindings PARAMS ((tree, tree))
static void dump_template_parms PARAMS ((tree, int, int))
static void
maybe_print_instantiation_context 
PARAMS ((diagnostic_context *))
static void
print_instantiation_partial_context 
PARAMS ((diagnostic_context *, tree, const char *, int))
static void cp_diagnostic_starter PARAMS ((diagnostic_context *, diagnostic_info *))
static bool cp_printer PARAMS ((output_buffer *, text_info *))
static void
print_non_consecutive_character 
PARAMS ((output_buffer *, int))
static void print_integer PARAMS ((output_buffer *, HOST_WIDE_INT))
static tree locate_error PARAMS ((const char *, va_list))
void init_error ()
static void dump_scope (tree scope, int flags)
static enum pad dump_qualifiers (tree t, enum pad p)
static void dump_template_argument (tree arg, int flags)
static void dump_template_argument_list (tree args, int flags)
static void dump_template_parameter (tree parm, int flags)
static void dump_template_bindings (tree parms, tree args)
static void dump_type (tree t, int flags)
static void dump_typename (tree t, int flags)
static const char * class_key_or_enum (tree t)
static void dump_aggr_type (tree t, int flags)
static enum pad dump_type_prefix (tree t, int flags)
static void dump_type_suffix (tree t, int flags)
static void dump_global_iord (tree t)
static void dump_simple_decl (tree t, tree type, int flags)
static void dump_decl (tree t, int flags)
static void dump_template_decl (tree t, int flags)
static void dump_function_decl (tree t, int flags)
static void dump_parameters (tree parmtypes, int flags)
static void dump_exception_spec (tree t, int flags)
static void dump_function_name (tree t, int flags)
static void dump_template_parms (tree info, int primary, int flags)
static void dump_char (int c)
static void dump_expr_list (tree l, int flags)
static void dump_expr (tree t, int flags)
static void dump_binary_op (char *opstring, tree t, int flags) const
static void dump_unary_op (char *opstring, tree t, int flags) const
const char * type_as_string (tree typ, int flags)
const char * expr_as_string (tree decl, int flags)
const char * decl_as_string (tree decl, int flags)
const char * context_as_string (tree context, int flags)
const char * lang_decl_name (tree decl, int v)
const char * cp_file_of (tree t)
int cp_line_of (tree t)
static const char * decl_to_string (tree decl, int verbose)
static const char * expr_to_string (tree decl, verbose)
static const char * fndecl_to_string (tree fndecl, int verbose)
static const char * code_to_string (enum tree_code c, v)
const char * language_to_string (enum languages c, v)
static const char * parm_to_string (int p, v)
static const char * op_to_string (enum tree_code p, v)
static const char * type_to_string (tree typ, int verbose)
static const char * assop_to_string (enum tree_code p, v)
static const char * args_to_string (tree p, int verbose)
static const char * cv_to_string (tree p, int v)
void cxx_print_error_function (diagnostic_context *context, const char *file)
static void cp_diagnostic_starter (diagnostic_context *context, diagnostic_info *diagnostic)
static void cp_diagnostic_finalizer (diagnostic_context *context, diagnostic)
static void cp_print_error_function (diagnostic_context *context, diagnostic_info *diagnostic)
static const char * function_category (tree fn)
static void print_instantiation_full_context (diagnostic_context *context)
static void print_instantiation_partial_context (diagnostic_context *context, tree t, const char *file, int line)
static void maybe_print_instantiation_context (diagnostic_context *context)
void print_instantiation_context ()
static bool cp_printer (output_buffer *buffer, text_info *text)
static void print_integer (output_buffer *buffer, HOST_WIDE_INT i)
static void print_non_consecutive_character (output_buffer *buffer, int c)
static tree locate_error (char *msgid, va_list ap) const
void cp_error_at VPARAMS ((const char *msgid,...))

Variables

static output_buffer scratch_buffer_rec
static output_bufferscratch_buffer = &scratch_buffer_rec
static char digit_buffer [128]


Define Documentation

#define NEXT_CODE ( T   )     (TREE_CODE (TREE_TYPE (T)))

Definition at line 58 of file error.c.

#define next_int   va_arg (*text->args_ptr, int)

#define next_lang   va_arg (*text->args_ptr, enum languages)

#define next_tcode   va_arg (*text->args_ptr, enum tree_code)

#define next_tree   va_arg (*text->args_ptr, tree)

#define print_identifier ( BUFFER,
ID   )     output_add_string ((BUFFER), (ID))

Definition at line 49 of file error.c.

#define print_left_bracket ( BUFFER   )     output_add_character ((BUFFER), '[')

Definition at line 41 of file error.c.

#define print_left_paren ( BUFFER   )     output_add_character ((BUFFER), '(')

Definition at line 39 of file error.c.

#define print_right_bracket ( BUFFER   )     output_add_character ((BUFFER), ']')

Definition at line 42 of file error.c.

#define print_right_paren ( BUFFER   )     output_add_character ((BUFFER), ')')

Definition at line 40 of file error.c.

#define print_scope_operator ( BUFFER   )     output_add_string ((BUFFER), "::")

Definition at line 38 of file error.c.

#define print_template_argument_list_end ( BUFFER   )     print_non_consecutive_character ((BUFFER), '>')

Definition at line 45 of file error.c.

#define print_template_argument_list_start ( BUFFER   )     print_non_consecutive_character ((BUFFER), '<')

Definition at line 43 of file error.c.

#define print_tree_identifier ( BUFFER,
TID   )     output_add_string ((BUFFER), IDENTIFIER_POINTER (TID))

Definition at line 47 of file error.c.

 
#define reinit_global_formatting_buffer (  )     output_clear_message_text (scratch_buffer)

Definition at line 60 of file error.c.

#define separate_with_comma ( BUFFER   )     output_add_string ((BUFFER), ", ")

Definition at line 50 of file error.c.

#define sorry_for_unsupported_tree ( T   ) 

Value:

sorry ("`%s' not supported by %s", tree_code_name[(int) TREE_CODE (T)], \
             __FUNCTION__)

Definition at line 34 of file error.c.


Enumeration Type Documentation

enum pad

Enumerator:
none 
before 
after 
none 
before 
after 

Definition at line 32 of file error.c.


Function Documentation

static const char* args_to_string ( tree  p,
int  verbose 
) [static]

static const char* assop_to_string ( enum tree_code  p,
 
) [static]

Definition at line 2374 of file error.c.

References assignment_operator_name_info, IDENTIFIER_POINTER, and int.

static const char* class_key_or_enum ( tree  t  )  [static]

Definition at line 504 of file error.c.

References CLASSTYPE_DECLARED_CLASS, TREE_CODE, and TYPE_LANG_SPECIFIC.

static const char* code_to_string ( enum tree_code  c,
 
) [static]

Definition at line 2300 of file error.c.

References tree_code_name.

const char* context_as_string ( tree  context,
int  flags 
)

static void cp_diagnostic_finalizer ( diagnostic_context context,
diagnostic   
) [static]

Definition at line 2447 of file error.c.

References output_destroy_prefix().

static void cp_diagnostic_starter ( diagnostic_context context,
diagnostic_info diagnostic 
) [static]

const char* cp_file_of ( tree  t  ) 

Definition at line 2205 of file error.c.

References DECL_CONTEXT, DECL_SOURCE_FILE, OVL_FUNCTION, TREE_CODE, TYPE_MAIN_DECL, and TYPE_P.

int cp_line_of ( tree  t  ) 

static void cp_print_error_function ( diagnostic_context context,
diagnostic_info diagnostic 
) [static]

static bool cp_printer ( output_buffer buffer,
text_info text 
) [static]

static const char* cv_to_string ( tree  p,
int  v 
) [static]

void cxx_print_error_function ( diagnostic_context context,
const char *  file 
)

const char* decl_as_string ( tree  decl,
int  flags 
)

Definition at line 2155 of file error.c.

References dump_decl(), output_finalize_message(), and reinit_global_formatting_buffer.

static const char* decl_to_string ( tree  decl,
int  verbose 
) [static]

static void dump_aggr_type ( tree  t,
int  flags 
) [static]

static void dump_binary_op ( char *  opstring,
tree  t,
int  flags 
) const [static]

static void dump_char ( int  c  )  [static]

static void dump_decl ( tree  t,
int  flags 
) [static]

static void dump_exception_spec ( tree  t,
int  flags 
) [static]

static void dump_expr ( tree  t,
int  flags 
) [static]

Definition at line 1444 of file error.c.

References args, BASELINK_FUNCTIONS, BASELINK_P, boolean_false_node, boolean_true_node, boolean_type_node, build(), build_cplus_array_type(), build_index_type(), build_int_2, build_ptrmemfunc_access_expr(), BV_FN, char_type_node, CONSTRUCTOR_ELTS, DECL_CONSTRUCTOR_P, DECL_NAME, dump_binary_op(), dump_char(), dump_decl(), dump_expr(), dump_expr_list(), dump_type(), dump_unary_op(), EXPR_WFL_NODE, fold(), format, get_first_fn(), HOST_BITS_PER_INT, host_integerp(), HOST_WIDE_INT, i, IDENTIFIER_POINTER, idx, integer_one_node, integer_type_node, integer_zerop(), is_dummy_object(), len, my_friendly_assert, n, NEW_EXPR_USE_GLOBAL, next, NEXT_CODE, NULL_TREE, operator_name_info, output_add_character(), output_add_string(), OVL_CURRENT, p, pfn_identifier, print_identifier, print_integer(), print_left_bracket, print_left_paren, print_right_bracket, print_right_paren, print_scope_operator, print_tree_identifier, PTRMEM_CST_CLASS, PTRMEM_CST_MEMBER, real_to_decimal(), separate_with_comma, sorry_for_unsupported_tree, sprintf(), strcmp(), TEMPLATE_PARM_DECL, TFF_DECL_SPECIFIERS, TFF_EXPR_IN_PARENS, TREE_CHAIN, TREE_CODE, TREE_HAS_CONSTRUCTOR, tree_int_cst_equal(), TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_int_cst_sgn(), tree_low_cst(), TREE_OPERAND, TREE_PURPOSE, TREE_REAL_CST, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, TREE_UNSIGNED, TREE_VALUE, TYPE_BINFO_VIRTUALS, TYPE_IDENTIFIER, TYPE_MAIN_VARIANT, TYPE_METHOD_BASETYPE, TYPE_P, TYPE_PTRMEMFUNC_FN_TYPE, TYPE_PTRMEMFUNC_P, TYPE_VALUES, val, values, VOID_TYPE_P, and void_zero_node.

static void dump_expr_list ( tree  l,
int  flags 
) [static]

Definition at line 1428 of file error.c.

References dump_expr(), separate_with_comma, TFF_EXPR_IN_PARENS, TREE_CHAIN, and TREE_VALUE.

static void dump_function_decl ( tree  t,
int  flags 
) [static]

static void dump_function_name ( tree  t,
int  flags 
) [static]

static void dump_global_iord ( tree  t  )  [static]

Definition at line 798 of file error.c.

References abort, DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, input_filename, NULL, and p.

static void dump_parameters ( tree  parmtypes,
int  flags 
) [static]

static enum pad dump_qualifiers ( tree  t,
enum pad  p 
) [static]

static void dump_scope ( tree  scope,
int  flags 
) [static]

static void dump_simple_decl ( tree  t,
tree  type,
int  flags 
) [static]

static void dump_template_argument ( tree  arg,
int  flags 
) [static]

Definition at line 202 of file error.c.

References dump_expr(), dump_type(), TFF_CLASS_KEY_OR_ENUM, TFF_EXPR_IN_PARENS, TREE_CODE, and TYPE_P.

static void dump_template_argument_list ( tree  args,
int  flags 
) [static]

Definition at line 216 of file error.c.

References dump_template_argument(), i, n, separate_with_comma, TREE_VEC_ELT, and TREE_VEC_LENGTH.

static void dump_template_bindings ( tree  parms,
tree  args 
) [static]

static void dump_template_decl ( tree  t,
int  flags 
) [static]

static void dump_template_parameter ( tree  parm,
int  flags 
) [static]

static void dump_template_parms ( tree  info,
int  primary,
int  flags 
) [static]

static void dump_type ( tree  t,
int  flags 
) [static]

static enum pad dump_type_prefix ( tree  t,
int  flags 
) [static]

static void dump_type_suffix ( tree  t,
int  flags 
) [static]

static void dump_typename ( tree  t,
int  flags 
) [static]

static void dump_unary_op ( char *  opstring,
tree  t,
int  flags 
) const [static]

const char* expr_as_string ( tree  decl,
int  flags 
)

Definition at line 2143 of file error.c.

References dump_expr(), output_finalize_message(), and reinit_global_formatting_buffer.

static const char* expr_to_string ( tree  decl,
verbose   
) [static]

Definition at line 2270 of file error.c.

References dump_expr(), output_finalize_message(), and reinit_global_formatting_buffer.

static const char* fndecl_to_string ( tree  fndecl,
int  verbose 
) [static]

static const char* function_category ( tree  fn  )  [static]

void init_error ( void   ) 

const char* lang_decl_name ( tree  decl,
int  v 
)

const char* language_to_string ( enum languages  c,
 
)

Definition at line 2308 of file error.c.

References abort, lang_c, lang_cplusplus, and lang_java.

static tree locate_error ( char *  msgid,
va_list  ap 
) const [static]

Definition at line 2667 of file error.c.

References errorcount, f, internal_error(), va_arg, and void.

static void maybe_print_instantiation_context ( diagnostic_context context  )  [static]

static const char* op_to_string ( enum tree_code  p,
 
) [static]

Definition at line 2344 of file error.c.

References IDENTIFIER_POINTER.

static tree locate_error PARAMS ( (const char *, va_list  )  [static]

static void print_integer PARAMS ( (output_buffer *, HOST_WIDE_INT)   )  [static]

static void print_non_consecutive_character PARAMS ( (output_buffer *, int)   )  [static]

static bool cp_printer PARAMS ( (output_buffer *, text_info *)   )  [static]

static void cp_diagnostic_starter PARAMS ( (diagnostic_context *, diagnostic_info *)   )  [static]

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

static void maybe_print_instantiation_context PARAMS ( (diagnostic_context *)   )  [static]

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

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

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

static enum pad dump_qualifiers PARAMS ( (tree, enum pad  )  [static]

static void dump_global_iord PARAMS ( (tree  )  [static]

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

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

static const char* parm_to_string PARAMS ( (int, int)   )  [static]

static const char* assop_to_string PARAMS ( (enum tree_code, int)   )  [static]

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

static const char* parm_to_string ( int  p,
 
) [static]

Definition at line 2332 of file error.c.

References sprintf().

void print_instantiation_context ( void   ) 

static void print_instantiation_full_context ( diagnostic_context context  )  [static]

static void print_instantiation_partial_context ( diagnostic_context context,
tree  t,
const char *  file,
int  line 
) [static]

static void print_integer ( output_buffer buffer,
HOST_WIDE_INT  i 
) [static]

Definition at line 2643 of file error.c.

References HOST_WIDE_INT, HOST_WIDE_INT_PRINT_DEC, output_add_string(), and sprintf().

static void print_non_consecutive_character ( output_buffer buffer,
int  c 
) [static]

Definition at line 2652 of file error.c.

References NULL, output_add_character(), output_add_space(), output_last_position(), and p.

const char* type_as_string ( tree  typ,
int  flags 
)

Definition at line 2131 of file error.c.

References dump_type(), output_finalize_message(), and reinit_global_formatting_buffer.

static const char* type_to_string ( tree  typ,
int  verbose 
) [static]

void cp_error_at VPARAMS ( (const char *msgid,...)   ) 


Variable Documentation

char digit_buffer[128] [static]

Definition at line 197 of file error.c.

Definition at line 56 of file error.c.

Definition at line 55 of file error.c.


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