Commit Graph

105 Commits

Author SHA1 Message Date
Ian Lance Taylor e1b7793c8e df-problems.c (df_simulate_one_insn_forwards): Fix braces in switch.
./:	* df-problems.c (df_simulate_one_insn_forwards): Fix braces in
	switch.
	* gcov.c (read_count_file): Add braces around variables declared
	before label.

	* c.opt (Wjump-misses-init): New warning.
	* c-opts.c (c_common_handle_option): Set warn_jump_misses_init for
	-Wall and -Wc++-compat if not already set.
	(c_common_post_options): Clear warn_jump_misses_init if it was not
	set.
	* c-decl.c (struct c_binding): Change type field to a union with
	new label field.  Make it the first field in the struct.  Update
	references to type to use u.type instead.
	(struct c_spot_bindings): Define.
	(struct c_goto_bindings): Define.
	(c_goto_bindings_p): Define, along with VECs.
	(struct c_label_vars): Define.
	(struct c_scope): Add has_label_bindings field.
	(bind_label, set_spot_bindings): New static functions.
	(decl_jump_unsafe, update_spot_bindings): New static functions.
	(update_label_decls): New static function.
	(pop_scope): Call update_label_decls.  Don't call c_end_vm_scope.
	Update binding u.label field to shadowed field.
	(c_binding_start_stmt_expr): New function.
	(c_binding_end_stmt_expr): New function.
	(pushdecl): Don't call c_begin_vm_scope.
	(make_label): Add defining and p_label_vars parameters.  Change
	all callers.
	(lookup_label): Correct test for whether a label has not yet been
	defined.  Call bind_label rather than bind.
	(warn_about_goto): New static function.
	(lookup_label_for_goto): New function.
	(declare_label): Call bind_label rather than bind.
	(check_earlier_gotos): New static function.
	(define_label): Don't give errors about jumping into statement
	expressions or scopes of variably modified types.  Call
	set_spot_bindings and check_earlier_gotos.  Call bind_label
	instead of bind.  Don't set label_context_stack_se or
	label_context_stack_vm.
	(c_get_switch_bindings): New function.
	(c_release_switch_bindings): New function.
	(c_check_switch_jump_warnings): New function.
	(start_function): Don't set label_context_stack_se or
	label_context_stack_vm.
	(finish_function): Likewise.
	* c-typeck.c (label_context_stack_se): Don't define.
	(label_context_stack_vm): Don't define.
	(c_finish_goto_label): Call lookup_label_for_goto rather than
	lookup_label.  Don't give errors about jumping into a statement
	expression or the scope of a variably modified type.  Don't set
	label_context_stack_se or label_context_stack_vm.
	(struct c_switch): Remove blocked_stmt_expr and blocked_vm
	fields.  Add bindings field.
	(c_start_case): Don't set deleted fields.  Set bindings field.
	(do_case): Rework order of tests.  Don't check blocked_stmt_expr
	or blocked_vm.  Call c_check_switch_jump_warnings.
	(c_finish_case): Don't test blocked_stmt_expr field.  Call
	c_release_switch_bindings.
	(c_begin_stmt_expr): Don't increment blocked_stmt_expr in
	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
	set label_context_stack_se.  Call c_bindings_start_stmt_expr.
	(c_finish_stmt_expr): Don't decrement blocked_stmt_expr in
	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
	set label_context_stack_se.  Call c_bindings_end_stmt_expr.
	(c_begin_vm_scope, c_end_vm_scope): Don't define.
	* c-tree.h (C_DECL_UNJUMPABLE_STMT_EXPR): Don't define.
	(C_DECL_UNDEFINABLE_STMT_EXPR): Don't define.
	(C_DECL_UNJUMPABLE_VM): Don't define.
	(C_DECL_UNDEFINABLE_VM): Don't define.
	(struct c_label_list): Don't define.
	(struct c_label_context_se): Don't define.
	(struct c_label_context_vm): Don't define.
	(struct c_spot_bindings): Declare.
	(c_bindings_start_stmt_expr): Declare.
	(c_bindings_end_stmt_expr): Declare.
	(lookup_label_for_goto): Declare.
	(c_get_switch_bindings, c_release_switch_bindings): Declare.
	(c_check_switch_jump_warnings): Declare.
	(label_context_stack_se, label_context_stack_vm): Don't declare.
	(c_finish_goto_label): Update declaration.
	(c_begin_vm_scope, c_end_vm_scope): Don't declare.
	* doc/invoke.texi (Option Summary): Mention -Wjump-misses-init.
	(Warning Options): Document -Wjump-misses-init.
cp/:
	* parser.c (cp_parser_direct_declarator): Add braces around
	variables declared before label.
objc/:
	* objc-act.c (objc_start_function): Don't set
	label_context_stack_se or label_context_stack_vm.
testsuite/:
	* gcc.dg/Wjump-misses-init-1.c: New testcase.
	* gcc.dg/Wjump-misses-init-2.c: New testcase.
	* gcc.dg/c99-vla-jump-5.c: Adjust expected error messages.
	Recognize new notes.
	* gcc.dg/stmt-expr-label-2.c: Likewise.
	* gcc.dg/c99-vla-jump-1.c: Recognize new notes.  Fix column
	numbers.
	* gcc.dg/c99-vla-jump-2.c: Recognize new notes.
	* gcc.dg/c99-vla-jump-3.c: Recognize new notes.
	* gcc.dg/c99-vla-jump-4.c: Likewise.
	* gcc.dg/stmt-expr-label-1.c: Likewise.
	* gcc.dg/stmt-expr-label-3.c: Likewise.
	* gcc.dg/vla-8.c: Likewise.  Move error message to different
	line.

From-SVN: r148512
2009-06-16 05:12:15 +00:00
Jakub Jelinek d4f4bc84b0 gcc.c (process_command): Update copyright notice dates.
* gcc.c (process_command): Update copyright notice dates.
	* gcov.c (print_version): Likewise.
	* gcov-dump.c (print_version): Likewise.
	* mips-tfile.c (main): Likewise.
	* mips-tdump.c (main): Likewise.

	* gfortranspec.c (lang_specific_driver): Update copyright notice
	dates.

	* jcf-dump.c (version): Update copyright notice dates.

	* mf-runtime.c (__mf_usage): Update copyright notice dates.

	* gnu/gcj/convert/Convert.java (version): Update copyright notice
	dates.
	* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.

	* gnu/java/rmi/registry/RegistryImpl.java (version): Update
	copyright notice dates.
	* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.

From-SVN: r143907
2009-02-03 21:48:23 +01:00
Pascal Obry 2f07423c8c gcov.c (create_file_names): Properly handle UNIX and DOS directory separators.
* gcov.c (create_file_names): Properly handle UNIX and DOS
        directory separators.
        (make_gcov_file_name): Likewise + convert the ':' DOS drive
        separator to '~' to ensure clean filenames on Windows.

From-SVN: r140854
2008-10-03 12:49:38 +00:00
Tristan Gingold e3536b82d7 gcov.c (main): Call expandargv.
2008-08-29  Tristan Gingold  <gingold@adacore.com>

	* gcov.c (main): Call expandargv.

