Commit Graph

29 Commits

Author SHA1 Message Date
Geoff Keating
644c7c4f7f * tlink.c (scan_linker_output): Tweak for output of AIX ld.
From-SVN: r35108
2000-07-18 00:15:46 +00:00
Zack Weinberg
993c790ecd c-decl.c, [...]: Include intl.h.
* c-decl.c, timevar.c, tlink.c: Include intl.h.
	* Makefile.in: Update deps.

From-SVN: r34785
2000-06-29 17:31:03 +00:00
Philipp Thomas
5e4adfbabc c-decl.c: Mark strings for translation.
2000-06-28  Philipp Thomas  <pthomas@suse.de>

	* c-decl.c : Mark strings for translation.
	(parmlist_tags_warning): Use distinct messages instead
	of conditional expressions.
	* diagnostic.c (v_message_with_decl): Mark string for translation.
	* gcc.c: Mark messages for translation.
	(display_help): Combine messages into one string where necessary.
	* mips-tfile.c: Add intl.h. Mark messages for translation.
	* rtl.c (fatal_with_file_and_line): Modify function for NLS. Mark
	messages for translation.
	* timevar.c: Mark messages for translation.
	* tlink.c: Likewise.
	* toplev.c: Likewise.

From-SVN: r34773
2000-06-28 23:46:27 +00:00
Jason Merrill
2c56187413 tlink.c (read_repo_files): Don't look for .rpo info for linker flags.
* tlink.c (read_repo_files): Don't look for .rpo info for
	linker flags.

From-SVN: r32978
2000-04-06 17:03:45 -04:00
Jason Merrill
6ff7fb9572 tree.c (decl_function_context): Handle virtual functions.
* tree.c (decl_function_context): Handle virtual functions.

        * tlink.c (scan_linker_output): Don't look in demangled name when
        looking for linker output keywords.

        * dwarfout.c (output_type): We can defer namespace-scope classes.

From-SVN: r30950
1999-12-15 04:37:48 -05:00
Jason Merrill
3f94eee685 typo
From-SVN: r29482
1999-09-17 14:54:29 -04:00
Jason Merrill
57be4e89e8 tlink.c (scan_linker_output): Look for keywords before accepting a mangled name in quotes.
* tlink.c (scan_linker_output): Look for keywords before accepting
	a mangled name in quotes.

