Warning fixes:
* call.c (op_error): Const-ify a char*. (add_candidate, source_type, add_warning): Add static prototype. (print_z_candidates): Const-ify a char*. * class.c (resolve_address_of_overloaded_function, fixed_type_or_null, build_vtable_entry_ref): Add static prototype. (get_vtable_name, finish_struct_1): Const-ify a char*. * cvt.c (convert_to_reference): Likewise. * decl.c (redeclaration_error_message, record_builtin_type, record_unknown_type, member_function_or_else, bad_specifiers): Likewise. (find_binding, select_decl, unqualified_namespace_lookup, lookup_flags, qualify_lookup, record_builtin_java_type, tag_name): Add static prototype. (warn_extern_redeclared_static, duplicate_decls, pushdecl, implicitly_declare, record_builtin_java_type, define_function, grok_op_properties, tag_name): Const-ify a char*. * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const. (define_function, finish_builtin_type): Const-ify a char*. (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn, cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args. (file_name_nondirectory): Const-ify a char*. (init_filename_times): Don't prototype. (compiler_error): Prototype. (yyerror, init_repo): Const-ify a char*. (build_srcloc): Don't prototype. (build_x_indirect_ref, build_indirect_ref, build_component_addr): Const-ify a char*. (warn_for_assignment): Don't prototype. (convert_for_initialization, readonly_error, check_for_new_type, GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call): Const-ify a char*. * decl2.c (acceptable_java_type, output_vtable_inherit, setup_initp, start_objects, finish_objects, do_dtors, do_ctors, merge_functions, decl_namespace, validate_nonmember_using_decl, do_nonmember_using_decl): Add static prototype. (lang_f_options): Const-ify a char*. (finish_builtin_type): Likewise. (add_function, arg_assoc_namespace, arg_assoc_class): Add static prototype. * errfn.c: Include cp-tree.h. (cp_thing): Add static prototype. (compiler_error): Don't protoptype. (cp_compiler_error): Cast `compiler_error' to `errorfn' before passing it to `cp_thing'. * error.c (interesting_scope_p): Add static prototype. * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify a char*. * init.c (compiler_error): Don't prototype. (member_init_ok_or_else): Const-ify a char*. (build_java_class_ref): Add static prototype. * lex.c (compiler_error): Don't prototype. (get_time_identifier, interface_strcmp, extend_token_buffer, handle_cp_pragma): Const-ify a char*. (is_global, init_filename_times): Add static prototype. (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*. (compiler_error): Change from fixed args to variable args. (yyerror): Const-ify a char*. * parse.y (cond_stmt_keyword): Const-ify a char*. (parse_decl): Add static prototype. * pt.c (template_args_equal, print_template_context): Likewise. (print_candidates, check_default_tmpl_args): Const-ify a char*. (instantiate_class_template): Likewise. * repo.c (get_base_filename, open_repo_file, init_repo): Likewise. * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise. * search.c (lookup_field_info, lookup_member): Likewise. (lookup_member): Cast the first argument of `bzero' to a PTR. * sig.c (compiler_error): Don't prototype. (build_signature_pointer_or_reference_nam): Const-ify a char*. (get_sigtable_name, build_member_function_pointer): Likewise. * tree.c (compiler_error): Don't prototype. (no_linkage_helper, build_srcloc): Add static prototype. (build_vbase_pointer_fields): Const-ify a char*. (__eprintf): Don't unnecessarily handle `const' when !__STDC__. * typeck.c (compiler_error): Don't prototype. (convert_for_assignment): Const-ify a char*. (comp_cv_target_types): Add static prototype. (build_x_indirect_ref, build_indirect_ref, convert_arguments, build_component_addr, build_unary_op, convert_for_initialization): Const-ify a char*. * typeck2.c (ack): Add static prototype and change from fixed args to variable args. (readonly_error, check_for_new_type): Const-ify a char*. * xref.c (_XREF_FILE, find_file, filename, fctname, declname, fixname, open_xref_file, classname, GNU_xref_begin): Likewise. (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'. (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call, gen_assign, GNU_xref_member): Const-ify a char*. From-SVN: r25994
This commit is contained in:
parent
1424137450
commit
d8e178a02b
111
gcc/cp/ChangeLog
111
gcc/cp/ChangeLog
@ -1,3 +1,114 @@
|
||||
Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* call.c (op_error): Const-ify a char*.
|
||||
(add_candidate, source_type, add_warning): Add static prototype.
|
||||
(print_z_candidates): Const-ify a char*.
|
||||
|
||||
* class.c (resolve_address_of_overloaded_function,
|
||||
fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
|
||||
(get_vtable_name, finish_struct_1): Const-ify a char*.
|
||||
|
||||
* cvt.c (convert_to_reference): Likewise.
|
||||
|
||||
* decl.c (redeclaration_error_message, record_builtin_type,
|
||||
record_unknown_type, member_function_or_else, bad_specifiers):
|
||||
Likewise.
|
||||
(find_binding, select_decl, unqualified_namespace_lookup,
|
||||
lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
|
||||
Add static prototype.
|
||||
(warn_extern_redeclared_static, duplicate_decls, pushdecl,
|
||||
implicitly_declare, record_builtin_java_type, define_function,
|
||||
grok_op_properties, tag_name): Const-ify a char*.
|
||||
|
||||
* cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
|
||||
(define_function, finish_builtin_type): Const-ify a char*.
|
||||
(cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
|
||||
cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
|
||||
(file_name_nondirectory): Const-ify a char*.
|
||||
(init_filename_times): Don't prototype.
|
||||
(compiler_error): Prototype.
|
||||
(yyerror, init_repo): Const-ify a char*.
|
||||
(build_srcloc): Don't prototype.
|
||||
(build_x_indirect_ref, build_indirect_ref, build_component_addr):
|
||||
Const-ify a char*.
|
||||
(warn_for_assignment): Don't prototype.
|
||||
(convert_for_initialization, readonly_error, check_for_new_type,
|
||||
GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
|
||||
Const-ify a char*.
|
||||
|
||||
* decl2.c (acceptable_java_type, output_vtable_inherit,
|
||||
setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
|
||||
merge_functions, decl_namespace, validate_nonmember_using_decl,
|
||||
do_nonmember_using_decl): Add static prototype.
|
||||
(lang_f_options): Const-ify a char*.
|
||||
(finish_builtin_type): Likewise.
|
||||
(add_function, arg_assoc_namespace, arg_assoc_class): Add static
|
||||
prototype.
|
||||
|
||||
* errfn.c: Include cp-tree.h.
|
||||
(cp_thing): Add static prototype.
|
||||
(compiler_error): Don't protoptype.
|
||||
(cp_compiler_error): Cast `compiler_error' to `errorfn' before
|
||||
passing it to `cp_thing'.
|
||||
|
||||
* error.c (interesting_scope_p): Add static prototype.
|
||||
|
||||
* except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
|
||||
a char*.
|
||||
|
||||
* init.c (compiler_error): Don't prototype.
|
||||
(member_init_ok_or_else): Const-ify a char*.
|
||||
(build_java_class_ref): Add static prototype.
|
||||
|
||||
* lex.c (compiler_error): Don't prototype.
|
||||
(get_time_identifier, interface_strcmp, extend_token_buffer,
|
||||
handle_cp_pragma): Const-ify a char*.
|
||||
(is_global, init_filename_times): Add static prototype.
|
||||
(file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
|
||||
(compiler_error): Change from fixed args to variable args.
|
||||
(yyerror): Const-ify a char*.
|
||||
|
||||
* parse.y (cond_stmt_keyword): Const-ify a char*.
|
||||
(parse_decl): Add static prototype.
|
||||
|
||||
* pt.c (template_args_equal, print_template_context): Likewise.
|
||||
(print_candidates, check_default_tmpl_args): Const-ify a char*.
|
||||
(instantiate_class_template): Likewise.
|
||||
|
||||
* repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
|
||||
|
||||
* rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
|
||||
expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
|
||||
|
||||
* search.c (lookup_field_info, lookup_member): Likewise.
|
||||
(lookup_member): Cast the first argument of `bzero' to a PTR.
|
||||
|
||||
* sig.c (compiler_error): Don't prototype.
|
||||
(build_signature_pointer_or_reference_nam): Const-ify a char*.
|
||||
(get_sigtable_name, build_member_function_pointer): Likewise.
|
||||
|
||||
* tree.c (compiler_error): Don't prototype.
|
||||
(no_linkage_helper, build_srcloc): Add static prototype.
|
||||
(build_vbase_pointer_fields): Const-ify a char*.
|
||||
(__eprintf): Don't unnecessarily handle `const' when !__STDC__.
|
||||
|
||||
* typeck.c (compiler_error): Don't prototype.
|
||||
(convert_for_assignment): Const-ify a char*.
|
||||
(comp_cv_target_types): Add static prototype.
|
||||
(build_x_indirect_ref, build_indirect_ref, convert_arguments,
|
||||
build_component_addr, build_unary_op, convert_for_initialization):
|
||||
Const-ify a char*.
|
||||
|
||||
* typeck2.c (ack): Add static prototype and change from fixed args
|
||||
to variable args.
|
||||
(readonly_error, check_for_new_type): Const-ify a char*.
|
||||
|
||||
* xref.c (_XREF_FILE, find_file, filename, fctname, declname,
|
||||
fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
|
||||
(GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
|
||||
(GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
|
||||
gen_assign, GNU_xref_member): Const-ify a char*.
|
||||
|
||||
1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
|
||||
|
||||
* gxxint.texi: Remove old discussion on copying virtual bases.
|
||||
|
@ -49,7 +49,7 @@ static int compare_ics PROTO((tree, tree));
|
||||
static tree build_over_call PROTO((struct z_candidate *, tree, int));
|
||||
static tree convert_like PROTO((tree, tree));
|
||||
static void op_error PROTO((enum tree_code, enum tree_code, tree, tree,
|
||||
tree, char *));
|
||||
tree, const char *));
|
||||
static tree build_object_call PROTO((tree, tree));
|
||||
static tree resolve_args PROTO((tree));
|
||||
static struct z_candidate * build_user_type_conversion_1
|
||||
@ -90,6 +90,10 @@ static int is_subseq PROTO((tree, tree));
|
||||
static int is_properly_derived_from PROTO((tree, tree));
|
||||
static int maybe_handle_ref_bind PROTO((tree*, tree*));
|
||||
static void maybe_handle_implicit_object PROTO((tree*));
|
||||
static struct z_candidate * add_candidate PROTO((struct z_candidate *,
|
||||
tree, tree, int));
|
||||
static tree source_type PROTO((tree));
|
||||
static void add_warning PROTO((struct z_candidate *, struct z_candidate *));
|
||||
|
||||
tree
|
||||
build_vfield_ref (datum, type)
|
||||
@ -2085,7 +2089,7 @@ static void
|
||||
print_z_candidates (candidates)
|
||||
struct z_candidate *candidates;
|
||||
{
|
||||
char *str = "candidates are:";
|
||||
const char *str = "candidates are:";
|
||||
for (; candidates; candidates = candidates->next)
|
||||
{
|
||||
if (TREE_CODE (candidates->fn) == IDENTIFIER_NODE)
|
||||
@ -2518,9 +2522,9 @@ static void
|
||||
op_error (code, code2, arg1, arg2, arg3, problem)
|
||||
enum tree_code code, code2;
|
||||
tree arg1, arg2, arg3;
|
||||
char *problem;
|
||||
const char *problem;
|
||||
{
|
||||
char * opname
|
||||
const char * opname
|
||||
= (code == MODIFY_EXPR ? assignop_tab [code2] : opname_tab [code]);
|
||||
|
||||
switch (code)
|
||||
|
@ -134,6 +134,10 @@ static void check_member_decl_is_same_in_complete_scope PROTO((tree, tree));
|
||||
static tree make_method_vec PROTO((int));
|
||||
static void free_method_vec PROTO((tree));
|
||||
static tree add_implicitly_declared_members PROTO((tree, int, int, int));
|
||||
static tree fixed_type_or_null PROTO((tree, int *));
|
||||
static tree resolve_address_of_overloaded_function PROTO((tree, tree, int,
|
||||
int, tree));
|
||||
static void build_vtable_entry_ref PROTO((tree, tree, tree));
|
||||
|
||||
/* Way of stacking language names. */
|
||||
tree *current_lang_base, *current_lang_stack;
|
||||
@ -604,7 +608,7 @@ get_vtable_name (type)
|
||||
tree type_id = build_typename_overload (type);
|
||||
char *buf = (char *) alloca (strlen (VTABLE_NAME_FORMAT)
|
||||
+ IDENTIFIER_LENGTH (type_id) + 2);
|
||||
char *ptr = IDENTIFIER_POINTER (type_id);
|
||||
const char *ptr = IDENTIFIER_POINTER (type_id);
|
||||
int i;
|
||||
for (i = 0; ptr[i] == OPERATOR_TYPENAME_FORMAT[i]; i++) ;
|
||||
#if 0
|
||||
@ -3718,7 +3722,7 @@ finish_struct_1 (t, warn_anon)
|
||||
|
||||
if (code == UNION_TYPE)
|
||||
{
|
||||
char *fie = NULL;
|
||||
const char *fie = NULL;
|
||||
if (TYPE_NEEDS_CONSTRUCTING (type))
|
||||
fie = "constructor";
|
||||
else if (TYPE_NEEDS_DESTRUCTOR (type))
|
||||
@ -4496,7 +4500,7 @@ finish_struct (t, attributes, warn_anon)
|
||||
*NONNULL is set iff INSTANCE can be known to be nonnull, regardless
|
||||
of our knowledge of its type. */
|
||||
|
||||
tree
|
||||
static tree
|
||||
fixed_type_or_null (instance, nonnull)
|
||||
tree instance;
|
||||
int *nonnull;
|
||||
|
@ -2451,10 +2451,11 @@ extern int current_function_parms_stored;
|
||||
#endif /* !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) */
|
||||
|
||||
/* Store the vbase pointer field name for type TYPE into pointer BUF. */
|
||||
#define FORMAT_VBASE_NAME(BUF,TYPE) do { \
|
||||
BUF = (char *) alloca (TYPE_ASSEMBLER_NAME_LENGTH (TYPE) \
|
||||
#define FORMAT_VBASE_NAME(BUF,TYPE) do { \
|
||||
char *wbuf = (char *) alloca (TYPE_ASSEMBLER_NAME_LENGTH (TYPE) \
|
||||
+ sizeof (VBASE_NAME) + 1); \
|
||||
sprintf (BUF, VBASE_NAME_FORMAT, TYPE_ASSEMBLER_NAME_STRING (TYPE)); \
|
||||
sprintf (wbuf, VBASE_NAME_FORMAT, TYPE_ASSEMBLER_NAME_STRING (TYPE)); \
|
||||
(BUF) = wbuf; \
|
||||
} while (0)
|
||||
|
||||
/* Returns non-zero iff ID_NODE is an IDENTIFIER_NODE whose name is
|
||||
@ -2861,8 +2862,8 @@ extern tree auto_function PROTO((tree, tree, enum built_in_function));
|
||||
extern void init_decl_processing PROTO((void));
|
||||
extern int init_type_desc PROTO((void));
|
||||
extern tree define_function
|
||||
PROTO((char *, tree, enum built_in_function,
|
||||
void (*) (tree), char *));
|
||||
PROTO((const char *, tree, enum built_in_function,
|
||||
void (*) (tree), const char *));
|
||||
extern tree check_tag_decl PROTO((tree));
|
||||
extern void shadow_tag PROTO((tree));
|
||||
extern tree groktypename PROTO((tree));
|
||||
@ -2940,7 +2941,8 @@ extern tree get_temp_name PROTO((tree, int));
|
||||
extern tree get_temp_regvar PROTO((tree, tree));
|
||||
extern void finish_anon_union PROTO((tree));
|
||||
extern tree finish_table PROTO((tree, tree, tree, int));
|
||||
extern void finish_builtin_type PROTO((tree, char *, tree *, int, tree));
|
||||
extern void finish_builtin_type PROTO((tree, const char *,
|
||||
tree *, int, tree));
|
||||
extern tree coerce_new_type PROTO((tree));
|
||||
extern tree coerce_delete_type PROTO((tree));
|
||||
extern void comdat_linkage PROTO((tree));
|
||||
@ -2976,14 +2978,15 @@ extern tree handle_class_head PROTO((tree, tree, tree));
|
||||
extern tree lookup_arg_dependent PROTO((tree, tree, tree));
|
||||
|
||||
/* in errfn.c */
|
||||
extern void cp_error ();
|
||||
extern void cp_error_at ();
|
||||
extern void cp_warning ();
|
||||
extern void cp_warning_at ();
|
||||
extern void cp_pedwarn ();
|
||||
extern void cp_pedwarn_at ();
|
||||
extern void cp_compiler_error ();
|
||||
extern void cp_sprintf ();
|
||||
/* The cp_* functions aren't suitable for ATTRIBUTE_PRINTF. */
|
||||
extern void cp_error PVPROTO((const char *, ...));
|
||||
extern void cp_error_at PVPROTO((const char *, ...));
|
||||
extern void cp_warning PVPROTO((const char *, ...));
|
||||
extern void cp_warning_at PVPROTO((const char *, ...));
|
||||
extern void cp_pedwarn PVPROTO((const char *, ...));
|
||||
extern void cp_pedwarn_at PVPROTO((const char *, ...));
|
||||
extern void cp_compiler_error PVPROTO((const char *, ...));
|
||||
extern void cp_sprintf PVPROTO((const char *, ...));
|
||||
|
||||
/* in error.c */
|
||||
extern void init_error PROTO((void));
|
||||
@ -3053,7 +3056,7 @@ extern tree build_vec_delete PROTO((tree, tree, tree, tree, int));
|
||||
/* in input.c */
|
||||
|
||||
/* in lex.c */
|
||||
extern char *file_name_nondirectory PROTO((char *));
|
||||
extern char *file_name_nondirectory PROTO((const char *));
|
||||
extern tree make_pointer_declarator PROTO((tree, tree));
|
||||
extern tree make_reference_declarator PROTO((tree, tree));
|
||||
extern tree make_call_declarator PROTO((tree, tree, tree, tree));
|
||||
@ -3061,7 +3064,6 @@ extern void set_quals_and_spec PROTO((tree, tree, tree));
|
||||
extern char *operator_name_string PROTO((tree));
|
||||
extern void lang_init PROTO((void));
|
||||
extern void lang_finish PROTO((void));
|
||||
extern void init_filename_times PROTO((void));
|
||||
#if 0
|
||||
extern void reinit_lang_specific PROTO((void));
|
||||
#endif
|
||||
@ -3093,8 +3095,9 @@ extern tree build_lang_field_decl PROTO((enum tree_code, tree, tree));
|
||||
extern void copy_lang_decl PROTO((tree));
|
||||
extern tree make_lang_type PROTO((enum tree_code));
|
||||
extern void dump_time_statistics PROTO((void));
|
||||
/* extern void compiler_error PROTO((char *, HOST_WIDE_INT, HOST_WIDE_INT)); */
|
||||
extern void yyerror PROTO((char *));
|
||||
extern void compiler_error PVPROTO((const char *, ...))
|
||||
ATTRIBUTE_PRINTF_1;
|
||||
extern void yyerror PROTO((const char *));
|
||||
extern void clear_inline_text_obstack PROTO((void));
|
||||
extern void maybe_snarf_defarg PROTO((void));
|
||||
extern tree snarf_defarg PROTO((void));
|
||||
@ -3188,7 +3191,7 @@ extern int processing_template_parmlist;
|
||||
/* in repo.c */
|
||||
extern void repo_template_used PROTO((tree));
|
||||
extern void repo_template_instantiated PROTO((tree, int));
|
||||
extern void init_repo PROTO((char*));
|
||||
extern void init_repo PROTO((const char *));
|
||||
extern void finish_repo PROTO((void));
|
||||
|
||||
/* in rtti.c */
|
||||
@ -3384,7 +3387,6 @@ extern tree make_temp_vec PROTO((int));
|
||||
extern tree build_ptr_wrapper PROTO((void *));
|
||||
extern tree build_expr_ptr_wrapper PROTO((void *));
|
||||
extern tree build_int_wrapper PROTO((int));
|
||||
extern tree build_srcloc PROTO((char *, int));
|
||||
extern tree build_srcloc_here PROTO((void));
|
||||
extern int varargs_function_p PROTO((tree));
|
||||
extern int really_overloaded_fn PROTO((tree));
|
||||
@ -3441,8 +3443,8 @@ extern tree build_object_ref PROTO((tree, tree, tree));
|
||||
extern tree build_component_ref_1 PROTO((tree, tree, int));
|
||||
extern tree build_component_ref PROTO((tree, tree, tree, int));
|
||||
extern tree build_x_component_ref PROTO((tree, tree, tree, int));
|
||||
extern tree build_x_indirect_ref PROTO((tree, char *));
|
||||
extern tree build_indirect_ref PROTO((tree, char *));
|
||||
extern tree build_x_indirect_ref PROTO((tree, const char *));
|
||||
extern tree build_indirect_ref PROTO((tree, const char *));
|
||||
extern tree build_array_ref PROTO((tree, tree));
|
||||
extern tree build_x_function_call PROTO((tree, tree, tree));
|
||||
extern tree get_member_function_from_ptrfunc PROTO((tree *, tree));
|
||||
@ -3453,7 +3455,7 @@ extern tree convert_arguments PROTO((tree, tree, tree, int));
|
||||
extern tree build_x_binary_op PROTO((enum tree_code, tree, tree));
|
||||
extern tree build_binary_op PROTO((enum tree_code, tree, tree, int));
|
||||
extern tree build_binary_op_nodefault PROTO((enum tree_code, tree, tree, enum tree_code));
|
||||
extern tree build_component_addr PROTO((tree, tree, char *));
|
||||
extern tree build_component_addr PROTO((tree, tree, const char *));
|
||||
extern tree build_x_unary_op PROTO((enum tree_code, tree));
|
||||
extern tree build_unary_op PROTO((enum tree_code, tree, int));
|
||||
extern tree unary_complex_lvalue PROTO((enum tree_code, tree));
|
||||
@ -3468,8 +3470,7 @@ extern tree build_const_cast PROTO((tree, tree));
|
||||
extern tree build_c_cast PROTO((tree, tree));
|
||||
extern tree build_x_modify_expr PROTO((tree, enum tree_code, tree));
|
||||
extern tree build_modify_expr PROTO((tree, enum tree_code, tree));
|
||||
extern void warn_for_assignment PROTO((char *, char *, char *, tree, int, int));
|
||||
extern tree convert_for_initialization PROTO((tree, tree, tree, int, char *, tree, int));
|
||||
extern tree convert_for_initialization PROTO((tree, tree, tree, int, const char *, tree, int));
|
||||
extern void c_expand_asm_operands PROTO((tree, tree, tree, tree, int, char *, int));
|
||||
extern void c_expand_return PROTO((tree));
|
||||
extern tree c_expand_start_case PROTO((tree));
|
||||
@ -3488,7 +3489,7 @@ extern tree pfn_from_ptrmemfunc PROTO((tree));
|
||||
/* in typeck2.c */
|
||||
extern tree error_not_base_type PROTO((tree, tree));
|
||||
extern tree binfo_or_else PROTO((tree, tree));
|
||||
extern void readonly_error PROTO((tree, char *, int));
|
||||
extern void readonly_error PROTO((tree, const char *, int));
|
||||
extern void abstract_virtuals_error PROTO((tree, tree));
|
||||
extern void signature_error PROTO((tree, tree));
|
||||
extern void incomplete_type_error PROTO((tree, tree));
|
||||
@ -3503,18 +3504,18 @@ extern tree build_m_component_ref PROTO((tree, tree));
|
||||
extern tree build_functional_cast PROTO((tree, tree));
|
||||
extern char *enum_name_string PROTO((tree, tree));
|
||||
extern void report_case_error PROTO((int, tree, tree, tree));
|
||||
extern void check_for_new_type PROTO((char *,flagged_type_tree));
|
||||
extern void check_for_new_type PROTO((const char *, flagged_type_tree));
|
||||
extern tree initializer_constant_valid_p PROTO((tree, tree));
|
||||
|
||||
/* in xref.c */
|
||||
extern void GNU_xref_begin PROTO((char *));
|
||||
extern void GNU_xref_begin PROTO((const char *));
|
||||
extern void GNU_xref_end PROTO((int));
|
||||
extern void GNU_xref_file PROTO((char *));
|
||||
extern void GNU_xref_file PROTO((const char *));
|
||||
extern void GNU_xref_start_scope PROTO((HOST_WIDE_INT));
|
||||
extern void GNU_xref_end_scope PROTO((HOST_WIDE_INT, HOST_WIDE_INT, int, int));
|
||||
extern void GNU_xref_ref PROTO((tree, char *));
|
||||
extern void GNU_xref_ref PROTO((tree, const char *));
|
||||
extern void GNU_xref_decl PROTO((tree, tree));
|
||||
extern void GNU_xref_call PROTO((tree, char *));
|
||||
extern void GNU_xref_call PROTO((tree, const char *));
|
||||
extern void GNU_xref_function PROTO((tree, tree));
|
||||
extern void GNU_xref_assign PROTO((tree));
|
||||
extern void GNU_xref_hier PROTO((tree, tree, int, int, int));
|
||||
|
@ -456,7 +456,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
|
||||
if (! real_lvalue_p (expr)
|
||||
&& !CP_TYPE_CONST_NON_VOLATILE_P (ttl))
|
||||
{
|
||||
char* msg;
|
||||
const char *msg;
|
||||
|
||||
if (CP_TYPE_VOLATILE_P (ttl) && decl)
|
||||
msg = "initialization of volatile reference type `%#T'";
|
||||
|
@ -134,7 +134,7 @@ static struct stack_level *decl_stack;
|
||||
|
||||
static tree grokparms PROTO((tree, int));
|
||||
static tree lookup_nested_type PROTO((tree, tree));
|
||||
static char *redeclaration_error_message PROTO((tree, tree));
|
||||
static const char *redeclaration_error_message PROTO((tree, tree));
|
||||
|
||||
static struct stack_level *push_decl_level PROTO((struct stack_level *,
|
||||
struct obstack *));
|
||||
@ -167,10 +167,10 @@ static tree lookup_tag PROTO((enum tree_code, tree,
|
||||
struct binding_level *, int));
|
||||
static void set_identifier_type_value_with_scope
|
||||
PROTO((tree, tree, struct binding_level *));
|
||||
static void record_builtin_type PROTO((enum rid, char *, tree));
|
||||
static void record_unknown_type PROTO((tree, char *));
|
||||
static int member_function_or_else PROTO((tree, tree, char *));
|
||||
static void bad_specifiers PROTO((tree, char *, int, int, int, int,
|
||||
static void record_builtin_type PROTO((enum rid, const char *, tree));
|
||||
static void record_unknown_type PROTO((tree, const char *));
|
||||
static int member_function_or_else PROTO((tree, tree, const char *));
|
||||
static void bad_specifiers PROTO((tree, const char *, int, int, int, int,
|
||||
int));
|
||||
static void lang_print_error_function PROTO((char *));
|
||||
static tree maybe_process_template_type_declaration PROTO((tree, int, struct binding_level*));
|
||||
@ -181,6 +181,13 @@ static void push_binding PROTO((tree, tree, struct binding_level*));
|
||||
static void add_binding PROTO((tree, tree));
|
||||
static void pop_binding PROTO((tree, tree));
|
||||
static tree local_variable_p PROTO((tree));
|
||||
static tree find_binding PROTO((tree, tree));
|
||||
static tree select_decl PROTO((tree, int));
|
||||
static tree unqualified_namespace_lookup PROTO((tree, int));
|
||||
static int lookup_flags PROTO((int, int));
|
||||
static tree qualify_lookup PROTO((tree, int));
|
||||
static tree record_builtin_java_type PROTO((const char *, int));
|
||||
static const char *tag_name PROTO((enum tag_types code));
|
||||
|
||||
#if defined (DEBUG_CP_BINDING_LEVELS)
|
||||
static void indent PROTO((void));
|
||||
@ -2815,9 +2822,9 @@ warn_extern_redeclared_static (newdecl, olddecl)
|
||||
{
|
||||
tree name;
|
||||
|
||||
static char *explicit_extern_static_warning
|
||||
static const char *explicit_extern_static_warning
|
||||
= "`%D' was declared `extern' and later `static'";
|
||||
static char *implicit_extern_static_warning
|
||||
static const char *implicit_extern_static_warning
|
||||
= "`%D' was declared implicitly `extern' and later `static'";
|
||||
|
||||
if (TREE_CODE (newdecl) == TYPE_DECL)
|
||||
@ -3042,7 +3049,7 @@ duplicate_decls (newdecl, olddecl)
|
||||
return 1;
|
||||
else
|
||||
{
|
||||
char *errmsg = redeclaration_error_message (newdecl, olddecl);
|
||||
const char *errmsg = redeclaration_error_message (newdecl, olddecl);
|
||||
if (errmsg)
|
||||
{
|
||||
cp_error (errmsg, newdecl);
|
||||
@ -3895,7 +3902,7 @@ pushdecl (x)
|
||||
/* No shadow warnings for vars made for inlining. */
|
||||
&& ! DECL_FROM_INLINE (x))
|
||||
{
|
||||
char *warnstring = NULL;
|
||||
const char *warnstring = NULL;
|
||||
|
||||
if (oldlocal != NULL_TREE && TREE_CODE (oldlocal) == PARM_DECL)
|
||||
warnstring = "declaration of `%s' shadows a parameter";
|
||||
@ -4372,7 +4379,7 @@ implicitly_declare (functionid)
|
||||
Otherwise return an error message format string with a %s
|
||||
where the identifier should go. */
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
redeclaration_error_message (newdecl, olddecl)
|
||||
tree newdecl, olddecl;
|
||||
{
|
||||
@ -5737,7 +5744,7 @@ static int builtin_type_tdescs_len, builtin_type_tdescs_max;
|
||||
static void
|
||||
record_builtin_type (rid_index, name, type)
|
||||
enum rid rid_index;
|
||||
char *name;
|
||||
const char *name;
|
||||
tree type;
|
||||
{
|
||||
tree rname = NULL_TREE, tname = NULL_TREE;
|
||||
@ -5780,7 +5787,7 @@ record_builtin_type (rid_index, name, type)
|
||||
|
||||
static tree
|
||||
record_builtin_java_type (name, size)
|
||||
char *name;
|
||||
const char *name;
|
||||
int size;
|
||||
{
|
||||
tree type, decl;
|
||||
@ -5809,7 +5816,7 @@ record_builtin_java_type (name, size)
|
||||
static void
|
||||
record_unknown_type (type, name)
|
||||
tree type;
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
tree decl = pushdecl (build_decl (TYPE_DECL, get_identifier (name), type));
|
||||
/* Make sure the "unknown type" typedecl gets ignored for debug info. */
|
||||
@ -6628,11 +6635,11 @@ lang_print_error_function (file)
|
||||
|
||||
tree
|
||||
define_function (name, type, function_code, pfn, library_name)
|
||||
char *name;
|
||||
const char *name;
|
||||
tree type;
|
||||
enum built_in_function function_code;
|
||||
void (*pfn) PROTO((tree));
|
||||
char *library_name;
|
||||
const char *library_name;
|
||||
{
|
||||
tree decl = build_lang_decl (FUNCTION_DECL, get_identifier (name), type);
|
||||
DECL_EXTERNAL (decl) = 1;
|
||||
@ -8303,7 +8310,7 @@ complete_array_type (type, initial_value, do_default)
|
||||
static int
|
||||
member_function_or_else (ctype, cur_type, string)
|
||||
tree ctype, cur_type;
|
||||
char *string;
|
||||
const char *string;
|
||||
{
|
||||
if (ctype && ctype != cur_type)
|
||||
{
|
||||
@ -8321,7 +8328,7 @@ member_function_or_else (ctype, cur_type, string)
|
||||
static void
|
||||
bad_specifiers (object, type, virtualp, quals, inlinep, friendp, raises)
|
||||
tree object;
|
||||
char *type;
|
||||
const char *type;
|
||||
int virtualp, quals, friendp, raises, inlinep;
|
||||
{
|
||||
if (virtualp)
|
||||
@ -11923,7 +11930,7 @@ grok_op_properties (decl, virtualp, friendp)
|
||||
else if (! friendp)
|
||||
{
|
||||
int ref = (TREE_CODE (t) == REFERENCE_TYPE);
|
||||
char *what = 0;
|
||||
const char *what = 0;
|
||||
if (ref)
|
||||
t = TYPE_MAIN_VARIANT (TREE_TYPE (t));
|
||||
|
||||
@ -12078,7 +12085,7 @@ grok_op_properties (decl, virtualp, friendp)
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
tag_name (code)
|
||||
enum tag_types code;
|
||||
{
|
||||
|
@ -58,6 +58,18 @@ static int is_namespace_ancestor PROTO((tree, tree));
|
||||
static void add_using_namespace PROTO((tree, tree, int));
|
||||
static tree ambiguous_decl PROTO((tree, tree, tree,int));
|
||||
static tree build_anon_union_vars PROTO((tree, tree*, int, int));
|
||||
static int acceptable_java_type PROTO((tree));
|
||||
static void output_vtable_inherit PROTO((tree));
|
||||
static void setup_initp PROTO((void));
|
||||
static void start_objects PROTO((int, int));
|
||||
static void finish_objects PROTO((int, int));
|
||||
static void do_dtors PROTO((tree));
|
||||
static void do_ctors PROTO((tree));
|
||||
static tree merge_functions PROTO((tree, tree));
|
||||
static tree decl_namespace PROTO((tree));
|
||||
static tree validate_nonmember_using_decl PROTO((tree, tree *, tree *));
|
||||
static void do_nonmember_using_decl PROTO((tree, tree, tree, tree,
|
||||
tree *, tree *));
|
||||
|
||||
extern int current_class_depth;
|
||||
|
||||
@ -441,7 +453,8 @@ int flag_permissive;
|
||||
if `-fSTRING' is seen as an option.
|
||||
(If `-fno-STRING' is seen as an option, the opposite value is stored.) */
|
||||
|
||||
static struct { char *string; int *variable; int on_value;} lang_f_options[] =
|
||||
static struct { const char *string; int *variable; int on_value;}
|
||||
lang_f_options[] =
|
||||
{
|
||||
/* C/C++ options. */
|
||||
{"signed-char", &flag_signed_char, 1},
|
||||
@ -1234,7 +1247,7 @@ check_member_template (tmpl)
|
||||
|
||||
/* Return true iff TYPE is a valid Java parameter or return type. */
|
||||
|
||||
int
|
||||
static int
|
||||
acceptable_java_type (type)
|
||||
tree type;
|
||||
{
|
||||
@ -2202,7 +2215,7 @@ finish_anon_union (anon_union_decl)
|
||||
void
|
||||
finish_builtin_type (type, name, fields, len, align_type)
|
||||
tree type;
|
||||
char *name;
|
||||
const char *name;
|
||||
tree fields[];
|
||||
int len;
|
||||
tree align_type;
|
||||
@ -4272,7 +4285,7 @@ set_decl_namespace (decl, scope, friendp)
|
||||
|
||||
/* Compute the namespace where a declaration is defined. */
|
||||
|
||||
tree
|
||||
static tree
|
||||
decl_namespace (decl)
|
||||
tree decl;
|
||||
{
|
||||
@ -4364,6 +4377,9 @@ struct arg_lookup
|
||||
static int arg_assoc PROTO((struct arg_lookup*, tree));
|
||||
static int arg_assoc_args PROTO((struct arg_lookup*, tree));
|
||||
static int arg_assoc_type PROTO((struct arg_lookup*, tree));
|
||||
static int add_function PROTO((struct arg_lookup *, tree));
|
||||
static int arg_assoc_namespace PROTO((struct arg_lookup *, tree));
|
||||
static int arg_assoc_class PROTO((struct arg_lookup *, tree));
|
||||
|
||||
/* Add a function to the lookup structure.
|
||||
Returns 1 on error. */
|
||||
|
@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "tree.h"
|
||||
#include "cp-tree.h"
|
||||
#include "toplev.h"
|
||||
|
||||
/* cp_printer is the type of a function which converts an argument into
|
||||
@ -39,6 +40,7 @@ int cp_silent = 0;
|
||||
|
||||
typedef void errorfn (); /* deliberately vague */
|
||||
|
||||
static void cp_thing PROTO ((errorfn *, int, const char *, va_list));
|
||||
extern char* cp_file_of PROTO((tree));
|
||||
extern int cp_line_of PROTO((tree));
|
||||
|
||||
@ -246,8 +248,6 @@ cp_pedwarn VPROTO((const char *format, ...))
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
extern errorfn compiler_error;
|
||||
|
||||
void
|
||||
cp_compiler_error VPROTO((const char *format, ...))
|
||||
{
|
||||
@ -263,7 +263,7 @@ cp_compiler_error VPROTO((const char *format, ...))
|
||||
#endif
|
||||
|
||||
if (! cp_silent)
|
||||
cp_thing (compiler_error, 0, format, ap);
|
||||
cp_thing ((errorfn *) compiler_error, 0, format, ap);
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,7 @@ static void dump_parameters PROTO((tree, int, int));
|
||||
static void dump_exception_spec PROTO((tree, int));
|
||||
static char *aggr_variety PROTO((tree));
|
||||
static tree ident_fndecl PROTO((tree));
|
||||
static int interesting_scope_p PROTO((tree));
|
||||
|
||||
void
|
||||
init_error ()
|
||||
|
@ -399,7 +399,7 @@ static tree
|
||||
build_eh_type_type (type)
|
||||
tree type;
|
||||
{
|
||||
char *typestring;
|
||||
const char *typestring;
|
||||
tree exp;
|
||||
|
||||
if (type == error_mark_node)
|
||||
@ -427,7 +427,7 @@ static tree
|
||||
build_eh_type_type_ref (type)
|
||||
tree type;
|
||||
{
|
||||
char *typestring;
|
||||
const char *typestring;
|
||||
tree exp;
|
||||
|
||||
if (type == error_mark_node)
|
||||
|
@ -32,8 +32,6 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "expr.h"
|
||||
#include "toplev.h"
|
||||
|
||||
extern void compiler_error ();
|
||||
|
||||
/* In C++, structures with well-defined constructors are initialized by
|
||||
those constructors, unasked. CURRENT_BASE_INIT_LIST
|
||||
holds a list of stmts for a BASE_INIT term in the grammar.
|
||||
@ -54,13 +52,14 @@ static tree build_vec_delete_1 PROTO((tree, tree, tree, tree, tree,
|
||||
static void perform_member_init PROTO((tree, tree, tree, int));
|
||||
static void sort_base_init PROTO((tree, tree *, tree *));
|
||||
static tree build_builtin_delete_call PROTO((tree));
|
||||
static int member_init_ok_or_else PROTO((tree, tree, char *));
|
||||
static int member_init_ok_or_else PROTO((tree, tree, const char *));
|
||||
static void expand_virtual_init PROTO((tree, tree));
|
||||
static tree sort_member_init PROTO((tree));
|
||||
static tree build_partial_cleanup_for PROTO((tree));
|
||||
static tree initializing_context PROTO((tree));
|
||||
static void expand_vec_init_try_block PROTO((tree));
|
||||
static void expand_vec_init_catch_clause PROTO((tree, tree, tree, tree));
|
||||
static tree build_java_class_ref PROTO((tree));
|
||||
|
||||
/* Cache the identifier nodes for the magic field of a new cookie. */
|
||||
static tree nc_nelts_field_id;
|
||||
@ -848,7 +847,7 @@ static int
|
||||
member_init_ok_or_else (field, type, member_name)
|
||||
tree field;
|
||||
tree type;
|
||||
char *member_name;
|
||||
const char *member_name;
|
||||
{
|
||||
if (field == error_mark_node)
|
||||
return 0;
|
||||
@ -2061,7 +2060,7 @@ static tree jclass_node = NULL_TREE;
|
||||
|
||||
/* Given a Java class, return a decl for the corresponding java.lang.Class. */
|
||||
|
||||
tree
|
||||
static tree
|
||||
build_java_class_ref (type)
|
||||
tree type;
|
||||
{
|
||||
|
53
gcc/cp/lex.c
53
gcc/cp/lex.c
@ -54,18 +54,16 @@ extern struct obstack permanent_obstack;
|
||||
extern struct obstack *current_obstack, *saveable_obstack;
|
||||
|
||||
extern void yyprint PROTO((FILE *, int, YYSTYPE));
|
||||
extern void compiler_error PROTO((char *, HOST_WIDE_INT,
|
||||
HOST_WIDE_INT));
|
||||
|
||||
static tree get_time_identifier PROTO((char *));
|
||||
static tree get_time_identifier PROTO((const char *));
|
||||
static int check_newline PROTO((void));
|
||||
static int skip_white_space PROTO((int));
|
||||
static void finish_defarg PROTO((void));
|
||||
static int my_get_run_time PROTO((void));
|
||||
static int get_last_nonwhite_on_line PROTO((void));
|
||||
static int interface_strcmp PROTO((char *));
|
||||
static int interface_strcmp PROTO((const char *));
|
||||
static int readescape PROTO((int *));
|
||||
static char *extend_token_buffer PROTO((char *));
|
||||
static char *extend_token_buffer PROTO((const char *));
|
||||
static void consume_string PROTO((struct obstack *, int));
|
||||
static void set_typedecl_interface_info PROTO((tree, tree));
|
||||
static void feed_defarg PROTO((tree, tree));
|
||||
@ -73,7 +71,7 @@ static int set_vardecl_interface_info PROTO((tree, tree));
|
||||
static void store_pending_inline PROTO((tree, struct pending_inline *));
|
||||
static void reinit_parse_for_expr PROTO((struct obstack *));
|
||||
static int *init_cpp_parse PROTO((void));
|
||||
static int handle_cp_pragma PROTO((char *));
|
||||
static int handle_cp_pragma PROTO((const char *));
|
||||
#ifdef HANDLE_GENERIC_PRAGMAS
|
||||
static int handle_generic_pragma PROTO((int));
|
||||
#endif
|
||||
@ -85,12 +83,14 @@ static int token_cmp PROTO((int *, int *));
|
||||
#endif
|
||||
static void begin_definition_of_inclass_inline PROTO((struct pending_inline*));
|
||||
static void parse_float PROTO((PTR));
|
||||
static int is_global PROTO((tree));
|
||||
static void init_filename_times PROTO((void));
|
||||
|
||||
/* Given a file name X, return the nondirectory portion.
|
||||
Keep in mind that X can be computed more than once. */
|
||||
char *
|
||||
file_name_nondirectory (x)
|
||||
char *x;
|
||||
const char *x;
|
||||
{
|
||||
char *tmp = (char *) rindex (x, '/');
|
||||
if (DIR_SEPARATOR != '/' && ! tmp)
|
||||
@ -98,7 +98,7 @@ file_name_nondirectory (x)
|
||||
if (tmp)
|
||||
return (char *) (tmp + 1);
|
||||
else
|
||||
return x;
|
||||
return (char *) x;
|
||||
}
|
||||
|
||||
/* This obstack is needed to hold text. It is not safe to use
|
||||
@ -314,7 +314,7 @@ static int ignore_escape_flag = 0;
|
||||
|
||||
static tree
|
||||
get_time_identifier (name)
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
tree time_identifier;
|
||||
int len = strlen (name);
|
||||
@ -379,7 +379,7 @@ int cplus_tree_code_length[] = {
|
||||
Used for printing out the tree and error messages. */
|
||||
#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
|
||||
|
||||
char *cplus_tree_code_name[] = {
|
||||
const char *cplus_tree_code_name[] = {
|
||||
"@@dummy",
|
||||
#include "cp-tree.def"
|
||||
};
|
||||
@ -429,7 +429,7 @@ lang_identify ()
|
||||
return "cplusplus";
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
init_filename_times ()
|
||||
{
|
||||
this_filename_time = get_time_identifier ("<top level>");
|
||||
@ -1158,15 +1158,15 @@ extract_interface_info ()
|
||||
|
||||
static int
|
||||
interface_strcmp (s)
|
||||
char *s;
|
||||
const char *s;
|
||||
{
|
||||
/* Set the interface/implementation bits for this scope. */
|
||||
struct impl_files *ifiles;
|
||||
char *s1;
|
||||
const char *s1;
|
||||
|
||||
for (ifiles = impl_file_chain; ifiles; ifiles = ifiles->next)
|
||||
{
|
||||
char *t1 = ifiles->filename;
|
||||
const char *t1 = ifiles->filename;
|
||||
s1 = s;
|
||||
|
||||
if (*s1 != *t1 || *s1 == 0)
|
||||
@ -2197,7 +2197,7 @@ skip_white_space (c)
|
||||
|
||||
static char *
|
||||
extend_token_buffer (p)
|
||||
char *p;
|
||||
const char *p;
|
||||
{
|
||||
int offset = p - token_buffer;
|
||||
|
||||
@ -2256,8 +2256,6 @@ pragma_ungetc (arg)
|
||||
|
||||
int linemode;
|
||||
|
||||
static int handle_cp_pragma PROTO((char *));
|
||||
|
||||
static int
|
||||
check_newline ()
|
||||
{
|
||||
@ -4780,18 +4778,27 @@ dump_time_statistics ()
|
||||
}
|
||||
|
||||
void
|
||||
compiler_error (s, v, v2)
|
||||
char *s;
|
||||
HOST_WIDE_INT v, v2; /* @@also used as pointer */
|
||||
compiler_error VPROTO ((const char *msg, ...))
|
||||
{
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
const char *msg;
|
||||
#endif
|
||||
char buf[1024];
|
||||
sprintf (buf, s, v, v2);
|
||||
va_list ap;
|
||||
|
||||
VA_START (ap, msg);
|
||||
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
msg = va_arg (ap, const char *);
|
||||
#endif
|
||||
|
||||
vsprintf (buf, msg, ap);
|
||||
error_with_file_and_line (input_filename, lineno, "%s (compiler error)", buf);
|
||||
}
|
||||
|
||||
void
|
||||
yyerror (string)
|
||||
char *string;
|
||||
const char *string;
|
||||
{
|
||||
extern int end_of_file;
|
||||
char buf[200];
|
||||
@ -4821,7 +4828,7 @@ yyerror (string)
|
||||
|
||||
static int
|
||||
handle_cp_pragma (pname)
|
||||
char *pname;
|
||||
const char *pname;
|
||||
{
|
||||
register int token;
|
||||
|
||||
|
1625
gcc/cp/parse.c
1625
gcc/cp/parse.c
File diff suppressed because it is too large
Load Diff
@ -60,9 +60,10 @@ extern int end_of_file;
|
||||
|
||||
/* Contains the statement keyword (if/while/do) to include in an
|
||||
error message if the user supplies an empty conditional expression. */
|
||||
static char *cond_stmt_keyword;
|
||||
static const char *cond_stmt_keyword;
|
||||
|
||||
static tree empty_parms PROTO((void));
|
||||
static int parse_decl PROTO((tree, tree, tree, int, tree *));
|
||||
|
||||
/* Nonzero if we have an `extern "C"' acting as an extern specifier. */
|
||||
int have_extern_spec;
|
||||
|
10
gcc/cp/pt.c
10
gcc/cp/pt.c
@ -149,6 +149,8 @@ static tree try_class_unification PROTO((tree, tree, tree, tree));
|
||||
static int coerce_template_template_parms PROTO((tree, tree, int,
|
||||
tree, tree));
|
||||
static tree determine_specialization PROTO((tree, tree, tree *, int));
|
||||
static int template_args_equal PROTO((tree, tree));
|
||||
static void print_template_context PROTO((int));
|
||||
|
||||
/* We use TREE_VECs to hold template arguments. If there is only one
|
||||
level of template arguments, then the TREE_VEC contains the
|
||||
@ -896,7 +898,7 @@ print_candidates (fns)
|
||||
{
|
||||
tree fn;
|
||||
|
||||
char* str = "candidates are:";
|
||||
const char *str = "candidates are:";
|
||||
|
||||
for (fn = fns; fn != NULL_TREE; fn = TREE_CHAIN (fn))
|
||||
{
|
||||
@ -2136,7 +2138,7 @@ check_default_tmpl_args (decl, parms, is_primary, is_partial)
|
||||
int is_primary;
|
||||
int is_partial;
|
||||
{
|
||||
char* msg;
|
||||
const char *msg;
|
||||
int last_level_to_check;
|
||||
|
||||
/* [temp.param]
|
||||
@ -3284,7 +3286,7 @@ coerce_template_parms (parms, args, in_decl,
|
||||
|
||||
/* Returns 1 if template args OT and NT are equivalent. */
|
||||
|
||||
int
|
||||
static int
|
||||
template_args_equal (ot, nt)
|
||||
tree ot, nt;
|
||||
{
|
||||
@ -4671,7 +4673,7 @@ instantiate_class_template (type)
|
||||
|
||||
if (t == error_mark_node)
|
||||
{
|
||||
char *str = "candidates are:";
|
||||
const char *str = "candidates are:";
|
||||
cp_error ("ambiguous class template instantiation for `%#T'", type);
|
||||
for (t = DECL_TEMPLATE_SPECIALIZATIONS (template); t;
|
||||
t = TREE_CHAIN (t))
|
||||
|
@ -37,8 +37,8 @@ extern char *getpwd PROTO((void));
|
||||
|
||||
static tree repo_get_id PROTO((tree));
|
||||
static char *extract_string PROTO((char **));
|
||||
static char *get_base_filename PROTO((char *));
|
||||
static void open_repo_file PROTO((char *));
|
||||
static char *get_base_filename PROTO((const char *));
|
||||
static void open_repo_file PROTO((const char *));
|
||||
static char *afgets PROTO((FILE *));
|
||||
static void reopen_repo_file_for_write PROTO((void));
|
||||
|
||||
@ -239,7 +239,7 @@ extract_string (pp)
|
||||
|
||||
static char *
|
||||
get_base_filename (filename)
|
||||
char *filename;
|
||||
const char *filename;
|
||||
{
|
||||
char *p = getenv ("COLLECT_GCC_OPTIONS");
|
||||
char *output = NULL;
|
||||
@ -270,10 +270,10 @@ get_base_filename (filename)
|
||||
|
||||
static void
|
||||
open_repo_file (filename)
|
||||
char *filename;
|
||||
const char *filename;
|
||||
{
|
||||
register char *p;
|
||||
char *s = get_base_filename (filename);
|
||||
register const char *p;
|
||||
const char *s = get_base_filename (filename);
|
||||
|
||||
if (s == NULL)
|
||||
return;
|
||||
@ -304,7 +304,7 @@ afgets (stream)
|
||||
|
||||
void
|
||||
init_repo (filename)
|
||||
char *filename;
|
||||
const char *filename;
|
||||
{
|
||||
char *buf;
|
||||
|
||||
|
@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
extern struct obstack permanent_obstack;
|
||||
|
||||
static tree call_void_fn PROTO((char *));
|
||||
static tree call_void_fn PROTO((const char *));
|
||||
static tree build_headof_sub PROTO((tree));
|
||||
static tree build_headof PROTO((tree));
|
||||
static tree get_tinfo_var PROTO((tree));
|
||||
@ -45,7 +45,7 @@ static void expand_si_desc PROTO((tree, tree));
|
||||
static void expand_class_desc PROTO((tree, tree));
|
||||
static void expand_attr_desc PROTO((tree, tree));
|
||||
static void expand_ptr_desc PROTO((tree, tree));
|
||||
static void expand_generic_desc PROTO((tree, tree, char *));
|
||||
static void expand_generic_desc PROTO((tree, tree, const char *));
|
||||
static tree throw_bad_cast PROTO((void));
|
||||
static tree throw_bad_typeid PROTO((void));
|
||||
|
||||
@ -133,7 +133,7 @@ build_headof (exp)
|
||||
|
||||
static tree
|
||||
call_void_fn (name)
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
tree d = get_identifier (name);
|
||||
tree type;
|
||||
@ -719,7 +719,7 @@ expand_si_desc (tdecl, type)
|
||||
tree type;
|
||||
{
|
||||
tree t, elems, fn;
|
||||
char *name = build_overload_name (type, 1, 1);
|
||||
const char *name = build_overload_name (type, 1, 1);
|
||||
tree name_string = combine_strings (build_string (strlen (name)+1, name));
|
||||
|
||||
type = BINFO_TYPE (TREE_VEC_ELT (TYPE_BINFO_BASETYPES (type), 0));
|
||||
@ -767,7 +767,7 @@ expand_class_desc (tdecl, type)
|
||||
{
|
||||
tree name_string;
|
||||
tree fn, tmp;
|
||||
char *name;
|
||||
const char *name;
|
||||
|
||||
int i = CLASSTYPE_N_BASECLASSES (type);
|
||||
int base_cnt = 0;
|
||||
@ -827,7 +827,7 @@ expand_class_desc (tdecl, type)
|
||||
if (TREE_VIA_VIRTUAL (binfo))
|
||||
{
|
||||
tree t = BINFO_TYPE (binfo);
|
||||
char *name;
|
||||
const char *name;
|
||||
tree field;
|
||||
|
||||
FORMAT_VBASE_NAME (name, t);
|
||||
@ -947,7 +947,7 @@ expand_ptr_desc (tdecl, type)
|
||||
tree type;
|
||||
{
|
||||
tree t, elems, fn;
|
||||
char *name = build_overload_name (type, 1, 1);
|
||||
const char *name = build_overload_name (type, 1, 1);
|
||||
tree name_string = combine_strings (build_string (strlen (name)+1, name));
|
||||
|
||||
type = TREE_TYPE (type);
|
||||
@ -994,7 +994,7 @@ expand_attr_desc (tdecl, type)
|
||||
tree type;
|
||||
{
|
||||
tree elems, t, fn;
|
||||
char *name = build_overload_name (type, 1, 1);
|
||||
const char *name = build_overload_name (type, 1, 1);
|
||||
tree name_string = combine_strings (build_string (strlen (name)+1, name));
|
||||
tree attrval = build_int_2 (TYPE_QUALS (type), 0);
|
||||
|
||||
@ -1040,9 +1040,9 @@ static void
|
||||
expand_generic_desc (tdecl, type, fnname)
|
||||
tree tdecl;
|
||||
tree type;
|
||||
char *fnname;
|
||||
const char *fnname;
|
||||
{
|
||||
char *name = build_overload_name (type, 1, 1);
|
||||
const char *name = build_overload_name (type, 1, 1);
|
||||
tree name_string = combine_strings (build_string (strlen (name)+1, name));
|
||||
tree elems = tree_cons
|
||||
(NULL_TREE, decay_conversion (tdecl), tree_cons
|
||||
|
@ -1142,7 +1142,7 @@ struct lookup_field_info {
|
||||
/* If non-zero, RVAL was found by looking through a dependent base. */
|
||||
int from_dep_base_p;
|
||||
/* If something went wrong, a message indicating what. */
|
||||
char *errstr;
|
||||
const char *errstr;
|
||||
};
|
||||
|
||||
/* Returns non-zero if BINFO is not hidden by the value found by the
|
||||
@ -1330,7 +1330,7 @@ lookup_member (xbasetype, name, protect, want_type)
|
||||
we know that binfo of a virtual base class will always == itself when
|
||||
found along any line. (mrs) */
|
||||
|
||||
char *errstr = 0;
|
||||
const char *errstr = 0;
|
||||
|
||||
if (xbasetype == current_class_type && TYPE_BEING_DEFINED (xbasetype)
|
||||
&& IDENTIFIER_CLASS_VALUE (name))
|
||||
@ -1362,7 +1362,7 @@ lookup_member (xbasetype, name, protect, want_type)
|
||||
n_calls_lookup_field++;
|
||||
#endif /* GATHER_STATISTICS */
|
||||
|
||||
bzero (&lfi, sizeof (lfi));
|
||||
bzero ((PTR) &lfi, sizeof (lfi));
|
||||
lfi.type = type;
|
||||
lfi.name = name;
|
||||
lfi.want_type = want_type;
|
||||
|
16
gcc/cp/sig.c
16
gcc/cp/sig.c
@ -33,8 +33,6 @@ extern struct obstack *current_obstack;
|
||||
extern struct obstack permanent_obstack;
|
||||
extern struct obstack *saveable_obstack;
|
||||
|
||||
extern void compiler_error ();
|
||||
|
||||
static tree save_this PROTO((tree));
|
||||
static tree build_sptr_ref PROTO((tree));
|
||||
static tree build_member_function_pointer PROTO((tree));
|
||||
@ -63,14 +61,14 @@ build_signature_pointer_or_reference_name (to_type, type_quals, refp)
|
||||
int type_quals;
|
||||
int refp;
|
||||
{
|
||||
char * sig_name = TYPE_NAME_STRING (to_type);
|
||||
const char * sig_name = TYPE_NAME_STRING (to_type);
|
||||
int name_len = TYPE_NAME_LENGTH (to_type) + 3 /* Enough room for
|
||||
C,V,R. */;
|
||||
char * name;
|
||||
|
||||
char *const_rep = (type_quals & TYPE_QUAL_CONST) ? "C" : "";
|
||||
char *restrict_rep = (type_quals & TYPE_QUAL_RESTRICT) ? "R" : "";
|
||||
char *volatile_rep = (type_quals & TYPE_QUAL_VOLATILE) ? "C" : "";
|
||||
const char *const_rep = (type_quals & TYPE_QUAL_CONST) ? "C" : "";
|
||||
const char *restrict_rep = (type_quals & TYPE_QUAL_RESTRICT) ? "R" : "";
|
||||
const char *volatile_rep = (type_quals & TYPE_QUAL_VOLATILE) ? "C" : "";
|
||||
|
||||
if (refp)
|
||||
{
|
||||
@ -288,8 +286,8 @@ get_sigtable_name (sig_type, rhs_type)
|
||||
char *buf = (char *) alloca (sizeof (SIGTABLE_NAME_FORMAT_LONG)
|
||||
+ IDENTIFIER_LENGTH (sig_type_id)
|
||||
+ IDENTIFIER_LENGTH (rhs_type_id) + 20);
|
||||
char *sig_ptr = IDENTIFIER_POINTER (sig_type_id);
|
||||
char *rhs_ptr = IDENTIFIER_POINTER (rhs_type_id);
|
||||
const char *sig_ptr = IDENTIFIER_POINTER (sig_type_id);
|
||||
const char *rhs_ptr = IDENTIFIER_POINTER (rhs_type_id);
|
||||
int i, j;
|
||||
|
||||
for (i = 0; sig_ptr[i] == OPERATOR_TYPENAME_FORMAT[i]; i++)
|
||||
@ -316,7 +314,7 @@ static tree
|
||||
build_member_function_pointer (member)
|
||||
tree member;
|
||||
{
|
||||
char *namstr = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (member));
|
||||
const char *namstr = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (member));
|
||||
int namlen = IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (member));
|
||||
char *name;
|
||||
tree entry;
|
||||
|
@ -28,8 +28,6 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "rtl.h"
|
||||
#include "toplev.h"
|
||||
|
||||
extern void compiler_error ();
|
||||
|
||||
static tree get_identifier_list PROTO((tree));
|
||||
static tree bot_manip PROTO((tree));
|
||||
static tree perm_manip PROTO((tree));
|
||||
@ -42,6 +40,8 @@ static void propagate_binfo_offsets PROTO((tree, tree));
|
||||
static int avoid_overlap PROTO((tree, tree));
|
||||
static int lvalue_p_1 PROTO((tree, int));
|
||||
static int equal_functions PROTO((tree, tree));
|
||||
static tree no_linkage_helper PROTO((tree));
|
||||
static tree build_srcloc PROTO((char *, int));
|
||||
|
||||
#define CEIL(x,y) (((x) + (y) - 1) / (y))
|
||||
|
||||
@ -881,7 +881,7 @@ build_vbase_pointer_fields (rec)
|
||||
if (TREE_VIA_VIRTUAL (base_binfo))
|
||||
{
|
||||
int j;
|
||||
char *name;
|
||||
const char *name;
|
||||
|
||||
/* The offset for a virtual base class is only used in computing
|
||||
virtual function tables and for initializing virtual base
|
||||
@ -2132,17 +2132,10 @@ print_lang_statistics ()
|
||||
|
||||
void
|
||||
__eprintf (string, expression, line, filename)
|
||||
#ifdef __STDC__
|
||||
const char *string;
|
||||
const char *expression;
|
||||
unsigned line;
|
||||
const char *filename;
|
||||
#else
|
||||
char *string;
|
||||
char *expression;
|
||||
unsigned line;
|
||||
char *filename;
|
||||
#endif
|
||||
{
|
||||
fprintf (stderr, string, expression, line, filename);
|
||||
fflush (stderr);
|
||||
@ -2604,7 +2597,7 @@ build_int_wrapper (i)
|
||||
return t;
|
||||
}
|
||||
|
||||
tree
|
||||
static tree
|
||||
build_srcloc (file, line)
|
||||
char *file;
|
||||
int line;
|
||||
|
@ -39,9 +39,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "expr.h"
|
||||
#include "toplev.h"
|
||||
|
||||
extern void compiler_error ();
|
||||
|
||||
static tree convert_for_assignment PROTO((tree, tree, char*, tree,
|
||||
static tree convert_for_assignment PROTO((tree, tree, const char *, tree,
|
||||
int));
|
||||
static tree pointer_int_sum PROTO((enum tree_code, tree, tree));
|
||||
static tree rationalize_conditional_expr PROTO((enum tree_code, tree));
|
||||
@ -59,6 +57,7 @@ static tree lookup_anon_field PROTO((tree, tree));
|
||||
static tree pointer_diff PROTO((tree, tree, tree));
|
||||
static tree qualify_type PROTO((tree, tree));
|
||||
static tree get_delta_difference PROTO((tree, tree, int));
|
||||
static int comp_cv_target_types PROTO((tree, tree, int));
|
||||
|
||||
/* Return the target type of TYPE, which meas return T for:
|
||||
T*, T&, T[], T (...), and otherwise, just T. */
|
||||
@ -2322,7 +2321,7 @@ build_x_component_ref (datum, component, basetype_path, protect)
|
||||
tree
|
||||
build_x_indirect_ref (ptr, errorstring)
|
||||
tree ptr;
|
||||
char *errorstring;
|
||||
const char *errorstring;
|
||||
{
|
||||
tree rval;
|
||||
|
||||
@ -2339,7 +2338,7 @@ build_x_indirect_ref (ptr, errorstring)
|
||||
tree
|
||||
build_indirect_ref (ptr, errorstring)
|
||||
tree ptr;
|
||||
char *errorstring;
|
||||
const char *errorstring;
|
||||
{
|
||||
register tree pointer, type;
|
||||
|
||||
@ -3084,7 +3083,7 @@ convert_arguments (typelist, values, fndecl, flags)
|
||||
{
|
||||
register tree typetail, valtail;
|
||||
register tree result = NULL_TREE;
|
||||
char *called_thing = 0;
|
||||
const char *called_thing = 0;
|
||||
int i = 0;
|
||||
|
||||
/* Argument passing is always copy-initialization. */
|
||||
@ -4247,7 +4246,7 @@ pointer_diff (op0, op1, ptrtype)
|
||||
tree
|
||||
build_component_addr (arg, argtype, msg)
|
||||
tree arg, argtype;
|
||||
char *msg;
|
||||
const char *msg;
|
||||
{
|
||||
tree field = TREE_OPERAND (arg, 1);
|
||||
tree basetype = decl_type_context (field);
|
||||
@ -4359,7 +4358,7 @@ build_unary_op (code, xarg, noconvert)
|
||||
/* No default_conversion here. It causes trouble for ADDR_EXPR. */
|
||||
register tree arg = xarg;
|
||||
register tree argtype = 0;
|
||||
char *errstring = NULL;
|
||||
const char *errstring = NULL;
|
||||
tree val;
|
||||
|
||||
if (arg == error_mark_node)
|
||||
@ -6643,7 +6642,7 @@ pfn_from_ptrmemfunc (t)
|
||||
static tree
|
||||
convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
|
||||
tree type, rhs;
|
||||
char *errtype;
|
||||
const char *errtype;
|
||||
tree fndecl;
|
||||
int parmnum;
|
||||
{
|
||||
@ -7078,7 +7077,7 @@ tree
|
||||
convert_for_initialization (exp, type, rhs, flags, errtype, fndecl, parmnum)
|
||||
tree exp, type, rhs;
|
||||
int flags;
|
||||
char *errtype;
|
||||
const char *errtype;
|
||||
tree fndecl;
|
||||
int parmnum;
|
||||
{
|
||||
|
@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "toplev.h"
|
||||
|
||||
static tree process_init_constructor PROTO((tree, tree, tree *));
|
||||
static void ack PVPROTO ((const char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
|
||||
extern int errorcount;
|
||||
extern int sorrycount;
|
||||
@ -80,11 +81,11 @@ binfo_or_else (parent_or_type, type)
|
||||
void
|
||||
readonly_error (arg, string, soft)
|
||||
tree arg;
|
||||
char *string;
|
||||
const char *string;
|
||||
int soft;
|
||||
{
|
||||
char *fmt;
|
||||
void (*fn)();
|
||||
const char *fmt;
|
||||
void (*fn) PVPROTO ((const char *, ...));
|
||||
|
||||
if (soft)
|
||||
fn = cp_pedwarn;
|
||||
@ -274,19 +275,28 @@ retry:
|
||||
/* Like error(), but don't call report_error_function(). */
|
||||
|
||||
static void
|
||||
ack (s, v, v2)
|
||||
char *s;
|
||||
HOST_WIDE_INT v;
|
||||
HOST_WIDE_INT v2;
|
||||
ack VPROTO ((const char *msg, ...))
|
||||
{
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
const char *msg;
|
||||
#endif
|
||||
va_list ap;
|
||||
extern char * progname;
|
||||
|
||||
VA_START (ap, msg);
|
||||
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
msg = va_arg (ap, const char *);
|
||||
#endif
|
||||
|
||||
if (input_filename)
|
||||
fprintf (stderr, "%s:%d: ", input_filename, lineno);
|
||||
else
|
||||
fprintf (stderr, "%s: ", progname);
|
||||
|
||||
fprintf (stderr, s, v, v2);
|
||||
vfprintf (stderr, msg, ap);
|
||||
va_end (ap);
|
||||
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
@ -1640,7 +1650,7 @@ report_case_error (code, type, new_value, old_value)
|
||||
|
||||
void
|
||||
check_for_new_type (string, inptree)
|
||||
char *string;
|
||||
const char *string;
|
||||
flagged_type_tree inptree;
|
||||
{
|
||||
if (inptree.new_type_flag
|
||||
|
@ -86,8 +86,8 @@ typedef struct _XREF_SCOPE * XREF_SCOPE;
|
||||
|
||||
typedef struct _XREF_FILE
|
||||
{
|
||||
char *name;
|
||||
char *outname;
|
||||
const char *name;
|
||||
const char *outname;
|
||||
XREF_FILE next;
|
||||
} XREF_FILE_INFO;
|
||||
|
||||
@ -122,19 +122,20 @@ static tree last_fndecl = NULL;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
static void gen_assign PROTO((XREF_FILE, tree));
|
||||
static XREF_FILE find_file PROTO((char *));
|
||||
static char * filename PROTO((XREF_FILE));
|
||||
static char * fctname PROTO((tree));
|
||||
static char * declname PROTO((tree));
|
||||
static XREF_FILE find_file PROTO((const char *));
|
||||
static const char * filename PROTO((XREF_FILE));
|
||||
static const char * fctname PROTO((tree));
|
||||
static const char * declname PROTO((tree));
|
||||
static void simplify_type PROTO((char *));
|
||||
static char * fixname PROTO((char *, char *));
|
||||
static void open_xref_file PROTO((char *));
|
||||
static const char * fixname PROTO((const char *, char *));
|
||||
static void open_xref_file PROTO((const char *));
|
||||
static const char * classname PROTO((tree));
|
||||
|
||||
/* Start cross referencing. FILE is the name of the file we xref. */
|
||||
|
||||
void
|
||||
GNU_xref_begin (file)
|
||||
char *file;
|
||||
const char *file;
|
||||
{
|
||||
doing_xref = 1;
|
||||
|
||||
@ -178,7 +179,7 @@ GNU_xref_end (ect)
|
||||
|
||||
void
|
||||
GNU_xref_file (name)
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
XREF_FILE xf;
|
||||
|
||||
@ -209,8 +210,8 @@ GNU_xref_file (name)
|
||||
else
|
||||
{
|
||||
char *nmbuf
|
||||
= (char *) malloc (strlen (wd_name) + strlen (FILE_NAME_JOINER)
|
||||
+ strlen (name) + 1);
|
||||
= (char *) xmalloc (strlen (wd_name) + strlen (FILE_NAME_JOINER)
|
||||
+ strlen (name) + 1);
|
||||
sprintf (nmbuf, "%s%s%s", wd_name, FILE_NAME_JOINER, name);
|
||||
name = nmbuf;
|
||||
xf->outname = nmbuf;
|
||||
@ -259,7 +260,7 @@ GNU_xref_end_scope (id,inid,prm,keep)
|
||||
{
|
||||
XREF_FILE xf;
|
||||
XREF_SCOPE xs,lxs,oxs;
|
||||
char *stype;
|
||||
const char *stype;
|
||||
|
||||
if (!doing_xref) return;
|
||||
xf = find_file (input_filename);
|
||||
@ -302,7 +303,7 @@ GNU_xref_end_scope (id,inid,prm,keep)
|
||||
void
|
||||
GNU_xref_ref (fndecl,name)
|
||||
tree fndecl;
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
XREF_FILE xf;
|
||||
|
||||
@ -322,8 +323,8 @@ GNU_xref_decl (fndecl,decl)
|
||||
tree decl;
|
||||
{
|
||||
XREF_FILE xf,xf1;
|
||||
char *cls = 0;
|
||||
char *name;
|
||||
const char *cls = 0;
|
||||
const char *name;
|
||||
char buf[10240];
|
||||
int uselin;
|
||||
|
||||
@ -432,11 +433,11 @@ GNU_xref_decl (fndecl,decl)
|
||||
void
|
||||
GNU_xref_call (fndecl, name)
|
||||
tree fndecl;
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
XREF_FILE xf;
|
||||
char buf[1024];
|
||||
char *s;
|
||||
const char *s;
|
||||
|
||||
if (!doing_xref) return;
|
||||
xf = find_file (input_filename);
|
||||
@ -508,7 +509,7 @@ gen_assign(xf, name)
|
||||
XREF_FILE xf;
|
||||
tree name;
|
||||
{
|
||||
char *s;
|
||||
const char *s;
|
||||
|
||||
s = NULL;
|
||||
|
||||
@ -541,7 +542,7 @@ gen_assign(xf, name)
|
||||
fprintf(xref_file, "ASG %s %d %s\n", filename(xf), lineno, s);
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char *
|
||||
classname (cls)
|
||||
tree cls;
|
||||
{
|
||||
@ -590,9 +591,9 @@ GNU_xref_member(cls, fld)
|
||||
tree fld;
|
||||
{
|
||||
XREF_FILE xf;
|
||||
char *prot;
|
||||
const char *prot;
|
||||
int confg, pure;
|
||||
char *d;
|
||||
const char *d;
|
||||
#ifdef XREF_SHORT_MEMBER_NAMES
|
||||
int i;
|
||||
#endif
|
||||
@ -651,7 +652,7 @@ GNU_xref_member(cls, fld)
|
||||
|
||||
static XREF_FILE
|
||||
find_file(name)
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
XREF_FILE xf;
|
||||
|
||||
@ -664,7 +665,7 @@ find_file(name)
|
||||
|
||||
/* Return filename for output purposes. */
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
filename(xf)
|
||||
XREF_FILE xf;
|
||||
{
|
||||
@ -682,12 +683,12 @@ filename(xf)
|
||||
|
||||
/* Return function name for output purposes. */
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
fctname(fndecl)
|
||||
tree fndecl;
|
||||
{
|
||||
static char fctbuf[1024];
|
||||
char *s;
|
||||
const char *s;
|
||||
|
||||
if (fndecl == NULL && last_fndecl == NULL) return "*";
|
||||
|
||||
@ -709,7 +710,7 @@ fctname(fndecl)
|
||||
|
||||
/* Return decl name for output purposes. */
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
declname(dcl)
|
||||
tree dcl;
|
||||
{
|
||||
@ -773,12 +774,13 @@ simplify_type(typ)
|
||||
|
||||
/* Fixup a function name (take care of embedded spaces). */
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
fixname(nam, buf)
|
||||
char *nam;
|
||||
const char *nam;
|
||||
char *buf;
|
||||
{
|
||||
char *s, *t;
|
||||
const char *s;
|
||||
char *t;
|
||||
int fg;
|
||||
|
||||
s = nam;
|
||||
@ -806,9 +808,10 @@ fixname(nam, buf)
|
||||
|
||||
static void
|
||||
open_xref_file(file)
|
||||
char *file;
|
||||
const char *file;
|
||||
{
|
||||
char *s, *t;
|
||||
const char *s;
|
||||
char *t;
|
||||
|
||||
#ifdef XREF_FILE_NAME
|
||||
XREF_FILE_NAME (xref_name, file);
|
||||
|
Loading…
Reference in New Issue
Block a user