1. 09 May, 2000 1 commit
    • top level: · 3b304f5b
      	* 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.
      
      From-SVN: r33804
      Zack Weinberg committed
  2. 06 Feb, 2000 1 commit
  3. 30 Dec, 1999 1 commit
    • Make the Fortran front-end use garbage collection: · 7189a4b0
      	* com.c (ffecom_init_0): Make double_ftype_double,
      	float_ftype_float, ldouble_ftype_ldouble,
      	ffecom_tree_ptr_to_fun_type_void local.
      	(tracker_head): New static variable.
      	(mark_tracker_head): New, marker procedure for tracker_head.
      	(ffecom_save_tree_forever): New procedure.
      	(ffecom_init_zero_): Remove obstack use.
      	(ffecom_make_gfrt_): Remove obstack use.
      	(ffecom_sym_transform_): Remove obstack use, save appropriate trees.
      	(ffecom_transform_common_): Remove obstack use, save appropriate
      	trees.
      	(ffecom_type_namelist_): Remove obstack use, save appropriate
      	trees.
      	(ffecom_type_vardesc_): Remove obstack use, save appropriate trees.
      	(ffecom_lookup_label): Remove obstack use, save appropriate trees.
      	(duplicate_decls): Remove obstack use.
      	(finish_function): push & pop ggc context around
      	rest_of_compilation when building nested function.
      	(mark_binding_level): New function.
      	(init_decl_processing): Mark all the GC roots.
      	(ggc_p): Set to 1.
      	(lang_mark_tree): New function.
      	(lang_mark_false_label_stack): New trivial function.
      	* com.h (ffecom_save_tree_forever): Declare as external.
      	* lex.c (ffelex_hash_): Use GC to allocate the filename string
      	even when ffelex_kludge_flag_.
      	* ste.c (ffeste_io_ialist_): Register a static root.
      	(ffeste_io_inlist_): Likewise.
      	(ffeste_io_icilist_): Likewise.
      	(ffeste_io_cllist_): Likewise.
      	(ffeste_io_cilist_): Likewise.
      	(ffeste_io_olist_): Likewise.
      	* Makefile.in (OBJS): Don't use ggc-callbacks.o.
      	(OBJDEPS): Likewise.
      	(GGC_H): New variable.
      	Update dependencies.
      	* where.c (ffewhere_head): New global.
      	(mark_ffewhere_head): New marker procedure for ffewhere_head.
      	(ffewhere_file_kill): Use GC to do memory management.
      	(ffewhere_file_new): Use GC to do memory management.
      	* ggc.j: New file.
      
      From-SVN: r31142
      Geoff Keating committed
  4. 15 Feb, 1999 1 commit
  5. 12 Oct, 1998 1 commit
    • Warning fixes: · 0816ebdd
              * bad.c (ffebad_finish): Change type of variable `c' to unsigned
              char, change type of variable `s' to unsigned char *.
              * com.c (ffecom_symbol_null_): Add missing initializers.
              * fini.c (MAXNAMELEN): Undef it before defining.
              * implic.c (ffeimplic_lookup_): Change type of parameter `c' to
              unsigned char.
              * intrin.c (ffeintrin_init_0): Cast the argument of ctype macros
              to (unsigned char).
              * lex.c (ffelex_splice_tokens): Change type of variable `p' to
              unsigned char *.
              (ffelex_token_name_from_names): Cast the argument of
              `ffelex_is_firstnamechar' to (unsigned char).
              (ffelex_token_names_from_names): Likewise.
              (ffelex_token_new_name): Likewise.
              (ffelex_token_new_names): Likewise.
              * malloc.c (malloc_root_): Add missing initializer.
              * stb.c (ffestb_do): Change type of variable `p' to unsigned char *.
              (ffestb_else) Likewise.
              (ffestb_else3_) Likewise.
              (ffestb_endxyz) Likewise.
              (ffestb_goto) Likewise.
              (ffestb_let) Likewise.
              (ffestb_varlist) Likewise.
              (ffestb_R522) Likewise.
              (ffestb_R528) Likewise.
              (ffestb_R834) Likewise.
              (ffestb_R835) Likewise.
              (ffestb_R838) Likewise.
              (ffestb_R1102) Likewise.
              (ffestb_blockdata) Likewise.
              (ffestb_R1212) Likewise.
              (ffestb_R810) Likewise.
              (ffestb_R10014_): Cast the argument of `ffelex_is_firstnamechar'
              to (unsigned char).
              (ffestb_V014): Change type of variable `p' to unsigned char *.
              (ffestb_dummy) Likewise.
              (ffestb_R524) Likewise.
              (ffestb_R547) Likewise.
              (ffestb_decl_chartype) Likewise.
              (ffestb_decl_dbltype) Likewise.
              (ffestb_decl_gentype) Likewise.
              (ffestb_decl_entsp_2_) Likewise.
              (ffestb_V027) Likewise.
              (ffestb_decl_R539) Likewise.
              * top.c (ffe_decode_option): Mark parameter `argc' with
              ATTRIBUTE_UNUSED.
              * where.c (ffewhere_unknown_line_): Add missing initializers.
      
      From-SVN: r23030
      Kaveh R. Ghazi committed
  6. 19 May, 1998 1 commit
  7. 12 Aug, 1997 1 commit