From-SVN: r139759
2008-08-29 10:07:23 +00:00
Ralf Wildenhues fa10beec52 cgraph.c: Fix typos in comments.
gcc/
	* cgraph.c: Fix typos in comments.
	(cgraph_availability_names): Fix string typo.
	* fold-const.c: Fix typos in comments.
	(fold_binary): Fix typo in warning.
	* genautomata.c: Fix typos in comments.
	(check_presence_pattern_sets): Fix typo in local variable.
	(output_description): Fix typo in output.
	* ggc-zone.c (ggc_pch_finish): Fix typo in error message.
	* hwint.h: Likewise.
	* matrix-reorg.c (check_allocation_function): Likewise.
	* omega.c (smooth_weird_equations): Likewise.
	* auto-inc-dec.c: Fix typos in comments.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* c-common.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfglayout.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* coverage.c: Likewise.
	* dbxout.c: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dfp.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* dse.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* gimplify.c: Likewise.
	* gthr-lynx.h: Likewise.
	* haifa-sched.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa.c: Likewise.
	* loop-doloop.c: Likewise.
	* mips-tfile.c: Likewise.
	* mkmap-flat.awk: Likewise.
	* mkmap-symver.awk: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts.c: Likewise.
	* passes.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* pretty-print.h: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* ra-conflict.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* regclass.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* rtl-error.c: Likewise.
	* rtlanal.c: Likewise.
	* scan.h: Likewise.
	* sched-rgn.c: Likewise.
	* see.c: Likewise.
	* stmt.c: Likewise.
	* target.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vn.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* unwind-dw2-fde.c: Likewise.
	* unwind.inc: Likewise.
	* value-prof.c: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r136425
2008-06-06 05:42:00 +00:00
Jakub Jelinek 0e5997c0ff re PR driver/35420 (--version copyright date vs. 2008)
PR driver/35420
	* gcc.c (process_command): Update copyright notice dates.
	* gcov.c (print_version): Likewise.
	* gcov-dump.c (print_version): Likewise.
	* mips-tfile.c (main): Likewise.
	* mips-tdump.c (main): Likewise.

	* jcf-dump.c (version): Update copyright notice dates.

	* gfortranspec.c (lang_specific_driver): Update copyright notice
	dates.

	* mf-runtime.c (__mf_usage): Update copyright notice dates.

	* gnu/gcj/convert/Convert.java (version): Update copyright notice
	dates.
	* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.

	* gnu/java/rmi/registry/RegistryImpl.java (version): Update
	copyright notice dates.
	* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.

From-SVN: r132823
2008-03-02 23:50:02 +01:00
Paul Brook 2f41c1d60b configure.ac: Add --with-pkgversion and --with-bugurl.
gcc:
2007-08-21  Paul Brook  <paul@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Add --with-pkgversion and --with-bugurl.
	* configure: Regenerate.
	* doc/install.texi: Document them.
	* version.c (version_string): Remove VERSUFFIX.
	(VERSUFFIX): Remove.
	(pkgversion_string): New.
	(bug_report_url): Do not hard-code initializer.
	* version.h (pkgversion_string): Declare.
	* Makefile.in (PKGVERSION_s, BUGURL_s, PKGVERSION, BUGURL_TEXI):
	Define.
	(version.o): Define PKGVERSION and BUGURL.
	(gcc-vers.texi): Define VERSION_PACKAGE and BUGURL.
	(%.pod): Define BUGURL.
	* gcc.c (process_command, main): Use pkgversion_string.
	* toplev.c (compile_file, print_version): Likewise.
	* protoize.c (main): Likewise.
	* gcov.c (print_version): Likewise.  Update copyright date.
	* gcov-dump.c (print_version): Likewise.  Update copyright date.
	* mips-tdump.c (main): Likewise.  Update copyright date.
	* mips-tfile.c (main): Likewise.  Update copyright date.
	* doc/include/gcc-common.texi: Include VERSION_PACKAGE as subtitle.
	* doc/bugreport.texi: Use BUGURL for bug-reporting instructions;
	shorten description.
	* doc/gcc.texi: Include VERSION_PACKAGE in version description.
	* doc/gccint.texi: Likewise.
	* doc/invoke.texi: Use BUGURL for bug-reporting instructions.
	Update copyright date.

gcc/fortran:
2007-08-21  Paul Brook  <paul@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* gfortranspec.c (lang_specific_driver): Use pkgversion_string.
	* Make-lang.in (gfortran.pod): Define BUGURL.
	* invoke.texi: Use BUGURL for bug-reporting instructions.

gcc/java:
2007-08-21  Paul Brook  <paul@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* jcf-dump.c (version): Use pkgversion_string.  Update copyright
	date.

gcc/treelang:
2007-08-21  Paul Brook  <paul@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* tree1.c (treelang_handle_option): Use pkgversion_string.
	* treelang.texi (which-treelang): Define to use VERSION_PACKAGE.

maintainer-scripts:
2007-08-21  Paul Brook  <paul@codesourcery.com>
	    Nathan Sidwell  <nathan@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* gcc_release: Do not include copies of bugs.html in releases.
	* update_web_docs_svn: Set VERSION_PACKAGE and BUGURL in
	gcc-vers.texi.

Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>

From-SVN: r127667
2007-08-21 16:35:30 +01:00
Nick Clifton 9dcd6f09a3 Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
2007-07-26 08:37:01 +00:00
Tristan Gingold 1a9075e289 gcov.c: Comments updated.
* gcov.c: Comments updated.
	(source_info): Add file_time field.
	(source_index): New variable.
	(mutiple_files): New variable.
	(generate_results): New function extracted from process_file.
	(process_file): Save and restore chain of functions, generate
	results and free structures only if not merging results.
	(release_structures): File names are now freed in create_file_names
	(create_file_names): Free previous file names.
	(find_source): File date is now read here and modifications in
	source files is checked here.
	(read_graph_file): Only reverse order of functions for the current
	object file.
	(make_gcov_file_name): Do not generate long names if input_name is
	NULL.
	(output_lines): If merging results do not display graph, data and 
	runs informations.
	Checking source file modification is done in find_source.

	* doc/gcov.texi: Append an s to sourcefile.

From-SVN: r125649
2007-06-12 15:39:15 +00:00
Nathan Sidwell 80b3502bcb gcov.c (no_data_file): New flag.
* gcov.c (no_data_file): New flag.
	(read_count_file): Set it if data file not present.  Assume counts
	zero if not found.
	(output_lines): Don't name the data file, if there wasn't one.

From-SVN: r116045
2006-08-09 19:09:06 +00:00
Uttam Pawar a14df7dabe re PR rtl-optimization/25739 (Memory leak in bt_load.c(augment_live_range))
2006-03-13  Uttam Pawar  <uttamp@us.ibm.com>

	PR rtl-optimization/25739
	* bt-load.c (augment_live_range): Free tos pointer.

	* gensupport.c (identify_predicable_attribute): Free
	p_false pointer.
	* gcov.c (create_file_names): Free name pointer.

