Commit b64a6a11 by Joseph Myers Committed by Joseph Myers

gcc.texi: Move several chapters out to ...

	* doc/gcc.texi: Move several chapters out to ...
	* doc/bugreport.texi, doc/contribute.texi, doc/frontends.texi,
	doc/service.texi, doc/standards.texi, doc/trouble.texi,
	doc/vms.texi: ... here.  New files.
	* Makefile.in ($(docdir)/gcc.info, gcc.dvi): Update dependencies.

From-SVN: r46929
parent eaec9b3d
2001-11-11 Joseph S. Myers <jsm28@cam.ac.uk>
* doc/gcc.texi: Move several chapters out to ...
* doc/bugreport.texi, doc/contribute.texi, doc/frontends.texi,
doc/service.texi, doc/standards.texi, doc/trouble.texi,
doc/vms.texi: ... here. New files.
* Makefile.in ($(docdir)/gcc.info, gcc.dvi): Update dependencies.
2001-11-11 Joseph S. Myers <jsm28@cam.ac.uk>
* ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog.5, ChangeLog,
cfg.c, cfganal.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgrtl.c,
collect2.c, combine.c, config.in, configure, configure.in,
......
......@@ -2315,7 +2315,10 @@ $(docdir)/gcc.info: $(docdir)/gcc.texi $(docdir)/extend.texi \
$(docdir)/c-tree.texi $(docdir)/rtl.texi $(docdir)/tm.texi \
$(docdir)/gcov.texi $(docdir)/contrib.texi $(docdir)/objc.texi \
$(docdir)/include/fdl.texi $(docdir)/include/gpl.texi \
$(docdir)/include/funding.texi
$(docdir)/include/funding.texi $(docdir)/bugreport.texi \
$(docdir)/contribute.texi $(docdir)/frontends.texi \
$(docdir)/service.texi $(docdir)/standards.texi \
$(docdir)/trouble.texi $(docdir)/vms.texi
cd $(srcdir) && $(MAKEINFO) $(MAKEINFOFLAGS) -I doc -I doc/include -o doc/gcc.info doc/gcc.texi
$(docdir)/cppinternals.info: $(docdir)/cppinternals.texi
......@@ -2333,7 +2336,10 @@ gcc.dvi: $(docdir)/gcc.texi $(docdir)/extend.texi $(docdir)/install-old.texi \
$(docdir)/rtl.texi $(docdir)/tm.texi $(docdir)/gcov.texi \
$(docdir)/contrib.texi $(docdir)/objc.texi \
$(docdir)/include/fdl.texi $(docdir)/include/gpl.texi \
$(docdir)/include/funding.texi
$(docdir)/include/funding.texi $(docdir)/bugreport.texi \
$(docdir)/contribute.texi $(docdir)/frontends.texi \
$(docdir)/service.texi $(docdir)/standards.texi \
$(docdir)/trouble.texi $(docdir)/vms.texi
$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $(docdir)/gcc.texi
cppinternals.dvi: $(docdir)/cppinternals.texi
......
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
@c 1999, 2000, 2001 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@node Contributing
@chapter Contributing to GCC Development
If you would like to help pretest GCC releases to assure they work well,
our current development sources are available by CVS (see
@uref{http://gcc.gnu.org/cvs.html}). Source and binary snapshots are
also available for FTP; see @uref{http://gcc.gnu.org/snapshots.html}.
If you would like to work on improvements to GCC, please read the
advice at these URLs:
@smallexample
@uref{http://gcc.gnu.org/contribute.html}
@uref{http://gcc.gnu.org/contributewhy.html}
@end smallexample
@noindent
for information on how to make useful contributions and avoid
duplication of effort. Suggested projects are listed at
@uref{http://gcc.gnu.org/projects/}.
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
@c 1999, 2000, 2001 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@node G++ and GCC
@chapter Compile C, C++, Objective-C, Ada, CHILL, Fortran, or Java
@cindex Objective-C
@cindex Fortran
@cindex Java
@cindex CHILL
@cindex Ada
Several versions of the compiler (C, C++, Objective-C, Ada, CHILL,
Fortran, and Java) are integrated; this is why we use the name
``GNU Compiler Collection''. GCC can compile programs written in any of these
languages. The Ada, CHILL, Fortran, and Java compilers are described in
separate manuals.
@cindex GCC
``GCC'' is a common shorthand term for the GNU Compiler Collection. This is both
the most general name for the compiler, and the name used when the
emphasis is on compiling C programs (as the abbreviation formerly
stood for ``GNU C Compiler'').
@cindex C++
@cindex G++
When referring to C++ compilation, it is usual to call the compiler
``G++''. Since there is only one compiler, it is also accurate to call
it ``GCC'' no matter what the language context; however, the term
``G++'' is more useful when the emphasis is on compiling C++ programs.
@cindex Ada
@cindex GNAT
Similarly, when we talk about Ada compilation, we usually call the
compiler ``GNAT'', for the same reasons.
We use the name ``GCC'' to refer to the compilation system as a
whole, and more specifically to the language-independent part of the
compiler. For example, we refer to the optimization options as
affecting the behavior of ``GCC'' or sometimes just ``the compiler''.
Front ends for other languages, such as Mercury and Pascal exist but
have not yet been integrated into GCC@. These front ends, like that for C++,
are built in subdirectories of GCC and link to it. The result is an
integrated compiler that can compile programs written in C, C++,
Objective-C, or any of the languages for which you have installed front
ends.
In this manual, we only discuss the options for the C, Objective-C, and
C++ compilers and those of the GCC core. Consult the documentation
of the other front ends for the options to use when compiling programs
written in other languages.
@cindex compiler compared to C++ preprocessor
@cindex intermediate C version, nonexistent
@cindex C intermediate output, nonexistent
G++ is a @emph{compiler}, not merely a preprocessor. G++ builds object
code directly from your C++ program source. There is no intermediate C
version of the program. (By contrast, for example, some other
implementations use a program that generates a C program from your C++
source.) Avoiding an intermediate C representation of the program means
that you get better object code, and better debugging information. The
GNU debugger, GDB, works with this information in the object code to
give you comprehensive C++ source-level editing capabilities
(@pxref{C,,C and C++,gdb.info, Debugging with GDB}).
@c FIXME! Someone who knows something about Objective-C ought to put in
@c a paragraph or two about it here, and move the index entry down when
@c there is more to point to than the general mention in the 1st par.
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
@c 1999, 2000, 2001 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@node Service
@chapter How To Get Help with GCC
If you need help installing, using or changing GCC, there are two
ways to find it:
@itemize @bullet
@item
Send a message to a suitable network mailing list. First try
@email{gcc-help@@gcc.gnu.org} (for help installing or using GCC), and if
that brings no response, try @email{gcc@@gcc.gnu.org}. For help
changing GCC, ask @email{gcc@@gcc.gnu.org}. If you think you have found
a bug in GCC, please report it following the instructions at
@pxref{Bug Reporting}.
@item
Look in the service directory for someone who might help you for a fee.
The service directory is found at
@uref{http://www.gnu.org/prep/service.html}.
@end itemize
@c For further information, see
@c @uref{http://gcc.gnu.org/cgi-bin/fom.cgi?file=12}.
@c FIXME: this URL may be too volatile, this FAQ entry needs to move to
@c the regular web pages before we can uncomment the reference.
@c Copyright (C) 2000, 2001 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@node Standards
@chapter Language Standards Supported by GCC
@cindex C standard
@cindex C standards
@cindex ANSI C standard
@cindex ANSI C
@cindex ANSI C89
@cindex C89
@cindex ANSI X3.159-1989
@cindex X3.159-1989
@cindex ISO C standard
@cindex ISO C
@cindex ISO C89
@cindex ISO C90
@cindex ISO/IEC 9899
@cindex ISO 9899
@cindex C90
@cindex ISO C94
@cindex C94
@cindex ISO C95
@cindex C95
@cindex ISO C99
@cindex C99
@cindex ISO C9X
@cindex C9X
@cindex Technical Corrigenda
@cindex TC1
@cindex Technical Corrigendum 1
@cindex TC2
@cindex Technical Corrigendum 2
@cindex AMD1
@cindex freestanding implementation
@cindex freestanding environment
@cindex hosted implementation
@cindex hosted environment
@findex __STDC_HOSTED__
For each language compiled by GCC for which there is a standard, GCC
attempts to follow one or more versions of that standard, possibly
with some exceptions, and possibly with some extensions.
GCC supports three versions of the C standard, although support for
the most recent version is not yet complete.
@opindex std
@opindex ansi
@opindex pedantic
@opindex pedantic-errors
The original ANSI C standard (X3.159-1989) was ratified in 1989 and
published in 1990. This standard was ratified as an ISO standard
(ISO/IEC 9899:1990) later in 1990. There were no technical
differences between these publications, although the sections of the
ANSI standard were renumbered and became clauses in the ISO standard.
This standard, in both its forms, is commonly known as @dfn{C89}, or
occasionally as @dfn{C90}, from the dates of ratification. The ANSI
standard, but not the ISO standard, also came with a Rationale
document. To select this standard in GCC, use one of the options
@option{-ansi}, @option{-std=c89} or @option{-std=iso9899:1990}; to obtain
all the diagnostics required by the standard, you should also specify
@option{-pedantic} (or @option{-pedantic-errors} if you want them to be
errors rather than warnings). @xref{C Dialect Options,,Options
Controlling C Dialect}.
Errors in the 1990 ISO C standard were corrected in two Technical
Corrigenda published in 1994 and 1996. GCC does not support the
uncorrected version.
An amendment to the 1990 standard was published in 1995. This
amendment added digraphs and @code{__STDC_VERSION__} to the language,
but otherwise concerned the library. This amendment is commonly known
as @dfn{AMD1}; the amended standard is sometimes known as @dfn{C94} or
@dfn{C95}. To select this standard in GCC, use the option
@option{-std=iso9899:199409} (with, as for other standard versions,
@option{-pedantic} to receive all required diagnostics).
A new edition of the ISO C standard was published in 1999 as ISO/IEC
9899:1999, and is commonly known as @dfn{C99}. GCC has incomplete
support for this standard version; see
@uref{http://gcc.gnu.org/c99status.html} for details. To select this
standard, use @option{-std=c99} or @option{-std=iso9899:1999}. (While in
development, drafts of this standard version were referred to as
@dfn{C9X}.)
@opindex traditional
GCC also has some limited support for traditional (pre-ISO) C with the
@option{-traditional} option. This support may be of use for compiling
some very old programs that have not been updated to ISO C, but should
not be used for new programs. It will not work with some modern C
libraries such as the GNU C library.
By default, GCC provides some extensions to the C language that on
rare occasions conflict with the C standard. @xref{C
Extensions,,Extensions to the C Language Family}. Use of the
@option{-std} options listed above will disable these extensions where
they conflict with the C standard version selected. You may also
select an extended version of the C language explicitly with
@option{-std=gnu89} (for C89 with GNU extensions) or @option{-std=gnu99}
(for C99 with GNU extensions). The default, if no C language dialect
options are given, is @option{-std=gnu89}; this will change to
@option{-std=gnu99} in some future release when the C99 support is
complete. Some features that are part of the C99 standard are
accepted as extensions in C89 mode.
The ISO C standard defines (in clause 4) two classes of conforming
implementation. A @dfn{conforming hosted implementation} supports the
whole standard including all the library facilities; a @dfn{conforming
freestanding implementation} is only required to provide certain
library facilities: those in @code{<float.h>}, @code{<limits.h>},
@code{<stdarg.h>}, and @code{<stddef.h>}; since AMD1, also those in
@code{<iso646.h>}; and in C99, also those in @code{<stdbool.h>} and
@code{<stdint.h>}. In addition, complex types, added in C99, are not
required for freestanding implementations. The standard also defines
two environments for programs, a @dfn{freestanding environment},
required of all implementations and which may not have library
facilities beyond those required of freestanding implementations,
where the handling of program startup and termination are
implementation-defined, and a @dfn{hosted environment}, which is not
required, in which all the library facilities are provided and startup
is through a function @code{int main (void)} or @code{int main (int,
char *[])}. An OS kernel would be a freestanding environment; a
program using the facilities of an operating system would normally be
in a hosted implementation.
@opindex ffreestanding
GCC aims towards being usable as a conforming freestanding
implementation, or as the compiler for a conforming hosted
implementation. By default, it will act as the compiler for a hosted
implementation, defining @code{__STDC_HOSTED__} as @code{1} and
presuming that when the names of ISO C functions are used, they have
the semantics defined in the standard. To make it act as a conforming
freestanding implementation for a freestanding environment, use the
option @option{-ffreestanding}; it will then define
@code{__STDC_HOSTED__} to @code{0} and not make assumptions about the
meanings of function names from the standard library. To build an OS
kernel, you may well still need to make your own arrangements for
linking and startup. @xref{C Dialect Options,,Options Controlling C
Dialect}.
GCC does not provide the library facilities required only of hosted
implementations, nor yet all the facilities required by C99 of
freestanding implementations; to use the facilities of a hosted
environment, you will need to find them elsewhere (for example, in the
GNU C library). @xref{Standard Libraries,,Standard Libraries}.
For references to Technical Corrigenda, Rationale documents and
information concerning the history of C that is available online, see
@uref{http://gcc.gnu.org/readings.html}
@c FIXME: details of C++ standard.
There is no formal written standard for Objective-C@. The most
authoritative manual is ``Object-Oriented Programming and the
Objective-C Language'', available at a number of web sites;
@uref{http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/} has a
recent version, while @uref{http://www.toodarkpark.org/computers/objc/}
is an older example. @uref{http://www.gnustep.org} includes useful
information as well.
@xref{Top, GNAT Reference Manual, About This Guide, gnat_rm,
GNAT Reference Manual}, for information on standard
conformance and compatibility of the Ada compiler.
@xref{References,,Language Definition References, chill, GNU Chill},
for details of the CHILL standard.
@xref{Language,,The GNU Fortran Language, g77, Using and Porting GNU
Fortran}, for details of the Fortran language supported by GCC@.
@xref{Compatibility,,Compatibility with the Java Platform, gcj, GNU gcj},
for details of compatibility between @code{gcj} and the Java Platform.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment