diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-09 19:56:01 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-09 19:56:01 +0000 |
commit | e772a198f084ad036a97a4dc09e2fe8def270121 (patch) | |
tree | 11478b672b9b1d6e7c70820a940f550161e9a1a5 /gcc/ch | |
parent | 0cd8536ce1a6769ac582b840925d915db5f1d925 (diff) | |
download | gcc-e772a198f084ad036a97a4dc09e2fe8def270121.tar.gz |
top level:
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings.
(tree.o): Depend on output.h.
* c-decl.c (pending_invalid_xref_file,
current_function_prototype_file): Constify.
(pushdecl): Constify a local char *.
(define_label): Constify filename parameter.
* c-lex.c (init_parse): Constify parameter and return value.
* c-typeck.c (c_expand_asm_operands): Constify filename parameter.
* c-tree.h: Update prototypes.
* c-parse.in: Constify filename member of %union, and if_stmt_file.
* c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y,
objc/objc-parse.c: Regenerate.
* dwarfout.c (dwarfout_init): Constify main_input_filename parameter.
* dwarfout.h: Update prototypes.
* expr.c (expand_expr): Constify a local char *.
* flags.h: Constify main_input_filename.
* function.c (expand_function_end): Constify filename parameter.
* genrecog.c (make_insn_sequence): Use a character array for
c_test_pos.
(main): Remove unused variables.
* input.h: Constify input_filename, main_input_filename, and
file_stack.name. Update prototypes.
* output.h: Declare first_global_object_name and
weak_global_object_name here, as const char *.
* stmt.c (expand_asm_operands): Constify filename parameter.
* toplev.c (compile_file, push_srcloc, debug_start_source_file):
Constify filename parameter.
(input_filename, main_input_filename): Constify.
* toplev.h: Update prototypes.
* tree.c: Include output.h. Don't declare
first_global_object_name or weak_global_object_name. Clean up string
bashing in get_file_function_name_long.
* tree.h (struct tree_decl): Constify filename member.
(input_filename): Constify.
Update prototypes.
* varasm.c (first_global_object_name, weak_global_object_name):
Constify.
(assemble_start_function, assemble_variable): Clean up string bashing.
* gcc.c: Constify all spec-related strings initialized,
transitively, from string constants. Constify all strings
and string variables related to multilibs.
(set_spec, read_specs): Cast argument to free to PTR.
(used_arg): Do not modify multilib_matches. Use strncmp plus
length comparison to compare multilib switches.
* genmultilib: Constify everything declared in multilib.h.
ch:
* ch-tree.h: Update prototypes. Remove prototypes for
functions declared elsewhere.
* decl.c (define_label): Constify filename parameter.
* grant.c (globalize_decl, set_default_grant_file): Constify
local char * variables. Don't declare
first_global_object_name or asm_out_file.
* lang.c (chill_real_input_filename): Constify.
* lex.c (init_parse): Constify parameter and return value.
* parse.c: Don't declare input_filename.
(ch_expand_asm_operands): Constify filename parameter.
(parse_multi_dimension_case_action): Constify local char *.
* satisfy.c (safe_satisfy_decl): Constify local char *.
cp:
* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
and pending_inline.filename. Update prototypes.
* decl.c (define_label): Constify filename parameter.
* decl2.c (warn_if_unknown_interface): Constify local char *.
* input.c Constify input_source.filename. Don't declare
input_filename or lineno. Constify filename parameter to feed_input.
* lex.c (init_parse): Constify parameter and return value.
(cp_pragma_interface, cp_pragma_implementation): Constify
filename argument.
(reinit_parse_for_method, reinit_parse_for_block,
reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
Constify local char *.
* pt.c: Don't declare lineno or input_filename.
(print_template_context, tsubst_friend_function, tsubst_decl,
tsubst, instantiate_decl): Constify local char *.
* semantics.c (expand_body): Constify local char *.
* tree.c (build_srcloc): Constify filename parameter.
* typeck.c (c_expand_asm_operands): Constify filename
parameter.
f:
* com.c (ffecom_subscript_check_): Constify array_name
parameter. Clean up string bashing.
(ffecom_arrayref_, ffecom_char_args_x_): Constify array_name
parameter.
(ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_,
ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify
local char *.
(init_parse): Constify parameter and return value.
* lex.c: Include dwarfout.h instead of prototyping dwarfout_*
functions here.
(ffelex_file_pop_, ffelex_file_push_): Constify filename parameter.
(ffelex_hash_, ffelex_include_): Constify local char *.
* std.c (ffestd_exec_end): Constify local char *.
* where.c (ffewhere_file_new): Constify filename parameter.
* where.h: Update prototypes.
java:
* check_init.c (check_init): Constify local char *.
* class.c (push_class): Constify local char *.
* java_tree.h: Update prototypes.
* jcf-io.c (open_class): Constify filename parameter and
return value.
(find_class): Remove redundant string copy. Cast return from
open_class.
* jcf-parse.c (read_class, parse_class_file, yyparse):
Constify local char *.
* jcf-write.c (generate_bytecode_insns, generate_classfile):
Constify local char *.
* jcf.h (JCF): Constify filename and classname.
(JCF_FINISH): Cast args to FREE to char * when appropriate.
* lang.c (init_parse): Constify parameter and return value.
* lex.c (java_get_line_col): Constify filename parameter.
* parse.h: Constify parser_ctxt.filename. Update prototypes.
* parse.y (java_parser_context_suspend,
issue_warning_error_from_context, safe_layout_class): Constify
local char *.
* parse.c: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ch')
-rw-r--r-- | gcc/ch/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/ch/ch-tree.h | 16 | ||||
-rw-r--r-- | gcc/ch/decl.c | 2 | ||||
-rw-r--r-- | gcc/ch/grant.c | 19 | ||||
-rw-r--r-- | gcc/ch/lang.c | 2 | ||||
-rw-r--r-- | gcc/ch/lex.c | 4 | ||||
-rw-r--r-- | gcc/ch/parse.c | 8 | ||||
-rw-r--r-- | gcc/ch/satisfy.c | 2 |
8 files changed, 34 insertions, 34 deletions
diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index fe842119b9b..45262b340e7 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,18 @@ +2000-05-09 Zack Weinberg <zack@wolery.cumb.org> + + * ch-tree.h: Update prototypes. Remove prototypes for + functions declared elsewhere. + * decl.c (define_label): Constify filename parameter. + * grant.c (globalize_decl, set_default_grant_file): Constify + local char * variables. Don't declare + first_global_object_name or asm_out_file. + * lang.c (chill_real_input_filename): Constify. + * lex.c (init_parse): Constify parameter and return value. + * parse.c: Don't declare input_filename. + (ch_expand_asm_operands): Constify filename parameter. + (parse_multi_dimension_case_action): Constify local char *. + * satisfy.c (safe_satisfy_decl): Constify local char *. + 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * ch-tree.h (init_function_start): Constify. diff --git a/gcc/ch/ch-tree.h b/gcc/ch/ch-tree.h index 953a1dc4c3f..5547107e137 100644 --- a/gcc/ch/ch-tree.h +++ b/gcc/ch/ch-tree.h @@ -672,7 +672,7 @@ extern void clear_parm_order PARAMS ((void)); extern tree combine_parm_decls PARAMS ((tree, tree, int)); extern int complete_array_type PARAMS ((tree, tree, int)); extern void declare_parm_level PARAMS ((int)); -extern tree define_label PARAMS ((char *, int, tree)); +extern tree define_label PARAMS ((const char *, int, tree)); extern void delete_block PARAMS ((tree)); extern void finish_decl PARAMS ((tree)); extern tree finish_enum PARAMS ((tree, tree)); @@ -1110,16 +1110,6 @@ extern tree type_for_size PARAMS ((unsigned, int)); extern int valid_array_index PARAMS ((tree, tree)); extern void validate_varying_array_ref PARAMS ((tree, tree)); -/* in function.c */ -extern void expand_function_end PARAMS ((char *, int, int)); -extern void expand_function_start PARAMS ((tree, int)); -extern void init_function_start PARAMS ((tree, const char *, int)); -extern void pop_function_context PARAMS ((void)); -extern void push_function_context PARAMS ((void)); - -/* in integrate.c */ -extern void output_inline_function PARAMS ((tree)); - /* in toplev.c */ extern void announce_function PARAMS ((tree)); extern int floor_log2_wide PARAMS ((unsigned HOST_WIDE_INT)); @@ -1132,10 +1122,6 @@ extern void make_function_rtl PARAMS ((tree)); extern void init_iterators PARAMS ((void)); extern int mark_addressable PARAMS ((tree)); extern tree chill_result_decl; -#ifdef RTX_CODE -extern rtx label_rtx PARAMS ((tree)); -#endif -extern void permanent_allocation PARAMS ((int)); #ifndef SET_WORD_SIZE #define SET_WORD_SIZE BITS_PER_WORD diff --git a/gcc/ch/decl.c b/gcc/ch/decl.c index 83caf0b003d..9d5fd0dcfef 100644 --- a/gcc/ch/decl.c +++ b/gcc/ch/decl.c @@ -3151,7 +3151,7 @@ pushdecl_top_level (x) tree define_label (filename, line, name) - char *filename; + const char *filename; int line; tree name; { diff --git a/gcc/ch/grant.c b/gcc/ch/grant.c index ddd8f936443..42328c122a8 100644 --- a/gcc/ch/grant.c +++ b/gcc/ch/grant.c @@ -2544,9 +2544,7 @@ globalize_decl (decl) if (!TREE_PUBLIC (decl) && DECL_NAME (decl) && (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL)) { - extern FILE *asm_out_file; - extern char *first_global_object_name; - const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); + const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); if (!first_global_object_name) first_global_object_name = name + (name[0] == '*'); @@ -2686,7 +2684,8 @@ write_grant_file () void set_default_grant_file () { - char *p, *tmp, *fname; + char *p, *tmp; + const char *fname; if (dump_base_name) fname = dump_base_name; /* Probably invoked via gcc */ @@ -2993,18 +2992,18 @@ chill_finish_compile () Perhaps rewrite this so nothing is done in pass 1. */ if (pass == 1) { - extern char *first_global_object_name; /* If we don't do this spoof, we get the name of the first tasking_code variable, and not the file name. */ - char *tmp = first_global_object_name; - + char *q; + const char *tmp = first_global_object_name; first_global_object_name = NULL; chill_init_name = get_file_function_name ('I'); first_global_object_name = tmp; + /* strip off the file's extension, if any. */ - tmp = strrchr (IDENTIFIER_POINTER (chill_init_name), '.'); - if (tmp) - *tmp = '\0'; + q = strrchr (IDENTIFIER_POINTER (chill_init_name), '.'); + if (q) + *q = '\0'; } start_chill_function (chill_init_name, void_type_node, NULL_TREE, diff --git a/gcc/ch/lang.c b/gcc/ch/lang.c index 42470cf354d..9a2f822fc1a 100644 --- a/gcc/ch/lang.c +++ b/gcc/ch/lang.c @@ -47,7 +47,7 @@ int ignore_case = 1; int special_UC = 0; /* The actual name of the input file, regardless of any #line directives */ -char* chill_real_input_filename; +const char* chill_real_input_filename; extern FILE* finput; static int deep_const_expr PARAMS ((tree)); diff --git a/gcc/ch/lex.c b/gcc/ch/lex.c index 5f0eb524d11..cd433caf9b9 100644 --- a/gcc/ch/lex.c +++ b/gcc/ch/lex.c @@ -197,9 +197,9 @@ ch_lex_init () } -char * +const char * init_parse (filename) - char *filename; + const char *filename; { int lowercase_standard_names = ignore_case || ! special_UC; diff --git a/gcc/ch/parse.c b/gcc/ch/parse.c index 92ca55bb97f..f2513ff23fa 100644 --- a/gcc/ch/parse.c +++ b/gcc/ch/parse.c @@ -94,7 +94,6 @@ static int expect PARAMS ((enum terminal, const char *)); static void define__PROCNAME__ PARAMS ((void)); extern int lineno; -extern char *input_filename; extern tree generic_signal_type_node; extern tree signal_code; extern int all_static_flag; @@ -451,7 +450,8 @@ static void parse_multi_dimension_case_action PARAMS ((tree)); static void parse_case_action PARAMS ((tree)); static tree parse_asm_operands PARAMS ((void)); static tree parse_asm_clobbers PARAMS ((void)); -static void ch_expand_asm_operands PARAMS ((tree, tree, tree, tree, int, char *, int)); +static void ch_expand_asm_operands PARAMS ((tree, tree, tree, tree, + int, const char *, int)); static void parse_asm_action PARAMS ((void)); static void parse_begin_end_block PARAMS ((tree)); static void parse_if_action PARAMS ((tree)); @@ -1785,7 +1785,7 @@ parse_multi_dimension_case_action (selector) tree action_labels = NULL_TREE; tree tests = NULL_TREE; int save_lineno = lineno; - char *save_filename = input_filename; + const char *save_filename = input_filename; /* We can't compute the range of an (ELSE) label until all of the CASE label specifications have been seen, however, the code for the actions @@ -2008,7 +2008,7 @@ static void ch_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) tree string, outputs, inputs, clobbers; int vol; - char *filename; + const char *filename; int line; { int noutputs = list_length (outputs); diff --git a/gcc/ch/satisfy.c b/gcc/ch/satisfy.c index fa300302c29..8fa46de3966 100644 --- a/gcc/ch/satisfy.c +++ b/gcc/ch/satisfy.c @@ -67,7 +67,7 @@ safe_satisfy_decl (decl, prev_chain) struct decl_chain new_link; struct decl_chain *link; struct decl_chain *chain = prev_chain; - char *save_filename = input_filename; + const char *save_filename = input_filename; int save_lineno = lineno; tree result = decl; |