From-SVN: r29479
1999-09-17 14:35:31 -04:00
Kaveh R. Ghazi
d4058195bd Makefile.in (tlink.o): Don't depend on toplev.h.
* Makefile.in (tlink.o): Don't depend on toplev.h.

	* collect2.c (c_file, o_file, export_file, import_file, ldout,
	output_file, nm_file_name, ldd_file_name, strip_file_name,
	c_file_name, prefix_list, libexts, is_ctor_dtor, find_a_file,
	add_prefix, prefix_from_env, prefix_from_string, do_wait,
	fork_execute, maybe_unlink, add_to_list,
	extract_init_priority, write_list, dump_list,
	dump_prefix_list, write_list_with_asm, write_c_file,
	write_c_file_stat, write_c_file_glob, scan_prog_file,
	scan_libraries, is_in_list, resolve_lib_name, use_import_list,
	ignore_library, extract_string, notice, dump_file, target_machine,
	collect_wait, collect_execute, libname, locatelib, aix_std_libs,
	read_file, print_load_command): Constify a char*.
	(fdopen, error, fatal, fatal_perror): Don't prototype.
	(my_strerror): Remove.  All callers use xstrerror instead.
	(xcalloc, xmalloc, xrealloc, xstrdup, putenv): Remove definitions.
	(main): Add prototype.  Constify lots of char* ptrs.  Change calls
	to xcalloc/strcpy/strcat/...  to one call to concat.
	(main, scan_prog_file, scan_libraries): Use an intermediate
	`const char **' to build an argv array.
	(mapfile, libselect, libcompare, locatelib): Add prototypes.

	* collect2.h (collect_execute, collect_wait, dump_file,
	file_exists): Constify a char*.
	(ldout, c_file_name, temporary_obstack, permanent_obstack,
	temporary_firstobj, vflag, debug): Add extern declarations.
	(fancy_abort, error, notice, fatal, fatal_perror): Add prototypes.

	* tlink.c: Don't include toplev.h.
	(vflag, debug, ldout, c_file_name, temporary_obstack,
	permanent_obstack, temporary_firstobj): Don't declare.
	(tlink_execute, frob_extension, symbol_hash_lookup,
	file_hash_lookup, demangled_hash_lookup, tlink_init, freadsym,
	recompile_files, read_repo_files, demangle_new_symbols,
	scan_linker_output): Constify a char*.
	(symbol_hash_newfunc, file_hash_newfunc, demangled_hash_newfunc,
	do_tlink): Mark parameters with ATTRIBUTE_UNUSED.

From-SVN: r29087
1999-09-03 19:13:34 +00:00
Jason Merrill
9c5b50b30a tlink.c (scan_linker_output): Skip the initial underscore in a mangled name if appropriate.
* tlink.c (scan_linker_output): Skip the initial underscore in
	a mangled name if appropriate.

From-SVN: r29083
1999-09-03 12:14:54 -04:00
Philippe De Muyter
0c26b18a0d tlink.c (symbol_hash_lookup): Do not prefix functions used as function parameters with `&'.
* tlink.c (symbol_hash_lookup): Do not prefix functions used as
        function parameters with `&'.
        (file_hash_lookup, demangled_hash_lookup, tlink_init): Ditto.

From-SVN: r28485
1999-08-04 01:41:48 -06:00
Art Haas
9d4c59ab20 tlink.c (symbol_hash_newfunc): Remove redundant call to hash_newfunc.
* tlink.c (symbol_hash_newfunc): Remove redundant call to
	hash_newfunc.
	(file_hash_newfunc, demangled_hash_newfunc): Likewise.

From-SVN: r25974
1999-03-25 06:50:02 -05:00
Kaveh R. Ghazi
54ea1de9f3 Warning fixes:
* c-lex.c (yylex): Remove unused variable `bytes'.
        * flow.c (print_rtl_with_bb): Cast the return value of alloca.
        * function.c (assign_parms): Wrap variable `varargs_setup' in
        macro SETUP_INCOMING_VARARGS.
        (thread_prologue_and_epilogue_insns): Mark parameter `f' with
        ATTRIBUTE_UNUSED.
        * local-alloc.c (no_equiv): Likewise for parameter `store'.
        * sched.c (schedule_insns): Remove unused variables `insn' and `next'.
        * tlink.c (symbol_hash_newfunc, symbol_hash_lookup,
        file_hash_newfunc, file_hash_lookup, demangled_hash_newfunc,
        demangled_hash_lookup, symbol_push, symbol_pop, file_push,
        file_pop, tlink_init, tlink_execute, frob_extension,
        obstack_fgets, tfgets, pfgets, freadsym, read_repo_file,
        maybe_tweak, recompile_files, read_repo_files,
        demangle_new_symbols, scan_linker_output): Add static prototype.
        (symbol_hash_newfunc, file_hash_newfunc, demangled_hash_newfunc):
        Make the third argument a `hash_table_key'.
        * toplev.c (debug_start_source_file): Mark parameter `filename'
        with ATTRIBUTE_UNUSED.

From-SVN: r25871
1999-03-20 19:21:31 +00:00
Jason Merrill
eb686064ca add comments
From-SVN: r24873
1999-01-26 14:34:06 -05:00
Jeff Law
5f38fdda61 Update FSF address in copyright header.
From-SVN: r24614
1999-01-11 06:34:38 -07:00
Kaveh R. Ghazi
2edfd4ee53 collect2.h: New header file for prototypes.
* collect2.h: New header file for prototypes.
        * Makefile.in (collect2.o, tlink.o): Depend on collect2.h.
        * collect2.c: Include collect2.h.
        * tlink.c: Likewise.

