gcc/gcc/doc/gcc.texi

362 lines
11 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 @setfilename usegcc.info
@c @setfilename portgcc.info
@c To produce the full manual, use the "gcc.info" setfilename, and
@c make sure the following do NOT begin with '@c' (and the @clear lines DO)
@set INTERNALS
@set USING
@c To produce a user-only manual, use the "usegcc.info" setfilename, and
@c make sure the following does NOT begin with '@c':
@c @clear INTERNALS
@c To produce a porter-only manual, use the "portgcc.info" setfilename,
@c and make sure the following does NOT begin with '@c':
@c @clear USING
@c (For FSF printing, turn on smallbook, comment out finalout below;
@c that is all that is needed.)
@c 6/27/96 FSF DO wants smallbook fmt for 1st bound edition.
@c @smallbook
@c i also commented out the finalout command, so if there *are* any
@c overfulls, you'll (hopefully) see the rectangle in the right hand
@c margin. -mew 15june93
@c @finalout
@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
@macro gcctabopt{body}
@code{\body\}
@end macro
@macro gccoptlist{body}
@smallexample
\body\
@end smallexample
@end macro
@c Makeinfo handles the above macro OK, TeX needs manual line breaks;
@c they get lost at some point in handling the macro. But if @macro is
@c used here rather than @alias, it produces double line breaks.
@iftex
@alias gol = *
@end iftex
@ifnottex
@macro gol
@end macro
@end ifnottex
1997-08-11 17:56:58 +02:00
@ifset INTERNALS
@ifset USING
@settitle Using and Porting the GNU Compiler Collection (GCC)
1997-08-11 17:56:58 +02:00
@end ifset
@end ifset
@c seems reasonable to assume at least one of INTERNALS or USING is set...
@ifclear INTERNALS
@settitle Using the GNU Compiler Collection
1997-08-11 17:56:58 +02:00
@end ifclear
@ifclear USING
@settitle Porting the GNU Compiler Collection
1997-08-11 17:56:58 +02:00
@end ifclear
@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
1997-08-11 17:56:58 +02:00
@c %**end of header
@c Use with @@smallbook.
@c Cause even numbered pages to be printed on the left hand side of
@c the page and odd numbered pages to be printed on the right hand
@c side of the page. Using this, you can print on both sides of a
@c sheet of paper and have the text on the same part of the sheet.
@c The text on right hand pages is pushed towards the right hand
@c margin and the text on left hand pages is pushed toward the left
@c hand margin.
@c (To provide the reverse effect, set bindingoffset to -0.75in.)
@c @tex
@c \global\bindingoffset=0.75in
@c \global\normaloffset =0.75in
@c @end tex
@c Change the font used for @def... commands, since the default
@c proportional one used is bad for names starting __.
@tex
\global\setfont\defbf\ttbshape{10}{\magstep1}
@end tex
@ifnottex
@dircategory Programming
@direntry
* gcc: (gcc). The GNU Compiler Collection.
@end direntry
1997-08-11 17:56:58 +02:00
@ifset INTERNALS
@ifset USING
This file documents the use and the internals of the GNU compiler.
@end ifset
@end ifset
@ifclear USING
This file documents the internals of the GNU compiler.
@end ifclear
@ifclear INTERNALS
This file documents the use of the GNU compiler.
@end ifclear
@sp 1
Published by the Free Software Foundation@*
59 Temple Place - Suite 330@*
1997-08-11 17:56:58 +02:00
Boston, MA 02111-1307 USA
@sp 1
@c When you update the list of years below, search for copyright{} and
@c update the other copy too.
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001 Free Software Foundation, Inc.
@sp 1
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``GNU General Public License'' and ``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 ifnottex
1997-08-11 17:56:58 +02:00
@setchapternewpage odd
@c @finalout
1997-08-11 17:56:58 +02:00
@titlepage
@ifset INTERNALS
@ifset USING
@center @titlefont{Using and Porting the GNU Compiler Collection}
1997-08-11 17:56:58 +02:00
@end ifset
@end ifset
@ifclear INTERNALS
@title Using the GNU Compiler Collection
1997-08-11 17:56:58 +02:00
@end ifclear
@ifclear USING
@title Porting the GNU Compiler Collection
1997-08-11 17:56:58 +02:00
@end ifclear
@sp 2
@center Richard M. Stallman
@sp 3
@center Last updated 22 June 2001
1997-08-11 17:56:58 +02:00
@sp 1
@c The version number appears five times more in this file.
1997-08-11 17:56:58 +02:00
@center for GCC 3.1
1997-08-11 17:56:58 +02:00
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1998,
1999, 2000, 2001 Free Software Foundation, Inc.
1997-08-11 17:56:58 +02:00
@sp 2
For GCC Version 3.1@*
1997-08-11 17:56:58 +02:00
@sp 1
Published by the Free Software Foundation @*
59 Temple Place---Suite 330@*
1997-08-11 17:56:58 +02:00
Boston, MA 02111-1307, USA@*
Last printed April, 1998.@*
1997-08-11 17:56:58 +02:00
Printed copies are available for $50 each.@*
ISBN 1-882114-37-X
1997-08-11 17:56:58 +02:00
@sp 1
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``GNU General Public License'', 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''.
(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.
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
@ifset INTERNALS
@ifset USING
This manual documents how to run, install and port the GNU
compiler, as well as its new features and incompatibilities, and how to
report bugs. It corresponds to GCC version 3.1.
1997-08-11 17:56:58 +02:00
@end ifset
@end ifset
@ifclear INTERNALS
This manual documents how to run and install the GNU compiler,
as well as its new features and incompatibilities, and how to report
bugs. It corresponds to GCC version 3.1.
1997-08-11 17:56:58 +02:00
@end ifclear
@ifclear USING
This manual documents how to port the GNU compiler,
as well as its new features and incompatibilities, and how to report
bugs. It corresponds to GCC version 3.1.
1997-08-11 17:56:58 +02:00
@end ifclear
@menu
@ifset USING
* 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}.
* Installation:: How to configure, compile and install GCC.
* C Implementation:: How GCC implements the ISO C specification.
1997-08-11 17:56:58 +02:00
* C Extensions:: GNU extensions to the C language family.
* C++ Extensions:: GNU extensions to the C++ language.
* Objective-C:: GNU Objective-C runtime features.
* Gcov:: gcov: a GCC test coverage program.
* Trouble:: If you have trouble installing GCC.
1997-08-11 17:56:58 +02:00
* Bugs:: How, why and where to report bugs.
* Service:: How to find suppliers of support for GCC.
* Contributing:: How to contribute to testing and developing GCC.
* VMS:: Using GCC on VMS.
* Makefile:: Additional Makefile and configure information.
1997-08-11 17:56:58 +02:00
@end ifset
@ifset INTERNALS
* Portability:: Goals of GCC's portability features.
* Interface:: Function-call interface of GCC output.
1997-08-11 17:56:58 +02:00
* Passes:: Order of passes, what they do, and what each file is for.
* Trees:: The source representation used by the C and C++ front ends.
1997-08-11 17:56:58 +02:00
* RTL:: The intermediate representation that most passes work on.
* Machine Desc:: How to write machine description instruction patterns.
Makefile.in (TARGET_H, [...]): New. * Makefile.in (TARGET_H, TARGET_DEF_H): New. (c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update. * c-decl.c (duplicate_decls): Use function pointer. * c-typeck.c (common_type): Similarly. * tree.c (valid_machine_attribute): Similarly. (merge_machine_type_attributes): Rename merge_type_attributes. (merge_machine_decl_attributes): Rename merge_decl_attributes. (merge_dllimport_decl_attributes): New function. * tree.h (merge_machine_type_attributes): Rename merge_type_attributes. (merge_machine_decl_attributes): Rename merge_decl_attributes. (merge_dllimport_decl_attributes): New prototype. * target.h: New. * target-def.h: New. doc: (Joseph Myers) * doc/gcc.texi, doc/tm.texi: Update documentation. cp: Make-lang.in: Update dependencies. * spew.c: Include target.h. (duplicate_decls): Call target function. * decl2.c: include target.h (import_export_class): Use existence of target function pointer. * typeck.c: Include target.h. (qualify_type_recursive): Rename variable. Call target function. (type_after_usual_arithmetic_conversions): Similarly. (common_type): Similarly. config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c, avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c, i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c, mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c) : Include target.h and target-def.h. Define target. * arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove. * arc/arc.c (arc_valid_machine_decl_attribute): Rename arc_valid_decl_attribute, make static. * arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * arm/arm-protos.h (arm_valid_machine_decl_attribute, arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute, arm_pe_merge_machine_decl_attributes): Remove. * arm/arm.c (arm_valid_machine_decl_attribute_p): Rename arm_valid_decl_attribute_p, make static. (arm_pe_valid_decl_attribute_p): Move from pe.c. * arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c. (arm_pe_merge_machine_decl_attributes): Move to tree.c. * arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New. (VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove. * avr/avr-protos.h (valid_machine_type_attribute, valid_machine_decl_attribute): Remove. * avr/avr.c (valid_machine_type_attribute, valid_machine_decl_attribute): Rename and make static. * avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove. * c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove. * c4x/c4x.c (c4x_valid_type_attribute_p): Make static. * c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * d30v/d30v.h: Remove obsolete comments. * h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove. * h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make static. * h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. (i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES, i386_pe_valid_type_attributes_p): Remove. * i386/i386-protos.h (ix86_valid_decl_attribute_p, ix86_valid_type_attribute_p): Remove. * i386/i386.c (ix86_valid_decl_attribute_p): Remove. (ix86_valid_type_attribute_p): Make static. * i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c. * ia64/ia64-protos.h (ia64_valid_type_attribute): Remove. * ia64/ia64.c (ia64_valid_type_attribute): Make static. * ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove. * m32r/m32r.c (m32r_valid_decl_attribute): Make static. * m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p, m68hc11_valid_type_attribute_p): Remove. * m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove. (m68hc11_valid_type_attribute_p): Make static. * m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * mcore/mcore-protos.h (mcore_valid_machine_decl_attribute, mcore_merge_machine_decl_attribute): Remove. * mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename, make static. (mcore_merge_machine_decl_attributes): Move to tree.c. * mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. * ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p, ns32k_valid_type_attribute_p): Remove. * ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove. (ns32k_valid_type_attribute_p): Make static. * ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p, rs6000_valid_type_attribute_p): Remove. * rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove. (rs6000_valid_type_attribute_p): Make static. * rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove. * sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static. * sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove. * v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static. * v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. From-SVN: r43585
2001-06-26 20:09:27 +02:00
* Target Macros:: How to write the machine description C macros and functions.
1997-08-11 17:56:58 +02:00
* Config:: Writing the @file{xm-@var{machine}.h} file.
* Fragments:: Writing the @file{t-@var{target}} and @file{x-@var{host}} files.
@end ifset
* Funding:: How to help assure funding for free software.
* GNU/Linux:: Linux and the GNU Project
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.
1997-08-11 17:56:58 +02:00
* Index:: Index of concepts and symbol names.
@end menu
@ifset USING
@include frontends.texi
1997-08-11 17:56:58 +02:00
@include standards.texi
1997-08-11 17:56:58 +02:00
@include invoke.texi
@include install-old.texi
1997-08-11 17:56:58 +02:00
@include extend.texi
@include objc.texi
1997-08-11 17:56:58 +02:00
@include gcov.texi
@include trouble.texi
1997-08-11 17:56:58 +02:00
@include bugreport.texi
1997-08-11 17:56:58 +02:00
@include service.texi
1997-08-11 17:56:58 +02:00
@include contribute.texi
1997-08-11 17:56:58 +02:00
@include vms.texi
@include makefile.texi
@include configterms.texi
1997-08-11 17:56:58 +02:00
@end ifset
@ifset INTERNALS
@include portability.texi
@include interface.texi
@include passes.texi
@include c-tree.texi
1997-08-11 17:56:58 +02:00
@include rtl.texi
@include md.texi
@include tm.texi
@include hostconfig.texi
@include fragments.texi
@end ifset
1997-08-11 17:56:58 +02:00
@include funding.texi
1997-08-11 17:56:58 +02:00
@include linux-and-gnu.texi
1997-08-11 17:56:58 +02:00
@include gpl.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
1997-08-11 17:56:58 +02:00
@node Index
@unnumbered Index
@printindex cp
@c ---------------------------------------------------------------------
@c Epilogue
@c ---------------------------------------------------------------------
1997-08-11 17:56:58 +02:00
@bye