From-SVN: r112039
2006-03-14 00:24:54 +00:00
Marcin Dalecki 5ed6ace578 tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
2006-01-31  Marcin Dalecki  <martin@dalecki.de>

	* tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
	* regrename.c: Ditto.
	* tree-ssa-loop-im.c: Ditto.
	* tree-dump.c: Ditto.
	* tree-complex.c: Ditto.
	* genrecog.c: Ditto.
	* tree-ssa-threadupdate.c: Ditto.
	* tracer.c: Ditto.
	* java/class.c: Ditto.
	* java/jcf-parse.c: Ditto.
	* java/resource.c: Ditto.
	* java/except.c: Ditto.
	* java/jvspec.c: Ditto.
	* java/jcf-write.c: Ditto.
	* java/jcf-path.c: Ditto.
	* java/gjavah.c: Ditto.
	* java/zextract.c: Ditto.
	* java/jcf-io.c: Ditto.
	* java/jcf.h: Ditto.
	* java/buffer.c: Ditto.
	* java/lang.c: Ditto.
	* java/parse-scan.y: Ditto.
	* java/lex.c: Ditto.
	* java/lex.h: Ditto.
	* cfgloopmanip.c: Ditto.
	* postreload-gcse.c: Ditto.
	* tree-ssa-loop-manip.c: Ditto.
	* postreload.c: Ditto.
	* tree-ssa-loop-ch.c: Ditto.
	* loop.c: Ditto.
	* ipa-cp.c: Ditto.
	* cppspec.c: Ditto.
	* diagnostic.c: Ditto.
	* final.c: Ditto.
	* genoutput.c: Ditto.
	* gcc.c: Ditto.
	* cfghooks.c: Ditto.
	* cfgloopanal.c: Ditto.
	* objc/objc-act.c: Ditto.
	* gcov.c: Ditto.
	* genextract.c: Ditto.
	* genautomata.c: Ditto.
	* pretty-print.c: Ditto.
	* genemit.c: Ditto.
	* cgraphunit.c: Ditto.
	* flow.c: Ditto.
	* df-scan.c: Ditto.
	* haifa-sched.c: Ditto.
	* dominance.c: Ditto.
	* dbxout.c: Ditto.
	* tree-ssa-loop-ivopts.c: Ditto.
	* df-core.c: Ditto.
	* mode-switching.c: Ditto.
	* modulo-sched.c: Ditto.
	* graph.c: Ditto.
	* ipa-pure-const.c: Ditto.
	* cse.c: Ditto.
	* fix-header.c: Ditto.
	* web.c: Ditto.
	* tree-stdarg.c: Ditto.
	* ipa-utils.c: Ditto.
	* loop-init.c: Ditto.
	* ipa-inline.c: Ditto.
	* cfganal.c: Ditto.
	* global.c: Ditto.
	* alloc-pool.c: Ditto.
	* dwarf2out.c: Ditto.
	* opts.c: Ditto.
	* genattrtab.c: Ditto.
	* tree-ssa-loop-ivcanon.c: Ditto.
	* predict.c: Ditto.
	* timevar.c: Ditto.
	* lcm.c: Ditto.
	* fortran/gfortranspec.c: Ditto.
	* regmove.c: Ditto.
	* local-alloc.c: Ditto.
	* langhooks.c: Ditto.
	* function.c: Ditto.
	* tree-vectorizer.c: Ditto.
	* gcse.c: Ditto.
	* ipa-type-escape.c: Ditto.
	* alias.c: Ditto.
	* tree-if-conv.c: Ditto.
	* profile.c: Ditto.
	* ipa.c: Ditto.
	* tree-data-ref.c: Ditto.
	* loop-unroll.c: Ditto.
	* treelang/treetree.c: Ditto.
	* calls.c: Ditto.
	* bt-load.c: Ditto.
	* ggc-common.c: Ditto.
	* except.c: Ditto.
	* coverage.c: Ditto.
	* cselib.c: Ditto.
	* tree-cfgcleanup.c: Ditto.
	* tree-ssa-pre.c: Ditto.
	* cfgcleanup.c: Ditto.
	* loop-invariant.c: Ditto.
	* loop-iv.c: Ditto.
	* ipa-prop.c: Ditto.
	* print-tree.c: Ditto.
	* conflict.c: Ditto.
	* ggc-page.c: Ditto.
	* sched-deps.c: Ditto.
	* regclass.c: Ditto.
	* tree-object-size.c: Ditto.
	* combine.c: Ditto.
	* bb-reorder.c: Ditto.
	* resource.c: Ditto.
	* var-tracking.c: Ditto.
	* cfgloop.c: Ditto.
	* df-problems.c: Ditto.
	* reg-stack.c: Ditto.
	* tlink.c: Ditto.
	* gccspec.c: Ditto.
	* sched-rgn.c: Ditto.
	* tree-ssa-structalias.c: Ditto.
	* tree-ssa-reassoc.c: Ditto.
	* config/darwin-c.c: Ditto.
	* config/darwin.c: Ditto.
	* config/arm/arm.c: Ditto.
	* cfgrtl.c: Ditto.
	* collect2.c: Ditto.
	* reload1.c: Ditto.

From-SVN: r110446
2006-01-31 20:56:55 +01:00
Joseph Myers a6d6c2c0e6 gcov.c (print_version), [...]): Update copyright notice dates.
* gcov.c (print_version), gcov-dump.c (print_version),
	mips-tdump.c (main), mips-tfile.c (main): Update copyright notice
	dates.

fortran:
	* gfortranspec.c (lang_specific_driver): Update copyright notice
	date.

java:	* jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
	Update copyright notice dates.

treelang:
	* spec.c (lang_specific_driver): Update copyright notice date.

From-SVN: r110069
2006-01-21 18:22:19 +00:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Jakub Jelinek 4b794eaf73 exgettext: Handle gmsgid and cmsgid arguments specially, as gcc-internal-format and c-format.
gcc/po/
	* exgettext: Handle gmsgid and cmsgid arguments specially,
	as gcc-internal-format and c-format.  Because of xgettext
	bug, invoke xgettext once with --language=c, once with
	--language=GCC-source and then merge together.  Fail if
	xgettext is not 0.14.5 or later.
gcc/
	* intl.h (G_): New macro.
	* rtl-error.c (error_for_asm, warning_for_asm): Use gmsgid
	instead of msgid for argument name.
	* tree-ssa.c (warn_uninit): Likewise.
	* c-parser.c (c_parser_error): Likewise.
	* config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise.
	* config/darwin-c.c (BAD): Likewise.
	* config/c4x/c4x-c.c (BAD): Likewise.
	* c-pragma.c (GCC_BAD, GCC_BAD2): Likewise.
	* c-errors.c (pedwarn_c99, pedwarn_c90): Likewise.
	* c-common.c (c_parse_error): Likewise.
	* diagnostic.c (diagnostic_set_info, verbatim, inform, warning,
	warning0, pedwarn, error, sorry, fatal_error, internal_error):
	Likewise.
	(fnotice): Use cmsgid instead of msgid for argument name.
	* gcov.c (fnotice): Likewise.
	* protoize.c (notice): Likewise.
	* final.c (output_operand_lossage): Likewise.
	* gcc.c (fatal, notice): Likewise.
	(error): Use gmsgid instead of msgid for argument name.
	* collect2.c (notice, fatal_perror, fatal): Use cmsgid instead
	of msgid for argument name.
	(error): Use gmsgid instead of msgid for argument name.
	* c-decl.c (locate_old_decl, implicit_decl_warning): Use G_()
	instead of N_().
	* c-typeck.c (readonly_error, convert_for_assignment): Likewise.
	* tree-inline.c (inline_forbidden_p_1): Likewise.
	* ABOUT-GCC-NLS: Require gettext 0.14.5 or later.  Mention the new
	conventions for marking translations.
	* doc/install.texi: Mention gettext 0.14.5 or later requirement.