From-SVN: r24231
1998-12-10 10:48:27 +00:00
Kaveh R. Ghazi
2778b98d90 system.h: Include libiberty.h.
* system.h: Include libiberty.h.
        * c-aux-info.c: Remove prototypes for concat/concat3.  Change
        function `concat' from fixed parameters to variable parameters,
        as is done in libiberty.  All callers of concat/concat3
        changed to use the new `concat' with variable args.
        * cccp.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        * cexp.y: Likewise.
        * collect2.c: Likewise.
        * config/1750a/1750a.h: Likewise.
        * cppalloc.c: Likewise.
        * cppexp.c: Likewise.
        * cppfiles.c: Likewise.
        * cpphash.c: Likewise.
        * cpplib.c: Likewise.
        * dyn-string.c: Likewise.
        * fix-header.c: Likewise.
        * gcc.c: Likewise.
        * gcov.c: Likewise.
        * genattr.c: Likewise.
        * genattrtab.c: Likewise.
        * gencheck.c: Likewise.
        * gencodes.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * gengenrtl.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.
        * getpwd.c: Likewise.
        * halfpic.c: Likewise.
        * hash.c: Likewise.
        * mips-tdump.c: Likewise.  Wrap malloc/realloc/calloc prototypes
        in NEED_DECLARATION_* macros.
        * mips-tfile.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        (fatal): Fix const-ification of variable `format' in
        !ANSI_PROTOTYPES case.
        * prefix.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid
        conflicting with function `spaces' from libiberty.
        * profile.c: Remove things made redundant by libiberty.h and/or
        conform to libiberty standards.
        * protoize.c: Likewise.
        * rtl.h: Likewise.
        * scan.h: Likewise.
        * tlink.c: Likewise.
        * toplev.c: Likewise.
        * toplev.h: Likewise.
        * tree.h: Likewise.

From-SVN: r23931
1998-11-27 10:09:17 +00:00
Mark Mitchell
a87ec9e655 hash.h (hash_table_key): New type.
* hash.h (hash_table_key): New type.
	(hash_entry): Change `string' field to generic `key'.
	(hash_table): Add `comp' and `hash' functions.
	(hash_table_init): Take them as input.
	(hash_table_init_n): Likewise.
	(hash_lookup): Modify for generic keys.
	(hash_newfunc): Likewise.
	(hash_traverse): Likewise.
	(string_hash): New function.
	(string_compare): Likewise.
	(string_copy): Likewise.
	* hash.c (hash_table_init_n): Modify for generic keys.
	(hash_table_init): Likewise.
	(hash_lookup): Likewise.
	(hash_newfunc): Likewise.
	(hash_traverse): Likewise.
	(string_hash): Split out from hash_lookup.
	(string_compare): New function.
	(string_copy): Split out from hash_lookup.
	* tlink.c (symbol_hash_newfunc): Modify for new interfaces to hash
	tables.
	(symbol_hash_lookup): Likewise.
	(file_hash_newfunc): Likewise.
	(file_hash_lookup): Likewise.
	(demangled_hash_newfunc): Likewise.
	(demangled_hash_lookup): Likewise.
	(tlink_int): Likewise.
	(read_repo_file): Likewise.
	(recompile_files): Likewise.
	(demangle_new_symbols): Likewise.
	(scan_linker_output): Likewise.

