gcc/gcc/doc/gcc.texi

212 lines
6.6 KiB
Plaintext
Raw Normal View History

\input texinfo @c -*-texinfo-*-
1997-08-11 17:56:58 +02:00
@c %**start of header
@setfilename gcc.info
@c INTERNALS is used by md.texi to determine whether to include the
@c whole of that file, in the internals manual, or only the part
@c dealing with constraints, in the user manual.
@clear INTERNALS
1997-08-11 17:56:58 +02:00
@c NOTE: checks/things to do:
@c
@c -have bob do a search in all seven files for "mew" (ideally --mew,
@c but i may have forgotten the occasional "--"..).
1997-08-11 17:56:58 +02:00
@c Just checked... all have `--'! Bob 22Jul96
@c Use this to search: grep -n '\-\-mew' *.texi
@c -item/itemx, text after all (sub/sub)section titles, etc..
@c -consider putting the lists of options on pp 17--> etc in columns or
@c some such.
@c -overfulls. do a search for "mew" in the files, and you will see
@c overfulls that i noted but could not deal with.
@c -have to add text: beginning of chapter 8
@c
@c anything else? --mew 10feb93
@include gcc-common.texi
1997-08-11 17:56:58 +02:00
@settitle Using the GNU Compiler Collection (GCC)
1997-08-11 17:56:58 +02:00
@c Create a separate index for command line options.
@defcodeindex op
@c Merge the standard indexes into a single one.
1997-08-11 17:56:58 +02:00
@syncodeindex fn cp
@syncodeindex vr cp
@syncodeindex ky cp
@syncodeindex pg cp
@syncodeindex tp cp
@paragraphindent 1
1997-08-11 17:56:58 +02:00
@c %**end of header
1997-08-11 17:56:58 +02:00
@copying
Copyright @copyright{} 1988-2017 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
1997-08-11 17:56:58 +02:00
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.
@end copying
@ifnottex
@dircategory Software development
@direntry
* gcc: (gcc). The GNU Compiler Collection.
* g++: (gcc). The GNU C++ compiler.
* gcov: (gcc) Gcov. @command{gcov}---a test coverage program.
Add gcov-tool: an offline gcda profile processing tool Support. 2014-07-10 Rong Xu <xur@google.com> Add gcov-tool: an offline gcda profile processing tool Support. * gcc/gcov-io.c (gcov_position): Make avaialble to gcov-tool. (gcov_is_error): Ditto. (gcov_read_string): Ditto. (gcov_read_sync): Ditto. * gcc/gcov-io.h: Move counter defines to gcov-counter.def. * gcc/gcov-dump.c (tag_counters): Use gcov-counter.def. * gcc/coverage.c: Ditto. * gcc/gcov-tool.c: Offline gcda profile processing tool. (unlink_gcda_file): Remove one gcda file. (unlink_profile_dir): Remove gcda files from the profile path. (gcov_output_files): Output gcda files to an output dir. (profile_merge): Merge two profiles in directory. (print_merge_usage_message): Print merge usage. (merge_usage): Print merge usage and exit. (do_merge): Driver for profile merge sub-command. (profile_rewrite): Rewrite profile. (print_rewrite_usage_message): Print rewrite usage. (rewrite_usage): Print rewrite usage and exit. (do_rewrite): Driver for profile rewrite sub-command. (print_usage): Print gcov-info usage and exit. (print_version): Print gcov-info version. (process_args): Process arguments. (main): Main routine for gcov-tool. * gcc/Makefile.in: Build and install gcov-tool. * gcc/gcov-counter.def: New file split from gcov-io.h. * libgcc/libgcov-driver.c (gcov_max_filename): Make available to gcov-tool. * libgcc/libgcov-merge.c (__gcov_merge_add): Replace gcov_read_counter() with a Macro. (__gcov_merge_ior): Ditto. (__gcov_merge_time_profile): Ditto. (__gcov_merge_single): Ditto. (__gcov_merge_delta): Ditto. * libgcc/libgcov-util.c (void gcov_set_verbose): Set the verbose flag in the utility functions. (set_fn_ctrs): Utility function for reading gcda files to in-memory gcov_list object link lists. (tag_function): Ditto. (tag_blocks): Ditto. (tag_arcs): Ditto. (tag_lines): Ditto. (tag_counters): Ditto. (tag_summary): Ditto. (read_gcda_finalize): Ditto. (read_gcda_file): Ditto. (ftw_read_file): Ditto. (read_profile_dir_init): Ditto. (gcov_read_profile_dir): Ditto. (gcov_read_counter_mem): Ditto. (gcov_get_merge_weight): Ditto. (merge_wrapper): A wrapper function that calls merging handler. (gcov_merge): Merge two gcov_info objects with weights. (find_match_gcov_info): Find the matched gcov_info in the list. (gcov_profile_merge): Merge two gcov_info object lists. (__gcov_add_counter_op): Process edge profile counter values. (__gcov_ior_counter_op): Process IOR profile counter values. (__gcov_delta_counter_op): Process delta profile counter values. (__gcov_single_counter_op): Process single profile counter values. (fp_scale): Callback function for float-point scaling. (int_scale): Callback function for integer fraction scaling. (gcov_profile_scale): Scaling profile counters. (gcov_profile_normalize): Normalize profile counters. * libgcc/libgcov.h: Add headers and functions for gcov-tool use. (gcov_get_counter): New. (gcov_get_counter_target): Ditto. (struct gcov_info): Make the functions field mutable in gcov-tool compilation. * gcc/doc/gcc.texi: Include gcov-tool.texi. * gcc/doc/gcov-tool.texi: Document for gcov-tool. From-SVN: r212448
2014-07-11 07:48:07 +02:00
* gcov-tool: (gcc) Gcov-tool. @command{gcov-tool}---an offline gcda profile processing program.
@end direntry
This file documents the use of the GNU compilers.
@sp 1
@insertcopying
@sp 1
@end ifnottex
1997-08-11 17:56:58 +02:00
@setchapternewpage odd
@titlepage
@title Using the GNU Compiler Collection
@versionsubtitle
@author Richard M. Stallman and the @sc{GCC} Developer Community
1997-08-11 17:56:58 +02:00
@page
@vskip 0pt plus 1filll
Published by:
@multitable @columnfractions 0.5 0.5
@item GNU Press
@tab Website: @uref{http://www.gnupress.org}
@item a division of the
@tab General: @email{press@@gnu.org}
@item Free Software Foundation
@tab Orders: @email{sales@@gnu.org}
@item 51 Franklin Street, Fifth Floor
@tab Tel 617-542-5942
@item Boston, MA 02110-1301 USA
@tab Fax 617-542-2652
@end multitable
@sp 2
@ifset FSFPRINT
@c Update this ISBN when printing a new edition.
@acronym{ISBN} 1-882114-39-6
Cover art by Gary M. Torrisi. Cover design by Jonathan Richard.
@end ifset
@ifclear FSFPRINT
Last printed October 2003 for GCC 3.3.1.@*
Printed copies are available for $45 each.
@end ifclear
1997-08-11 17:56:58 +02:00
@sp 1
@insertcopying
1997-08-11 17:56:58 +02:00
@end titlepage
@summarycontents
@contents
1997-08-11 17:56:58 +02:00
@page
@node Top, G++ and GCC,, (DIR)
@top Introduction
@cindex introduction
This manual documents how to use the GNU compilers,
as well as their features and incompatibilities, and how to report
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 17:35:30 +02:00
bugs. It corresponds to the compilers
@ifset VERSION_PACKAGE
@value{VERSION_PACKAGE}
@end ifset
version @value{version-GCC}.
The internals of the GNU compilers, including how to port them to new
targets and some information about how to write front ends for new
languages, are documented in a separate manual. @xref{Top,,
Introduction, gccint, GNU Compiler Collection (GCC) Internals}.
1997-08-11 17:56:58 +02:00
@menu
* G++ and GCC:: You can compile C or C++ programs.
* Standards:: Language standards supported by GCC.
1997-08-11 17:56:58 +02:00
* Invoking GCC:: Command options supported by @samp{gcc}.
* C Implementation:: How GCC implements the ISO C specification.
* C++ Implementation:: How GCC implements the ISO C++ specification.
* C Extensions:: GNU extensions to the C language family.
1997-08-11 17:56:58 +02:00
* C++ Extensions:: GNU extensions to the C++ language.
* Objective-C:: GNU Objective-C runtime features.
* Compatibility:: Binary Compatibility
* Gcov:: @command{gcov}---a test coverage program.
Add gcov-tool: an offline gcda profile processing tool Support. 2014-07-10 Rong Xu <xur@google.com> Add gcov-tool: an offline gcda profile processing tool Support. * gcc/gcov-io.c (gcov_position): Make avaialble to gcov-tool. (gcov_is_error): Ditto. (gcov_read_string): Ditto. (gcov_read_sync): Ditto. * gcc/gcov-io.h: Move counter defines to gcov-counter.def. * gcc/gcov-dump.c (tag_counters): Use gcov-counter.def. * gcc/coverage.c: Ditto. * gcc/gcov-tool.c: Offline gcda profile processing tool. (unlink_gcda_file): Remove one gcda file. (unlink_profile_dir): Remove gcda files from the profile path. (gcov_output_files): Output gcda files to an output dir. (profile_merge): Merge two profiles in directory. (print_merge_usage_message): Print merge usage. (merge_usage): Print merge usage and exit. (do_merge): Driver for profile merge sub-command. (profile_rewrite): Rewrite profile. (print_rewrite_usage_message): Print rewrite usage. (rewrite_usage): Print rewrite usage and exit. (do_rewrite): Driver for profile rewrite sub-command. (print_usage): Print gcov-info usage and exit. (print_version): Print gcov-info version. (process_args): Process arguments. (main): Main routine for gcov-tool. * gcc/Makefile.in: Build and install gcov-tool. * gcc/gcov-counter.def: New file split from gcov-io.h. * libgcc/libgcov-driver.c (gcov_max_filename): Make available to gcov-tool. * libgcc/libgcov-merge.c (__gcov_merge_add): Replace gcov_read_counter() with a Macro. (__gcov_merge_ior): Ditto. (__gcov_merge_time_profile): Ditto. (__gcov_merge_single): Ditto. (__gcov_merge_delta): Ditto. * libgcc/libgcov-util.c (void gcov_set_verbose): Set the verbose flag in the utility functions. (set_fn_ctrs): Utility function for reading gcda files to in-memory gcov_list object link lists. (tag_function): Ditto. (tag_blocks): Ditto. (tag_arcs): Ditto. (tag_lines): Ditto. (tag_counters): Ditto. (tag_summary): Ditto. (read_gcda_finalize): Ditto. (read_gcda_file): Ditto. (ftw_read_file): Ditto. (read_profile_dir_init): Ditto. (gcov_read_profile_dir): Ditto. (gcov_read_counter_mem): Ditto. (gcov_get_merge_weight): Ditto. (merge_wrapper): A wrapper function that calls merging handler. (gcov_merge): Merge two gcov_info objects with weights. (find_match_gcov_info): Find the matched gcov_info in the list. (gcov_profile_merge): Merge two gcov_info object lists. (__gcov_add_counter_op): Process edge profile counter values. (__gcov_ior_counter_op): Process IOR profile counter values. (__gcov_delta_counter_op): Process delta profile counter values. (__gcov_single_counter_op): Process single profile counter values. (fp_scale): Callback function for float-point scaling. (int_scale): Callback function for integer fraction scaling. (gcov_profile_scale): Scaling profile counters. (gcov_profile_normalize): Normalize profile counters. * libgcc/libgcov.h: Add headers and functions for gcov-tool use. (gcov_get_counter): New. (gcov_get_counter_target): Ditto. (struct gcov_info): Make the functions field mutable in gcov-tool compilation. * gcc/doc/gcc.texi: Include gcov-tool.texi. * gcc/doc/gcov-tool.texi: Document for gcov-tool. From-SVN: r212448
2014-07-11 07:48:07 +02:00
* Gcov-tool:: @command{gcov-tool}---an offline gcda profile processing program.
* Trouble:: If you have trouble using GCC.
1997-08-11 17:56:58 +02:00
* Bugs:: How, why and where to report bugs.
* Service:: How To Get Help with GCC
* Contributing:: How to contribute to testing and developing GCC.
1997-08-11 17:56:58 +02:00
* Funding:: How to help assure funding for free software.
* GNU Project:: The GNU Project and GNU/Linux.
1997-08-11 17:56:58 +02:00
* Copying:: GNU General Public License says
how you can copy and share GCC.
* GNU Free Documentation License:: How you can copy and share this manual.
* Contributors:: People who have contributed to GCC.
1997-08-11 17:56:58 +02:00
* Option Index:: Index to command line options.
* Keyword Index:: Index of concepts and symbol names.
1997-08-11 17:56:58 +02:00
@end menu
@include frontends.texi
@include standards.texi
1997-08-11 17:56:58 +02:00
@include invoke.texi
@include implement-c.texi
@include implement-cxx.texi
1997-08-11 17:56:58 +02:00
@include extend.texi
@include objc.texi
@include compat.texi
1997-08-11 17:56:58 +02:00
@include gcov.texi
Add gcov-tool: an offline gcda profile processing tool Support. 2014-07-10 Rong Xu <xur@google.com> Add gcov-tool: an offline gcda profile processing tool Support. * gcc/gcov-io.c (gcov_position): Make avaialble to gcov-tool. (gcov_is_error): Ditto. (gcov_read_string): Ditto. (gcov_read_sync): Ditto. * gcc/gcov-io.h: Move counter defines to gcov-counter.def. * gcc/gcov-dump.c (tag_counters): Use gcov-counter.def. * gcc/coverage.c: Ditto. * gcc/gcov-tool.c: Offline gcda profile processing tool. (unlink_gcda_file): Remove one gcda file. (unlink_profile_dir): Remove gcda files from the profile path. (gcov_output_files): Output gcda files to an output dir. (profile_merge): Merge two profiles in directory. (print_merge_usage_message): Print merge usage. (merge_usage): Print merge usage and exit. (do_merge): Driver for profile merge sub-command. (profile_rewrite): Rewrite profile. (print_rewrite_usage_message): Print rewrite usage. (rewrite_usage): Print rewrite usage and exit. (do_rewrite): Driver for profile rewrite sub-command. (print_usage): Print gcov-info usage and exit. (print_version): Print gcov-info version. (process_args): Process arguments. (main): Main routine for gcov-tool. * gcc/Makefile.in: Build and install gcov-tool. * gcc/gcov-counter.def: New file split from gcov-io.h. * libgcc/libgcov-driver.c (gcov_max_filename): Make available to gcov-tool. * libgcc/libgcov-merge.c (__gcov_merge_add): Replace gcov_read_counter() with a Macro. (__gcov_merge_ior): Ditto. (__gcov_merge_time_profile): Ditto. (__gcov_merge_single): Ditto. (__gcov_merge_delta): Ditto. * libgcc/libgcov-util.c (void gcov_set_verbose): Set the verbose flag in the utility functions. (set_fn_ctrs): Utility function for reading gcda files to in-memory gcov_list object link lists. (tag_function): Ditto. (tag_blocks): Ditto. (tag_arcs): Ditto. (tag_lines): Ditto. (tag_counters): Ditto. (tag_summary): Ditto. (read_gcda_finalize): Ditto. (read_gcda_file): Ditto. (ftw_read_file): Ditto. (read_profile_dir_init): Ditto. (gcov_read_profile_dir): Ditto. (gcov_read_counter_mem): Ditto. (gcov_get_merge_weight): Ditto. (merge_wrapper): A wrapper function that calls merging handler. (gcov_merge): Merge two gcov_info objects with weights. (find_match_gcov_info): Find the matched gcov_info in the list. (gcov_profile_merge): Merge two gcov_info object lists. (__gcov_add_counter_op): Process edge profile counter values. (__gcov_ior_counter_op): Process IOR profile counter values. (__gcov_delta_counter_op): Process delta profile counter values. (__gcov_single_counter_op): Process single profile counter values. (fp_scale): Callback function for float-point scaling. (int_scale): Callback function for integer fraction scaling. (gcov_profile_scale): Scaling profile counters. (gcov_profile_normalize): Normalize profile counters. * libgcc/libgcov.h: Add headers and functions for gcov-tool use. (gcov_get_counter): New. (gcov_get_counter_target): Ditto. (struct gcov_info): Make the functions field mutable in gcov-tool compilation. * gcc/doc/gcc.texi: Include gcov-tool.texi. * gcc/doc/gcov-tool.texi: Document for gcov-tool. From-SVN: r212448
2014-07-11 07:48:07 +02:00
@include gcov-tool.texi
@include trouble.texi
@include bugreport.texi
@include service.texi
@include contribute.texi
@include funding.texi
@include gnu.texi
@include gpl_v3.texi
1997-08-11 17:56:58 +02:00
@c ---------------------------------------------------------------------
@c GFDL
@c ---------------------------------------------------------------------
@include fdl.texi
@include contrib.texi
1997-08-11 17:56:58 +02:00
@c ---------------------------------------------------------------------
@c Indexes
@c ---------------------------------------------------------------------
@node Option Index
@unnumbered Option Index
GCC's command line options are indexed here without any initial @samp{-}
or @samp{--}. Where an option has both positive and negative forms
(such as @option{-f@var{option}} and @option{-fno-@var{option}}),
relevant entries in the manual are indexed under the most appropriate
form; it may sometimes be useful to look up both forms.
@printindex op
@node Keyword Index
@unnumbered Keyword Index
1997-08-11 17:56:58 +02:00
@printindex cp
@c ---------------------------------------------------------------------
@c Epilogue
@c ---------------------------------------------------------------------
1997-08-11 17:56:58 +02:00
@bye