gcc/cp/
	* error.c (locate_error): Use gmsgid instead of msgid for argument
	name.
	(cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
gcc/java/
	* jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
	msgid for argument name.
	* gjavah.c (error): Likewise.
	* java-tree.h (parse_error_context): Likewise.
	* parse.y (parse_error_context, parse_warning_context,
	issue_warning_error_from_context): Likewise.

From-SVN: r100676
2005-06-06 21:31:40 +02:00
Kaveh R. Ghazi 2653bb0c12 collect2.c, [...]: Replace calls to `unlock_stream' with `unlock_std_streams'.
* collect2.c, gcc.c, gcov-dump.c, gcov.c, gen-protos.c,
	gensupport.c, protoize.c, toplev.c: Replace calls to
	`unlock_stream' with `unlock_std_streams'.

java:
	* gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
	to `unlock_stream' with `unlock_std_streams'.

From-SVN: r98753
2005-04-26 00:24:02 +00:00
Kaveh R. Ghazi 98a3dad411 collect2.c (main): Unlock the stdio streams.
* collect2.c (main): Unlock the stdio streams.
	* gcc.c (main): Likewise.
	* gcov-dump.c (main): Likewise.
	* gcov.c (main): Likewise.
	* gen-protos.c (main): Likewise.
	* gensupport.c (init_md_reader_args_cb): Likewise.
	* protoize.c (main): Likewise.
	* toplev.c (general_init): Likewise.

java:
	* gjavah.c (main): Unlock the stdio streams.
	* jcf-dump.c (main): Likewise.
	* jv-scan.c (main): Likewise.
	* jvgenmain.c (main): Likewise.

From-SVN: r98676
2005-04-24 22:11:55 +00:00
Kazu Hirata 5f99662735 builtin-types.def, [...]: Update copyright.
* builtin-types.def, c-convert.c, c-format.c, ddg.c, debug.c,
	debug.h, et-forest.c, et-forest.h, gcov.c, rtl-profile.c,
	rtlhooks-def.h, rtlhooks.c, sdbout.c, tree-inline.h,
	tree-profile.c, tsystem.h, value-prof.h: Update copyright.

From-SVN: r97209
2005-03-29 22:15:53 +00:00
Nathan Sidwell f5d39c3d74 re PR other/20564 (gcov default behaviour changed)
PR other/20564
	* gcov.c (output_lines): Only output function block summary when
	outputting branch information.
	* doc/gcov.texi: Document format of preamble and additional block
	information lines.

From-SVN: r96788
2005-03-21 12:31:10 +00:00
Joseph Myers 9e637a2679 builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate.
* builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h,
	c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c,
	gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c,
	tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
	config/avr/avr.c, config/c4x/c4x.c, config/darwin.c,
	config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c,
	config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c,
	config/iq2000/iq2000.c, config/m32r/m32r.c,
	config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h,
	config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c,
	config/ns32k/ns32k.c, config/rs6000/host-darwin.c,
	config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
	config/sh/symbian.c, config/stormy16/stormy16.c,
	config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %<
	and %> as appropriate.  Use %' as apostrophe in diagnostics where
	applicable.  Use %< and %> in place of '' quotes where applicable.
	Use %qs in place of %<%s%>.  Consistently quote __builtin function
	names.

ada:
	* misc.c (gnat_handle_option): Use %< and %> for quoting in
	warning message.

cp:
	* call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
	pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
	quoting in diagnostics.
	* parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
	quoting in printf format.
	* decl.c (duplicate_decls, start_decl): Use %qD instead of
	unquoted %D.

objc:
	* objc-act.c: Use %q, %< and %> for quoting in diagnostics.

testsuite:
	* gcc.dg/builtin-prefetch-1.c: Adjust expected messages.

From-SVN: r90337
2004-11-09 10:13:30 +00:00
Nathan Sidwell e044819338 gcov-io.c (GCOV_CHECK): Use gcc_assert when available.
* gcov-io.c (GCOV_CHECK): Use gcc_assert when available.
	* gcov.c (abort): Remove undef.

From-SVN: r86781
2004-08-30 15:52:09 +00:00
Nathan Sidwell b3d1f5b404 Makefile.in (BUILD_ERRORS): Set to build-errors.
* Makefile.in (BUILD_ERRORS): Set to build-errors.
	(errors.o): New target for host.
	(build-errors.o): New target for build.
	(genobjs): Replace errors.o with build-errors.
	(gengenrtl$(buildexeext)): Add $(BUILD_ERRORS).
	(GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o.
	(fix-headers$(build_exeext)): Add $(BUILD_ERRORS).
	(fix-header.o): Add errors.h
	* collect2.c (fancy_abort): Add parameters.
	* collect2.h (fancy_abort): Don't declare.
	* errors.h (fancy_abort): Don't declare.
	* errors.c: Include either bconfig.h or config.h.
	(fancy_abort): Trim filename.
	* fix-header.c (v_fatal, fatal): Remove.
	(progname): Remove definition.
	(main): Set progname here.
	* gcc.c (fancy_abort): Add parameters.
	* gcc.h (fancy_abort): Remove declaration.
	* gcov.c (fancy_abort): Remove.
	* rtl.h (fancy_abort): Don't declare.
	(abort): Don't define.
	* tree.h (fancy_abort): Don't declare.
	(abort): Don't define.
	* system.h (fancy_abort): Declare.
	(abort): Define to fancy_abort.
	* fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o
	* java/jv-scan.c (fancy_abort): Add.

From-SVN: r86424
2004-08-23 11:57:02 +00:00
Nathan Sidwell 00cf2913f8 gcov-io.h: Allow zero tag as EOF indicator.
* gcov-io.h: Allow zero tag as EOF indicator.
	(gcov_is_eof): Remove.
	(gcov_truncate): Remove.
	* gcov-io.c (gcov_seek): Always SEEK_SET.
	* libgcov.c (gcov_exit): Don't use gcov_truncate.  Write explicit
	EOF tag.
	* coverage.c (read_counts_file): Don't use gcov_is_eof.
	* gcov-dump.c (dump_file): Likewise.
	* gcov.c (read_graph_file, read_count_file): Likewise.

From-SVN: r85291
2004-07-29 08:58:59 +00:00
Richard Sandiford 1457ebf925 * gcov.c (function_summary): Add missing \n.
From-SVN: r85258
2004-07-28 09:57:38 +00:00
Kazu Hirata 61ada8ae18 c-typeck.c, [...]: Fix comment typos.
* c-typeck.c, cfgexpand.c, ddg.c, ddg.h, df.c, fold-const.c,
	gcov.c, gimplify.c, modulo-sched.c, passes.c, tree-cfg.c,
	tree-mudflap.c, tree-nrv.c, tree-outof-ssa.c, tree-ssa-dom.c,
	tree-ssa-dse.c, tree-ssa-operands.c, tree-ssa-pre.c,
	tree-tailcall.c: Fix comment typos.  Follow spelling
	conventions.

From-SVN: r83703
2004-06-26 05:03:55 +00:00
Kazu Hirata 9f76f909c9 gcc.c (process_command): Allow translation of the copyright symbol but not the rest of the copyright message.
gcc/
	* gcc.c (process_command): Allow translation of the copyright
	symbol but not the rest of the copyright message.
	* gcov.c (print_version): Likewise.  Allow translation of the
	message about warranty.

gcc/f/
	* Make-lang.in (g77spec.o): Depend on intl.h.
	* g77spec.c: Include intl.h.
	(lang_specific_driver): Allow translation of the copyright
	symbol but not the rest of the copyright message.  Allow
	translation of the message about warranty.

From-SVN: r78152
2004-02-20 06:46:42 +00:00
Kazu Hirata 6614fd40d2 alias.c: Fix comment formatting.
* alias.c: Fix comment formatting.
	* alloc-pool.c: Likewise.
	* bitmap.c: Likewise.
	* bitmap.h: Likewise.
	* bt-load.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-decl.c: Likewise.
	* c-opts.c: Likewise.
	* c-pretty-print.c: Likewise.
	* caller-save.c: Likewise.
	* cfghooks.h: Likewise.
	* cgraph.c: Likewise.
	* collect2.c: Likewise.
	* cppfiles.c: Likewise.
	* cpplib.h: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* final.c: Likewise.
	* function.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genemit.c: Likewise.
	* ggc.h: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* libgcc2.h: Likewise.
	* loop.c: Likewise.
	* predict.h: Likewise.
	* unwind-libunwind.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r74907
2003-12-21 14:08:35 +00:00
Zdenek Dvorak 3d7ca1673b gcov.c (typedef struct arc_info): New field cs_count.
* gcov.c (typedef struct arc_info): New field cs_count.
	(accumulate_line_counts): Find cycles correctly.

	* gcc.misc-tests/gcov-10b.c: New test.

From-SVN: r70859
2003-08-27 21:13:17 +00:00
Kazu Hirata beb235f896 c-decl.c: Fix comment formatting.
* c-decl.c: Fix comment formatting.
	* cfgrtl.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* dominance.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* expmed.c: Likewise.
	* fold-const.c: Likewise.
	* gcov.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-common.c: Likewise.
	* mips-tfile.c: Likewise.
	* regmove.c: Likewise.

From-SVN: r70677
2003-08-22 06:45:14 +00:00
Kaveh R. Ghazi 703ad42b4b alias.c [...]: Remove unnecessary casts.
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c
	c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
	c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
	collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
	cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
	cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
	dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
	fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
	gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
	genemit.c genextract.c genoutput.c genrecog.c gensupport.c
	ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
	integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
	loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
	postreload.c prefix.c print-tree.c protoize.c ra-build.c
	ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
	regmove.c regrename.c reload.c reload1.c reorg.c resource.c
	sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
	simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
	tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
	varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
	casts.

From-SVN: r69587
2003-07-19 14:47:15 +00:00
Nathan Sidwell 330d2e2ade gcov-io.h: Update documentation.
* gcov-io.h: Update documentation.
	(GCOV_UNSIGNED2STRING): New.
	(GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH,
	GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH,
	GCOV_TAG_SUMMARY_LENGTH): Adjust.
	(GCOV_TAG_BLOCKS_NUM, GCOV_TAG_ARCS_NUM,
	GCOV_TAG_COUNTER_NUM): New.
	(GCOV_BLOCK_SIZE): Number of words.
	(gcov_var): Adjust buffer type.
	* gcov-io.c (gcov_write_bytes, gcov_read_bytes): Rename to ...
	(gcov_write_words, gcov_read_words): ... here. Take a 4-byte word
	count, not byte count.
	(gcov_open): Adjust overread init.
	(gcov_allocate, gcov_write_unsigned, gcov_write_counter,
	gcov_write_string, gcov_write_tag, gcov_write_length,
	gcov_write_tag_length): Adjust.
	(gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust.
	(gcov_sync, gcov_seek): Adjust.
	* gcov-dump.c (print_usage): Show gcc version only.
	(dump_file): Use GCOV_UNSIGNED2STRING.
	(tag_blocks, tag_arcs, tag_counters): Use GCOV_TAG_*_NUM macros.
	* gcov.c (print_version): Show gcc version only.
	(read_graph_file): Use GCOV_UNSIGNED2STRING. Use
	GCOV_TAG_*_NUM macros.
	(read_count_file): Use GCOV_UNSIGNED2STRING. Use
	GCOV_TAG_COUNTER_LENGTH.
	* coverage.c (read_counts_file): Use GCOV_UNSIGNED2STRING.
	Use GCOV_TAG_COUNTER_NUM.
	* libgcov.c (gcov_version): Use GCOV_UNSIGNED2STRING.
	(__gcov_merge_single, __gcov_merge_delta): Use GCOV_CHECK.

From-SVN: r69188
2003-07-10 14:13:01 +00:00
Nathan Sidwell 160e2e4f23 gcov-io.h: Update documentation.
* gcov-io.h: Update documentation.
	(GCOV_GRAPH_SUFFIX, GCOV_GRAPH_MAGIC): Rename to GCOV_NOTE_SUFFIX,
	GCOV_NOTE_MAGIC.
	(GCOV_DATA_SUFFIX, GCOV_NOTE_SUFFIX): Update.
	(GCOV_DATA_MAGIC, GCOV_NOTE_MAGIC): Make non-palindromic.
	(struct gcov_var): Change buffer's type. Add endian flag.
	(gcov_open): Remove mode in libgcov.
	(gcov_magic): Prototype.
	* gcov-io.c (from_file): New.
	(gcov_open): Clear endian flag.
	(gcov_magic): New.
	(gcov_write_bytes, gcov_read_bytes): Return gcov_unsigned_t
	pointers.
	(gcov_write_unsigned, gcov_write_counter, gcov_write_string,
	gcov_write_tag, gcov_write_length, gcov_write_tag_length): Update.
	(gcov_read_unsigned, gcov_read_counter, gcov_read_string): Update.
	* gcov-iov.c (main): Correct cast.
	* coverage.c (read_counts_file): Use gcov_magic. Remove endianness
	conversion.
	(gcov_begin_output): Use GCOV_NOTE_MAGIC.
	(coverage_init): Use GCOV_NOTE_SUFFIX.
	* libgcov.c (gcov_version_mismatch): Remove endianness conversion.
	Rename to gcov_version, and return flag.
	(gcov_exit): Use gcov_version.
	(__gcov_init): Use gcov_version.
	* Makefile.in (coverageexts): Update.
	* gcov.c (print_version): Remove endianness conversion.
	(create_file_names): Use GCOV_NOTE_SUFFIX.
	(read_graph_file): Use gcov_magic.
	(read_count_file): Likewise.
	* gcov-dump.c (dump_file): Remove endianness conversion, use
	gcov_magic.

From-SVN: r69137
2003-07-09 12:12:29 +00:00
Andreas Jaeger f55ade6e34 basic-block.h: Convert prototypes to ISO C90.
* basic-block.h: Convert prototypes to ISO C90.
	* c-parse.in: Likewise.
	* c-pragma.h: Likewise.
	* c-typeck.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloopanal.c: Likewise.
	* dbxout.h: Likewise.
	* debug.h: Likewise.
	* dwarf2asm.h: Likewise.
	* gcov.c: Likewise.
	* gengtype-lex.l: Likewise.
	* sched-int.h: Likewise.
	* timevar.c: Likewise.

From-SVN: r69010
2003-07-06 20:59:38 +02:00
Nathan Sidwell dd486eb27c gcov-io.h: Add a local time stamp.
* gcov-io.h: Add a local time stamp.
	(struct gcov_info): Add stamp field.
	(gcov_truncate): New.
	* coverage.c (read_counts_file): Skip the stamp.
	(coverage_begin_output): Write the stamp.
	(build_gcov_info): Declare and init the stamp.
	(coverage_finish): Only unlink data file, if stamp is zero.
	* gcov-dump.c (dump_file): Dump the stamp.
	* gcov.c (bbg_stamp): New.
	(release_structures): Clear bbg_stamp.
	(read_graph_file): Read stamp.
	(read_count_file): Check stamp.
	* libgcov.c (gcov_exit): Check stamp and truncate if needed.

From-SVN: r69006
2003-07-06 14:51:48 +00:00
Kazu Hirata e0bb17a83f basic-block.h: Fix comment typos.
* basic-block.h: Fix comment typos.
	* bb-reorder.c: Likewise.
	* c-format.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* dbxout.c: Likewise.
	* df.c: Likewise.
	* df.h: Likewise.
	* diagnostic.c: Likewise.
	* dwarf2out.c: Likewise.
	* et-forest.h: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.h: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genautomata.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* loop.c: Likewise.
	* mips-tfile.c: Likewise.
	* optabs.c: Likewise.
	* ra-build.c: Likewise.
	* ra-colorize.c: Likewise.
	* ra-rewrite.c: Likewise.
	* ra.h: Likewise.
	* regmove.c: Likewise.
	* reload.c: Likewise.
	* rtlanal.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-int.h: Likewise.
	* sched-vis.c: Likewise.
	* sreal.c: Likewise.
	* ssa-ccp.c: Likewise.
	* ssa.c: Likewise.
	* toplev.c: Likewise.
	* tree-inline.c: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.

From-SVN: r68770
2003-07-01 12:18:01 +00:00
Kazu Hirata f9da506452 alloc-pool.c: Fix comment formatting.
* alloc-pool.c: Fix comment formatting.
	* bitmap.c: Likewise.
	* bitmap.h: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* cfganal.c: Likewise.
	* cfgrtl.c: Likewise.
	* collect2.c: Likewise.
	* cse.c: Likewise.
	* df.c: Likewise.
	* diagnostic.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* expmed.c: Likewise.
	* final.c: Likewise.
	* flags.h: Likewise.
	* fold-const.c: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* libgcov.c: Likewise.
	* mips-tfile.c: Likewise.
	* optabs.c: Likewise.
	* prefix.c: Likewise.
	* rtlanal.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* toplev.c: Likewise.
	* varasm.c: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r68672
2003-06-29 13:53:12 +00:00
Kazu Hirata 71c0e7fc96 basic-block.h: Fix comment formatting.
* basic-block.h: Fix comment formatting.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-format.c: Likewise.
	* coverage.c: Likewise.
	* cpplib.h: Likewise.
	* cpppch.c: Likewise.
	* dbxout.c: Likewise.
	* diagnostic.c: Likewise.
	* dwarf2out.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcc.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* profile.c: Likewise.
	* real.h: Likewise.
	* sched-deps.c: Likewise.

From-SVN: r68369
2003-06-23 15:27:37 +00:00
Kazu Hirata 6356f89288 ChangeLog: Follow spelling conventions.
* ChangeLog: Follow spelling conventions.
	* ChangeLog.2: Likewise.
	* c-decl.c: Likewise.
	* cfgloop.h: Likewise.
	* cgraph.c: Likewise.
	* coverage.c: Likewise.
	* cppcharset.c: Likewise.
	* cpphash.h: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* dbxout.c: Likewise.
	* df.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* explow.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gengtype.c: Likewise.
	* ggc.h: Likewise.
	* opts.c: Likewise.
	* real.c: Likewise.
	* reload.c: Likewise.
	* stmt.c: Likewise.

From-SVN: r67849
2003-06-12 19:01:08 +00:00
Roger Sayle d90f988266 re PR bootstrap/10169 (Bootstrap fails on mainline with Tru64 5.1B)
PR bootstrap/10169
	* mips-tfile.c (main): Use getopt_long instead of getopt.
	Add new command line option --version to display version.
	Treat --verbose like -v to report a single line version.
	(options): New global variable for getopt_long.
	* mips-tdump.c (main): Use getopt_long instead of getopt.
	New command line options -v, --version and -verbose to display
	the program version number (to match mips-tfile's behavior).
	(options): New global variable for getopt_long.

	* gcov.c (options): Zero-terminate getopt_long array.
	* gcov-dump.c (options): Likewise.

	* Makefile.in (mips-tdump.o): Add dependency on version.h.

Co-Authored-By: Kaveh R. Ghazi <ghazi@caip.rutgers.edu>

From-SVN: r67230
2003-05-29 21:33:35 +00:00
Kaveh R. Ghazi e34d07f255 builtins.c (validate_arglist): Eliminate libiberty VA_ macros, always use stdarg.
gcc:
	* builtins.c (validate_arglist): Eliminate libiberty VA_ macros,
	always use stdarg.
	* c-errors.c (pedwarn_c99): Likewise.
	* c-format.c (status_warning): Likewise.
	* c-semantics.c (build_stmt): Likewise.
	* calls.c (emit_library_call, emit_library_call_value): Likewise.
	* collect2.c (notice, fatal_perror, fatal, error): Likewise.
	* cpperror.c (cpp_error, cpp_error_with_line): Likewise.
	* diagnostic.c (build_message_string, output_printf,
	output_verbatim, verbatim, inform, warning, pedwarn, error, sorry,
	fatal_error, internal_error, warning_with_decl, pedwarn_with_decl,
	error_with_decl, fnotice): Likewise.
	* dwarf2asm.c (dw2_asm_output_data, dw2_asm_output_delta,
	dw2_asm_output_offset, dw2_asm_output_pcrel, dw2_asm_output_addr,
	dw2_asm_output_addr_rtx, dw2_asm_output_nstring,
	dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128,
	dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
	dw2_asm_output_encoded_addr_rtx): Likewise.
	* emit-rtl.c (gen_rtx, gen_rtvec): Likewise.
	* errors.c (warning, error, fatal, internal_error): Likewise.
	* final.c (output_operand_lossage, asm_fprintf): Likewise.
	* fix-header.c (fatal): Likewise.
	* gcc.c (fatal, error, notice): Likewise.
	* gcov.c (fnotice): Likewise.
	* genattrtab.c (attr_rtx, attr_printf): Likewise.
	* gengtype.c (error_at_line, xasprintf, oprintf): Likewise.
	* gensupport.c (message_with_line): Likewise.
	* mips-tfile.c (fatal, error): Likewise.
	* protoize.c (notice): Likewise.
	* ra-debug.c (ra_debug_msg): Likewise.
	* read-rtl.c (fatal_with_file_and_line): Likewise.
	* rtl-error.c (error_for_asm, warning_for_asm): Likewise.
	* tree.c (build, build_nt, build_function_type_list): Likewise.

cp:
	* error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
	libiberty VA_ macros, always use stdarg.
	* rtti.c (create_pseudo_type_info): Likewise.
	* tree.c (build_min_nt, build_min): Likewise.

From-SVN: r66919
2003-05-17 22:21:35 +00:00
Nathan Sidwell 7d63a2fae0 gcov-io.h (gcov_write_bytes, [...]): Remove here.
* gcov-io.h (gcov_write_bytes, gcov_read_bytes): Remove here.
	(GCOV_TAG_*) Force type to gcov_unsigned_t.
	(GCOV_CHECK, GCOV_CHECK_READING, GCOV_CHECK_WRITING): New.
	(struct gcov_var): Remove modified. Add start, length, offset,
	overread. Have buffer array for libgcov.
	(gcov_sync, gcov_seek): Definitions moved to gcov-io.c.
	(gcov_position, gcov_rewrite, gcov_is_eof): Adjust.
	* gcov-io.c (gcov_open): Set mode, do not read anything.
	(gcov_close): Write final block.
	 (gcov_write_block, gcov_allocate): New.
	(gcov_write_bytes): Make static. Write or allocate buffer.
	(gcov_write_unsigned, gcov_write_counter): Buffer can never be
	null.
	(gcov_write_string): Adjust.
	(gcov_write_tag)
	(gcov_write_length): Adjust. Flush the block.
	(gcov_write_tag_length): Buffer can never be null.
	(gcov_read_bytes): Make static. Read in block.
	(gcov_sync): Moved here. Adjust.
	(gcov_seek): Moved here. Adjust.
	* coverage.c (read_counts_file): Adjust.
	* gcov-dump.c (print_prefix): Add position parameter.
	(flag_dump_positions): New flag.
	(options, main, print_usage): Add it.
	(dump_file, tag_blocks, tag_arcs, tag_lines, tag_counters,
	tag_summary): Adjust.
	* gcov.c (read_graph_file, read_count_file): Adjust.
	* libgcov.c (gcov_exit): Adjust.

From-SVN: r66805
2003-05-14 16:01:20 +00:00
Nathan Sidwell 474f141e8d gcov-io.h (GCOV_LOCKED): New #define.
* gcov-io.h (GCOV_LOCKED): New #define.
	(GCOV_LINKAGE): Make sure it is #defined.
	(gcov_write_string, gcov_write_tag, gcov_write_length,
	gcov_read_string, gcov_time): Poison in libgcov.
	(gcov_seek_end): Remove.
	(gcov_write_tag_length, gcov_sync, gcov_rewrite): New.
	(GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH,
	GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH,
	GCOV_TAG_SUMMARY_LENGTH): New #defines.
	(gcov_write_tag, gcov_write_length): Not in libgcov.
	* gcov-io.c (gcov_open): Use GCOV_LOCKED.
	(gcov_write_tag, gcov_write_length): Not in libgcov.
	(gcov_write_tag_length): New.
	(gcov_write_summary): Use gcov_write_tag_length.
	* libgcov.c: Always #include gcov-io.h.
	(IN_LIBGCOV): -1 for inhibit_libc, +1 otherwise.
	(GCOV_LINKAGE): Define to nothing for L_gcov.
	(gcov_exit): Replace gcov_write_tag, gcov_write_length with
	gcov_write_tag_length. Use gcov_rewrite & gcov_seek.
	* gcov.c (read_graph_file): Replace gcov_seek by gcov_sync.
	(read_count_file): Likewise.
	* gcov-dump.c (dump_file): Likewise.
	* coverag.c (read_counts_file): Likewise.

From-SVN: r66555
2003-05-07 10:40:09 +00:00
Nathan Sidwell 796621e8c2 New GCOV_TAG_FUNCTION layout
New GCOV_TAG_FUNCTION layout
	* coverage.c (struct function_list): Replace name with ident.
	(struct counts_entry): Likewise.
	(fn_ident): New.
	(htab_counts_entry_hash, htab_counts_entry_eq,
	htab_counts_entry_del): Adjust.
	(reads_count_file, get_coverage_counts,
	coverage_begin_output, coverage_end_function): Adjust.
	(build_fn_info_type, build_fn_info_value): Likewise.
	* gcov-dump.c (tag_function): Adjust.
	* gcov-io.c (gcov_write_string, gcov_read_string): Not in LIBGCOV.
	* gcov-io.h (gcov_write_string, gcov_read_string): Not in LIBGCOV.
	* gcov.c (struct function_info): Add ident.
	(read_graph_file, read_count_file): Adjust.
	* libgcov.c (gcov_exit): Adjust.

From-SVN: r66035
2003-04-24 09:46:17 +00:00
Nathan Sidwell cdb2376773 Makefile.in (LIBGCC_DEPS): Add gcov headers.
* Makefile.in (LIBGCC_DEPS): Add gcov headers.
	(libgcov.a): Depends on LIBGCC_DEPS.
	* basic-block.h (profile_info): Moved here from coverage.h. Made
	a pointer.
	* coverage.c (struct function_list): Fixed array of counter types.
	(struct counts_entry): Keyed by counter type, contains summary.
	(profile_info): Moved to profile.c.
	(prg_ctr_mask, prg_n_ctrs, fn_ctr_mask, fn_n_ctrs): New global
	vars.
	(profiler_label): Remove.
	(ctr_labels): New.
	(set_purpose, label_for_tag, build_counter_section_fields,
	build_counter_section_value, build_counter_section_data_fields,
	build_counter_section_data_values, build_function_info_fields,
	build_function_info_value, gcov_info_fields, gcov_info_value): Remove.
	(build_fn_info_type, build_fn_info_value, build_ctr_info_type,
	build_ctr_info_value, build_gcov_info): New.
	(htab_counts_entry_hash, htab_counts_entry_eq): Adjust.
	(reads_counts_file): Adjust.
	(get_coverage_counts): Takes counter number. Add summary
	parameter. Adjust.
	(coverage_counter_ref): Tkaes counter number. Adjust. Lazily
	create counter array labels.
	(coverage_end_function): Adjust.
	(create_coverage): Adjust.
	(find_counters_section): Remove.
	* coverage.h (MAX_COUNTER_SECTIONS): Remove.
	(struct section_info, struct profile_info): Remove.
	(profile_info): Moved to basic-block.h.
	(coverage_counter_ref): Takes a counter number.
	(get_coverage_counts): Takes a counter number. Added summary
	parameter.
	(find_counters_section): Remove.
	* gcov-dump.c (tag_arc_counts): Rename to ...
	(tag_counters): ... here. Adjust.
	(tag_table): Move tag_counters to 3rd entry. Remove
	PROGRAM_PLACEHOLDER and PROGRAM_INCORRECT entries.
	(dump_file): Check for counter tag values here.
	(tag_summary): Adjust.
	* gcov-io.c (gcov_write_summary, gcov_read_summary): Adjust.
	* gcov-io.h (GCOV_LOCKED): New.
	(GCOV_TAG_ARC_COUNTS): Rename to ...
	(GCOV_TAG_COUNTS_BASE): ... here.
	(GCOV_TAG_PLACEHOLDER_SUMMARY, GCOV_TAG_INCORRECT_SUMMARY):
	Remove.
	(GCOV_COUNTER_ARCS, GCOV_COUNTERS, GCOV_NAMES): New.
	(GCOV_TAG_FOR_COUNTER, GCOV_COUNTER_FOR_TAG,
	GCOV_TAG_IS_COUNTER): New.
	(struct gcov_ctr_summary): New.
	(struct gcov_summary): Adjust.
	(struct gcov_counter_section): Remove.
	struct gcov_counter_section_data): Remove.
	(struct gcov_function_info): Rename to ...
	(struct gcov_fn_info): ... here. Adjust.
	(struct gcov_ctr_info): New.
	(struct gcov_info): Adjust.
	* gcov.c (read_count_file): Adjust.
	(output_lines): Adjust.
	* libgcov.c (gcov_exit): Adjust.
	(__gcov_flush): Adjust.
	* mklibgcc.in (libgcc2_c_dep): Add gcov headers.
	* predict.c (maybe_hot_bb_p, probably_cold_bb_p,
	probably_never_executed_bb_p, compute_frequency_function): Adjust
	profile_info use.
	* profile.c (struct counts_entry): Remove.
	(profile_info): Define here.
	(get_exec_counts): Adjust get_coverage_counts call.
	(compute_branch_probablilities): Remove find_counters_section
	call.
	(gen_edge_profiler): Adjust coverage_counter_ref call.
	* tracer.c (tail_duplicate): Adjust profile_info use.

From-SVN: r65990
2003-04-23 14:05:11 +00:00
Nathan Sidwell d79f9ec9ff commit two parts of my last patch that escaped, somehow
From-SVN: r65906
2003-04-21 21:23:43 +00:00
Nathan Sidwell 299f79b5a0 cpplex.c (_cpp_lex_direct): Set BOL for CPP_EOF tokens.
.:	* cpplex.c (_cpp_lex_direct): Set BOL for CPP_EOF tokens.
	* gcov.c (output_lines): Don't be so fussy about going past EOF.
cp:
	* cp/decl2.c (start_static_storage_duration_function): Take count
	arg, don't check if it wraps round.
	(generate_ctor_or_dtor_function): Add locus arg, use it.
	(generate_ctor_and_dtor_functions_for_priority): Data arg is a
	locus.
	(finish_file): Set line numbers to past EOF for synthesized
	functions.

From-SVN: r65847
2003-04-20 11:57:38 +00:00
Nathan Sidwell 94de45d9fe Makefile.in (loop-init.o): Do not depend on gcov-io.h, gcov-iov.h.
* Makefile.in (loop-init.o): Do not depend on gcov-io.h,
	gcov-iov.h.

	Simplify interface to gcov reading and writing.
	* gcov-io.h (gcov_file, gcov_position, gcov_length, gcov_buffer,
	gcov_alloc, gcov_modified, gcov_errored): Move into ...
	(struct gcov_var gcov_var): ... this static structure.
	(gcov_write_unsigned, gcov_write_counter, gcov_write_string):
	Return void.
	(gcov_read_unsigned, gcov_read_couter, gcov_read_string): Return
	read object.
	(gcov_read_bytes, gcov_write_bytes): Set error flag on error.
	(gcov_reserve_length): Remove.
	(gcov_write_tag): New.
	(gcov_write_length): Adjust.
	(gcov_read_summary, gcov_write_summary): Adjust.
	(gcov_eof, gcov_ok): Rename to ...
	(gcov_is_eof, gcov_is_error): ... here. Return error code.
	(gcov_save_position, gcov_resync): Rename to ...
	(gcov_position, gcov_seek): ... here.
	(gcov_skip, gcov_skip_string): Remove.
	(gcov_error): Remove.
	(gcov_open, gcov_close): Adjust.
	* gcov.c (find_source): Take const char *, copy it on allocation.
	(read_graph_file): Adjust.
	(read_count_file): Adjust.
	* libgcov.c (gcov_exit): Adjust.
	* gcov-dump.c (tag_function, tag_blocks, tag_arcs, tag_lines,
	tag_arc_counts, tag_summary): Return void. Adjust.
	(struct tag_format): Adjust proc member.
	(dump_file): Adjust gcov calls.

From-SVN: r65464
2003-04-11 10:38:57 +00:00
Nathan Sidwell 546d2adb91 Change gcov file interface to single file at a time.
* gcov-io.h: Replace IN_LIBGCC1 with IN_LIBGCOV. Use IN_GCOV.
	Convert to C89 prototypes.
	(gcov_file, gcov_length, gcov_position, gcov_buffer, gcov_alloc,
	gcov_error, gcov_modified): New static variables.
	(gcov_open, gcov_close, gcov_read_bytes, gcov_write_bytes): New
	functions.
	(gcov_write_unsigned, gcov_write_counter, gcov_write_string,
	gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust.
	(gcov_read_summary, gcov_write_summary): Adjust.
	(gcov_save_position, gcov_reserve_length, gcov_write_length):
	Adjust.
	(gcov_resync, gcov_skip, gcov_skip_string): Adjust.
	(da_file_open, da_file_close, da_file_eof, da_file_error): Remove.
	(da_file_position, da_file_seek, da_file_write, da_file_read):
	Remove.
	(gcov_error, gcov_eof, gcov_ok, gcov_time): New functions.
	* gcov.c (gcov_type): Don't typedef here.
	(IN_GCOV): #define
	(read_graph_file, read_count_file): Adjust.
	* gcov-dump.c (gcov_type): Don't typedef here.
	(IN_GCOV): #define.
	(tag_function, tag_blocks, tag_arcs, tag_lines, tag_arc_counts):
	Remove FILE parameter, adjust.
	(struct tag_format): Adjust proc member.
	(dump_file): Adjust.
	* libgcov.c (IN_LIBGCOV): #define.
	(gcov_exit): Adjust.
	* loop-init.c: Don't #include gcov-io.h
	* profile.c (struct counts_entry): New structure to hold counter
	values.
	(struct section_reference, struct da_index_entry): Remove.
	(bbg_file, da_file): Remove.
	(htab_counts_index_hash, htab_counts_index_eq,
	htab_counts_index_del): Replace with ...
	(htab_counts_entry_hash, htab_counts_entry_eq,
	htab_counts_entry_del): ... these.
	(cleanup_counts_index, index_counts_file): Remove.
	(read_counts_file): New function.
	(get_exec_counts): Adjust.
	(compute_branch_probabilities): Don't free the exec counts here.
	(branch_prob): Adjust.
	(init_branch_prob): Adjust.
	(end_branch_prob): Adjust.

From-SVN: r65338
2003-04-07 19:37:12 +00:00
Nathan Sidwell 10b7602f3f gcov.c (struct arc_info): Replace local_span with cycle.
.	* gcov.c (struct arc_info): Replace local_span with cycle.
	(struct block_info): Replace u.span with u.cycle. Add is_call_return.
	(solve_flow_graph): Set is_call_return.
	(add_line_counts): Adjust. In block mode, blocks attach to last line.
	(accumulate_line_counts): Find graph cycles, not spanning tree.
	(output_branch_count): Adjust.
	(output_lines): Adjust.
	* doc/gcov.texi: Update.
testsuite:
	* gcc.misc-test/gcov-9.c: New test.
	* gcc.misc-test/gcov-10.c: New test
	* gcc.misc-test/gcov-11.c: New test.

From-SVN: r65299
2003-04-06 13:18:41 +00:00
Nathan Sidwell 1a48288100 * gcov.c (accumulate_line_counts): Fix span tree merge bug.
From-SVN: r65245
2003-04-04 15:48:19 +00:00