From-SVN: r23683
1998-11-17 11:50:24 +00:00
Kaveh R. Ghazi
79c9824ecb Warning fixes:
* Makefile.in (flow.o): Depend on recog.h.
        * cpplib.h (directive_table): Add missing initializiers.
        (finclude): Change type of variable `bsize' to size_t.
        * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED.
        * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE.
        * fix-header.c (lookup_std_proto): Cast the result of `strlen' to
        `int' when comparing against one.
        (cpp_file_line_for_message): Mark parameter `pfile' with
        ATTRIBUTE_UNUSED.
        (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
        * flow.c: Include recog.h.
        (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR).
        * function.c (thread_prologue_and_epilogue_insns): Mark parameter
        `f' with ATTRIBUTE_UNUSED.
        (reposition_prologue_and_epilogue_notes): Likewise.
        * genopinit.c (gen_insn): Cast argument of ctype functions to
        `unsigned char'.
        * haifa-sched.c: Include recog.h.
        (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when
        comparing against one.
        * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now.
        * mips-tfile.c (parse_end): Cast the argument of ctype function to
        `unsigned char'.
        (parse_ent): Likewise.
        (parse_input): Likewise.
        * optabs.c (init_libfuncs): Likewise.
        * protoize.c (find_rightmost_formals_list): Likewise.
        * recog.h (const_double_operand): Fix typo in prototype.
        * tlink.c (scan_linker_output): Cast the argument of ctype
        function to `unsigned char'.
        * toplev.c (check_lang_option): Cast the result of `strlen' to
        `int' when comparing against one.

From-SVN: r23155
1998-10-17 20:26:29 +00:00
Jason Merrill
b4558b577c tlink.c (scan_linker_output): Recognize errors from irix 6.2 linker.
* tlink.c (scan_linker_output): Recognize errors from irix 6.2
	linker.  Recognize mangled names in quotes.

Co-Authored-By: Scott Snyder <snyder@fnal.gov>

From-SVN: r22823
1998-10-04 15:37:42 -04:00
Kaveh R. Ghazi
e9a780ecec c-common.c: Convert to using ctype macros defined in system.h.
* c-common.c: Convert to using ctype macros defined in system.h.
        * c-lex.c: Likewise.
        * cccp.c: Likewise.
        * collect2.c: Likewise.
        * rs6000.c: Likewise.
        * cpplib.c: Likewise.
        * fix-header.c: Likewise.
        * gcc.c: Likewise.
        * gen-protos.c: Likewise.
        * pexecute.c: Likewise.
        * protoize.c: Likewise.
        * rtl.c: Likewise.
        * scan.c: Likewise.
        * stmt.c: Likewise.
        * tlink.c: Likewise.
        * toplev.c: Likewise.

From-SVN: r19579
1998-05-06 12:56:58 +00:00
Robert Lipe
10f0ad3d49 toplev.h: New file.
Wed May  6 06:35:38 1998  Robert Lipe  <robertl@dgii.com>
        * toplev.h: New file.   Protypes for functions in toplev.c.
        * tree.h, rtl.h: Deleted protos for functions in toplev.c.
        * c-common.c, c-convert.c, c-decl.c, c-iterate.c, c-lex.c,
        c-parse.in, c-parse.y, c-pragma.c, c-typeck.c, calls.c,
        convert.c, dwarf2out.c, except.c, expr.c, final.c, fold-const.c,
        function.c, hash.c, profile.c, real.c, reg-stack.c, regclass.c,
        reload.c, reload1.c, stmt.c, stor-layout.c, tlink.c, tree.c,
        varasm.c: include it.

From-SVN: r19564
1998-05-06 04:54:01 +00:00
Kaveh R. Ghazi
670ee92097 Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
        c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
        caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
        dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
        expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
        integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
        prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
        reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
        rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
        tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
        on system.h.
        * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
        c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
        caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
        dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
        expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
        integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
        prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
        reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
        rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
        stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
        xcoffout.c: Include system.h.  Organize include ordering so
        that stdarg/varargs comes before other system headers.  Remove
        spurious casts of functions assured of a prototype in system.h.

From-SVN: r18726
1998-03-20 14:58:42 +00:00
Kaveh Ghazi
5987a4f34a genattr.c: Wrap prototype of `free' in NEED_DECLARATION_FREE.
* genattr.c: Wrap prototype of `free' in NEED_DECLARATION_FREE.
        * genattrtab.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.
        * tlink.c: Likewise.  Also wrap `getenv' in NEED_DECLARATION_GETENV.

From-SVN: r18284
1998-02-27 08:23:47 +00:00
Robert Lipe
2e6a59892b Rats. Forgot to change copyrights on the first commit.
From-SVN: r17902
1998-02-13 05:40:34 +00:00
Robert Lipe
69d4ca36f4 c-lang.c (finish_file): Bracket declaration of static_ctors, static_dtors.
* c-lang.c (finish_file): Bracket declaration of static_ctors,
	static_dtors.
	* calls.c (expand_call): Bracket declaration of 'rtx_before_call',
	'old_stack_arg_under_construction'
	(emit_library_call): Bracket declaration of 'upper_bound',
	'lower_bound', 'i', 'reg_parm_stack_space'
	(emit_library_call_value): Likewise.
	(store_one_arg):
	* collect2.c: include <unistd.h> when appropriate.
	Bracket declaration of 'exportf' and 'full_real_ld_suffix'.
	* emit-rtl.c (prev_cc0_setter): Remove unused variable 'link'.
	* explow.c (plus_constant_for_output_wide): Remove unused variable
	'code'.
	(memory_address): Remove unused variable 'orig_x'.
	* genattrtab.c (make_canonical): Remove unreferenced label 'cond:'.
	(write_const_num_delay_slots): Remove unused variable 'i'.
	* genopinit.c (main): Remove unused variables 'dummy', 'insn_ptr'.
	(gen_insn): Remove unused variable 'obstack_ptr'.
        * libgcc2.c (__bb_exit_func): Remove unused variables 'ret',
        'j', 'tmp', 'i'.
	(__bb_exit_trace_func): Remove unused variable 'e'.
	* optabs.c (expand_binop): remove unused variables 'lhs', 'rhs',
	'funexp'.
	(expand_unop): Remove unused variable 'funexp'.
	(expand_complex_abs): Remove unused variable 'funexp'.
	(init_optabs): Bracket declaration of 'j'.
	(init_complex_libfuncs): Deleted.  Dead static function.
	* profile.c (branch_prob): Remove unused variables 'insn', 'dest'.
	* reg-stack.c: Fix typo in proto for 'get_asm_operand_lengths'
	(reg_to_stack): 'initialized', 'before_function_beg'
	explictly type as ints instead of defaulting.
	(emit_swap_insn): Remove unused variable 'i2'.
	(compare_for_stack_reg): Remove unused variable 'src_note'.
	* rtlanal.c (computed_jump_p): Remove unused variable 'computed_jump'.
	* sched.c (actual_hazard): Bracket declaration of 'this_cost'.
	* stmt.c (add_case_node): Add parens for assignment used as truth.
	(all_cases_count):  Remove unused variable 'count_high'.
	(mark_seen_cases): Remove unused variable 'i'.
	(check_for_full_enumeration_handling): Remove unused variable 't'.
	Bracket declaration of  'all_values', 'l'.
	* tlink.c: Include <stdlib.h>, <unistd.h>, <string.h>/<strings.h>.
	* varasm.c (assemble_string): Remove unused variable 'i'.
	(immed_double_const): Remove unused variable 'in_current_obstack'.
	(immed_real_const_1): Likewise.
	(output_constant_pool): Remove unreferenced label 'done'.
	(output_constant): Remove unused variable 'x'.
        * i386/i386.h (ENCODE_SECTION_INFO): TREE_PUBLIC is an int, not
        a string.
        * i386/sco5.h (ASM_OUTPUT_ASCII): Add parens for assignment used
        as truth.

From-SVN: r17901
1998-02-13 05:30:56 +00:00
Kamil Iskra
7b6ffd1189 * tlink.c (scan_linker_output): Call fclose() for opened files.
From-SVN: r17504
1998-01-27 02:23:08 -07:00
Jeff Law
9d1943807a Remove bogus CYGNUS LOCAL markers.
From-SVN: r17315
1998-01-10 12:57:29 -07:00
Jim Wilson
7053ca7275 Fix minor bugs found by riscos build attempt.
* tlink.c: Include ctype.h.
	* ginclude/va-mips.h: Add _VA_MIPS_H_ENUM ifdef/define/endif.

From-SVN: r15080
1997-09-04 11:54:16 -07:00
Jeffrey A Law
aa32d84158 * Integrate tlink patch from jason@cygnus.com
* gcc.c (SWITCH_TAKES_ARG): Add 'V', 'B' and 'b'.
        (process_command): Increment n_switches for them.  Don't discard
        their args.  Validate them.
        (main): Escape " marks when creating COLLECT_GCC_OPTIONS.
        From Rohan Lenard.
        (process_command): Set include_prefixes from COMPILER_PATH.
        (main): Set COLLECT_GCC_OPTIONS sooner.
        * confiugre.in: Link ../ld/ld.new to collect-ld rather than real-ld.
        * tlink.c, hash.c, hash.h: New files.
        * Makefile.in (USE_COLLECT2): Always use collect2.
        (collect2): Depend on and link in hash.o and tlink.o.
        (tlink.o, hash.o): Add dependencies.

tlink patches from Jason.

From-SVN: r14769
1997-08-11 14:23:53 -06:00