\input texinfo  @c -*-texinfo-*-
@setfilename gcc.info
@c @setfilename usegcc.info
@c To produce the full manual, use the "gcc.info" setfilename, and
@c make sure the following does NOT begin with '@c' (and the @clear line DOES)
@set INTERNALS
@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

@ifset INTERNALS
@settitle Using and Porting GNU CC
@end ifset
@ifclear INTERNALS
@settitle Using GNU CC
@end ifclear

@syncodeindex fn cp
@syncodeindex vr cp

@ifinfo
This file documents the use
@ifset INTERNALS
and the internals
@end ifset
of the GNU compiler.

Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

@ignore
Permission is granted to process this file through Tex and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).

@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
sections entitled ``GNU General Public License'' and ``Boycott'' are
included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that the sections entitled ``GNU General Public License'' and
``Boycott'', and this permission notice, may be included in translations
approved by the Free Software Foundation instead of in the original
English.
@end ifinfo

@setchapternewpage odd

@titlepage
@ifset INTERNALS
@center @titlefont{Using and Porting GNU CC}
@end ifset
@ifclear INTERNALS
@title Using GNU CC
@end ifclear
@sp 2
@center Richard M. Stallman
@sp 3
@center last updated 22 May 1992
@sp 1
@c The version number appears twice more in this file.
@center for version 2.2
@center (preliminary draft, which will change)
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1988, 1989, 1992 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
sections entitled ``GNU General Public License'' and ``Boycott'' are
included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that the sections entitled ``GNU General Public License'' and
``Boycott'', and this permission notice, may be included in translations
approved by the Free Software Foundation instead of in the original
English.
@end titlepage
@page

@ifinfo

@node Top, Copying,, (DIR)
@top Introduction
@cindex introduction

@ifset INTERNALS
This manual documents how to run, install and port the GNU C compiler, as
well as its new features and incompatibilities, and how to report bugs.
It corresponds to GNU CC version 2.2.
@end ifset

@ifclear INTERNALS
This manual documents how to run and install the GNU C compiler, as
well as its new features and incompatibilities, and how to report bugs.
It corresponds to GNU CC version 2.2.
@end ifclear

@end ifinfo
@ifset INTERNALS
@menu
* Copying::         GNU General Public License says
                     how you can copy and share GNU CC.
* Contributors::    People who have contributed to GNU CC.
* Boycott::	    Protect your freedom---fight ``look and feel''.
* Invoking GCC::    Command options supported by @samp{gcc}.
* Installation::    How to configure, compile and install GNU CC.
* Extensions::      GNU extensions to the C language.
* Trouble::         If you have trouble installing GNU CC.
* Bugs::            How, why and where to report bugs.
* Service::         How to find suppliers of support for GNU CC.
* VMS::             Using GNU CC on VMS.
* Portability::     Goals of GNU CC's portability features.
* Interface::       Function-call interface of GNU CC output.
* Passes::          Order of passes, what they do, and what each file is for.
* RTL::             The intermediate representation that most passes work on.
* Machine Desc::    How to write machine description instruction patterns.
* Target Macros::   How to write the machine description C macros.
* Config::          Writing the @file{xm-@var{machine}.h} file.
* Index::	    Index of concepts and symbol names.
@end menu
@end ifset
@ifclear INTERNALS
@menu
* Copying::         GNU General Public License says
                     how you can copy and share GNU CC.
* Contributors::    People who have contributed to GNU CC.
* Boycott::	    Protect your freedom---fight ``look and feel''.
* Invoking GCC::    Command options supported by @samp{gcc}.
* Installation::    How to configure, compile and install GNU CC.
* Extensions::      GNU extensions to the C language.
* Trouble::         If you have trouble installing GNU CC.
* Bugs::            How, why and where to report bugs.
* Service::         How to find suppliers of support for GNU CC.
* VMS::             Using GNU CC on VMS.
* Index::	    Index of concepts and symbol names.
@end menu
@end ifclear

@node Copying, Contributors, Top, Top
@unnumbered GNU GENERAL PUBLIC LICENSE
@center Version 2, June 1991

@display
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display

@unnumberedsec Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software---to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

@iftex
@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@end iftex
@ifinfo
@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@end ifinfo

@enumerate
@item
This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The ``Program'', below,
refers to any such program or work, and a ``work based on the Program''
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term ``modification''.)  Each licensee is addressed as ``you''.

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

@item
You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

@item
You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

@enumerate a
@item
You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.

@item
You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

@item
If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License.  (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
@end enumerate

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

@item
You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

@enumerate a
@item
Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

@item
Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

@item
Accompany it with the information you received as to the offer
to distribute corresponding source code.  (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
@end enumerate

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

@item
You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

@item
You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

@item
Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

@item
If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

@item
If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

@item
The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and ``any
later version'', you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

@item
If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

@iftex
@heading NO WARRANTY
@end iftex
@ifinfo
@center NO WARRANTY
@end ifinfo

@item
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

@item
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
@end enumerate

@iftex
@heading END OF TERMS AND CONDITIONS
@end iftex
@ifinfo
@center END OF TERMS AND CONDITIONS
@end ifinfo

@page
@unnumberedsec Appendix: How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the ``copyright'' line and a pointer to where the full notice is found.

@smallexample
@var{one line to give the program's name and a brief idea of what it does.}
Copyright (C) 19@var{yy}  @var{name of author}

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@end smallexample

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

@smallexample
Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@end smallexample

The hypothetical commands @samp{show w} and @samp{show c} should show
the appropriate parts of the General Public License.  Of course, the
commands you use may be called something other than @samp{show w} and
@samp{show c}; they could even be mouse-clicks or menu items---whatever
suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a ``copyright disclaimer'' for the program, if
necessary.  Here is a sample; alter the names:

@example
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

@var{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
@end example

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

@node Contributors, Boycott, Copying, Top
@unnumbered Contributors to GNU CC
@cindex contributors

In addition to Richard Stallman, several people have written parts
of GNU CC.

@itemize @bullet
@item
The idea of using RTL and some of the optimization ideas came from the
program PO written at the University of Arizona by Jack Davidson and
Christopher Fraser.  See ``Register Allocation and Exhaustive Peephole
Optimization'', Software Practice and Experience 14 (9), Sept. 1984,
857-866.

@item
Paul Rubin wrote most of the preprocessor.

@item
Leonard Tower wrote parts of the parser, RTL generator, and RTL
definitions, and of the Vax machine description.

@item
Ted Lemon wrote parts of the RTL reader and printer.

@item
Jim Wilson implemented loop strength reduction and some other
loop optimizations.

@item
Nobuyuki Hikichi of Software Research Associates, Tokyo, contributed
the support for the Sony NEWS machine.

@item
Charles LaBrec contributed the support for the Integrated Solutions
68020 system.

@item
Michael Tiemann of Cygnus Support wrote the front end for C++, as well
as the support for inline functions and instruction scheduling.  Also
the descriptions of the National Semiconductor 32000 series cpu, the
SPARC cpu and part of the Motorola 88000 cpu.

@item
Jan Stein of the Chalmers Computer Society provided support for
Genix, as well as part of the 32000 machine description.

@item
Randy Smith finished the Sun FPA support.

@item
Robert Brown implemented the support for Encore 32000 systems.

@item
David Kashtan of SRI adapted GNU CC to the Vomit-Making System (VMS).

@item
Alex Crain provided changes for the 3b1.

@item
Greg Satz and Chris Hanson assisted in making GNU CC work on HP-UX for
the 9000 series 300.

@item
William Schelter did most of the work on the Intel 80386 support.

@item
Christopher Smith did the port for Convex machines.

@item
Paul Petersen wrote the machine description for the Alliant FX/8.

@item
Alain Lichnewsky ported GNU CC to the Mips cpu.

@item
Devon Bowen, Dale Wiles and Kevin Zachmann ported GNU CC to the Tahoe.

@item
Jonathan Stone wrote the machine description for the Pyramid computer.

@item
Gary Miller ported GNU CC to Charles River Data Systems machines.

@item
Richard Kenner of New York University wrote the machine descriptions for
the AMD 29000, the IBM RT PC, and the IBM RS/6000 as well as the support
for instruction attributes.  He also made changes to better support RISC
processors including changes to common subexpression elimination,
strength reduction, function calling sequence handling, and condition
code support, in addition to generalizing the code for frame pointer
elimination.

@item
Richard Kenner and Michael Tiemann jointly developed reorg.c, the delay
slot scheduler.

@item
Mike Meissner and Tom Wood of Data General finished the port to the
Motorola 88000.

@item 
Masanobu Yuhara of Fujitsu Laboratories implemented the machine
description for the Tron architecture (specifically, the Gmicro).

@item
NeXT, Inc.@: donated the front end that supports the Objective C
language.
@c We need to be careful to make it clear that "Objective C"
@c is the name of a language, not that of a program or product.

@item
James van Artsdalen wrote the code that makes efficient use of
the Intel 80387 register stack.

@item
Mike Meissner at the Open Software Foundation finished the port to the
MIPS cpu, including adding ECOFF debug support.

@item
Ron Guilmette implemented the protoize and unprotoize tools, the support
for Dwarf symbolic debugging information, and much of the support for
System V Release 4.  He has also worked heavily on the Intel 386 and 860
support.

@item
Torbjorn Granlund of the Swedish Institute of Computer Science
implemented multiply-by-constant optimization and better long long
support, and improved leaf function register allocation.
@end itemize

@node Boycott
@chapter Protect Your Freedom---Fight ``Look And Feel''

@quotation
@i{This section is a political message from the League for Programming
Freedom to the users of GNU CC.  It is included here as an expression
of support for the League on the part of the Free Software Foundation.}
@end quotation

Apple and Lotus are trying to create a new form of legal monopoly: a
copyright on a class of user interfaces.  These monopolies would cause
serious problems for users and developers of computer software and
systems.  Xerox, too, has tried to make a monopoly for itself on window
systems; their suit against Apple was thrown out on a technicality, but
Xerox has not said anything to indicate it wouldn't try again.

Until a few years ago, the law seemed clear: no one could restrict
others from using a user interface; programmers were free to implement
any interface they chose.  Imitating interfaces, sometimes with changes,
was standard practice in the computer field.  The interfaces we know
evolved gradually in this way; for example, the Macintosh user interface
drew ideas from the Xerox interface, which in turn drew on work done at
Stanford and SRI.  1-2-3 imitated VisiCalc, and dBase imitated a
database program from JPL.

Most computer companies, and nearly all computer users, were happy with
this state of affairs.  The companies that are suing say it does not
offer ``enough incentive'' to develop their products, but they must have
considered it ``enough'' when they made their decision to do so.  It
seems they are not satisfied with the opportunity to continue to compete
in the marketplace---not even with a head start.

If companies like Xerox, Lotus, and Apple are permitted to make law
through the courts, the precedent will hobble the software industry:

@itemize @bullet
@item
Gratuitous incompatibilities will burden users.  Imagine if each
car manufacturer had to arrange the pedals in a different order.

@item
Software will become and remain more expensive.  Users will be
``locked in'' to proprietary interfaces, for which there is no real
competition.

@item
Large companies have an unfair advantage wherever lawsuits become
commonplace.  Since they can easily afford to sue, they can intimidate
small companies with threats even when they don't really have a case.

@item
User interface improvements will come slower, since incremental
evolution through creative imitation will no longer be permitted.

@item
Even Apple, etc., will find it harder to make improvements if
they can no longer adapt the good ideas that others introduce, for
fear of weakening their own legal positions.  Some users suggest that
this stagnation may already have started.

@item
If you use GNU software, you might find it of some concern that user
interface copyright will make it hard for the Free Software Foundation
to develop programs compatible with the interfaces that you already
know.
@end itemize

To protect our freedom from lawsuits like these, a group of programmers
and users have formed a new grass-roots political organization, the
League for Programming Freedom.

The purpose of the League is to oppose new monopolistic practices such
as user-interface copyright and software patents; it calls for a return
to the legal policies of the recent past, in which these practices were
not allowed.  The League is not concerned with free software as an
issue, and not affiliated with the Free Software Foundation.

The League's membership rolls include John McCarthy, inventor of Lisp,
Marvin Minsky, founder of the Artificial Intelligence lab, Guy L.
Steele, Jr., author of well-known books on Lisp and C, as well as
Richard Stallman, the developer of GNU CC.  Please join and add your
name to the list.  Membership dues in the League are $42 per year for
programmers, managers and professionals; $10.50 for students; $21 for
others.

The League needs both activist members and members who only pay their
dues.

To join, or for more information, phone (617) 492-0023 or write to:

@display
League for Programming Freedom
1 Kendall Square #143
P.O. Box 9171
Cambridge, MA 02139
@end display

You can also send electronic mail to @code{league@@prep.ai.mit.edu}.

Here are some suggestions from the League for things you can do to
protect your freedom to write programs:

@itemize @bullet
@item
Don't buy from Xerox, Lotus or Apple.  Buy from their competitors or
from the defendants they are suing.

@item
Don't develop software to work with the systems made by these companies.

@item
Port your existing software to competing systems, so that you encourage
users to switch.

@item
Write letters to company presidents to let them know their conduct
is unacceptable.

@item
Tell your friends and colleagues about this issue and how it threatens
to ruin the computer industry.

@item
Above all, don't work for the look-and-feel plaintiffs, and don't
accept contracts from them.

@item
Write to Congress to explain the importance of this issue.

@display
House Subcommittee on Intellectual Property
2137 Rayburn Bldg
Washington, DC 20515

Senate Subcommittee on Patents, Trademarks and Copyrights
United States Senate
Washington, DC 20510
@end display

(These committees have received lots of mail already; let's give them
even more.)
@end itemize

Express your opinion!  You can make a difference.

@include invoke.texi

@include install.texi

@include extend.texi

@node Trouble
@chapter Known Causes of Trouble with GNU CC
@cindex bugs, known
@cindex installation trouble
@cindex known causes of trouble

This section describes known problems that affect users of GNU CC.  Most
of these are not GNU CC bugs per se---if they were, we would fix them.
But the result for a user may be like the result of a bug.

Some of these problems are due to bugs in other software, some are
missing features that are too much work to add, and some are places
where people's opinions differ as to what is best.

@menu
* Actual Bugs::		      Bugs we will fix later.
* Installation Problems::     Problems that manifest when you install GNU CC.
* Cross-Compiler Problems::   Common problems of cross compiling with GNU CC.
* Interoperation::      Problems using GNU CC with other compilers,
			   and with certain linkers, assemblers and debuggers.
* Incompatibilities::   GNU CC is incompatible with traditional C.
* Disappointments::     Regrettable things we can't change, but not quite bugs.
* Non-bugs::		Things we think are right, but some others disagree.
@end menu

@node Actual Bugs
@section Actual Bugs We Haven't Fixed Yet

@itemize @bullet
@item
Loop unrolling doesn't work properly for certain programs.  This is
because of difficulty in updating the debugging information within the
loop being unrolled.  We plan to revamp the representation of debugging
information so that this will work properly, but we have not done this
in version 2.2 because we don't want to delay it any further.

@item
There is a bug in producing DBX output which outputs a structure tag
even when a structure doesn't have a tag.  The reason we aren't fixing
this now is that a clean fix requires reorganizations that seem risky.
We will do them after 2.2 is released.
@end itemize

@node Installation Problems
@section Installation Problems
	
This is a list of problems (and some apparent problems which don't
really mean anything is wrong) that show up during installation of GNU
CC.

@itemize @bullet
@item
On certain systems, defining certain environment variables such as
@code{CC} can interfere with the functioning of @code{make}.

@item
If you encounter seemingly strange errors when trying to build the
compiler in a directory other than the source directory, it could be
because you have previously configured the compiler in the source
directory.  Make sure you have done all the necessary preparations.
@xref{Other Dir}.

@item
In previous versions of GNU CC, the @code{gcc} driver program looked for
@code{as} and @code{ld} in various places such as files beginning with
@file{/usr/local/lib/gcc-}.  GNU CC version 2 looks for them in the
directory @file{/usr/local/lib/gcc-lib/@var{target}/@var{version}}.

Thus, to use a version of @code{as} or @code{ld} that is not the system
default, for example @code{gas} or GNU @code{ld}, you must put them in
that directory (or make links to them from that directory).

@item
Some commands executed when making the compiler may fail (return a
non-zero status) and be ignored by @code{make}.  These failures, which
are often due to files that were not found, are expected, and can safely
be ignored.

@item
It is normal to have warnings in compiling certain files about
unreachable code and about enumeration type clashes.  These files' names
begin with @samp{insn-}.

@item
Sometimes @code{make} recompiles parts of the compiler when installing
the compiler.  In one case, this was traced down to a bug in
@code{make}.  Either ignore the problem or switch to GNU Make.

@cindex @code{genflags}, crash on Sun 4
@item
Sometimes on a Sun 4 you may observe a crash in the program
@code{genflags} or @code{genoutput} while building GCC.  This is said to
be due to a bug in @code{sh}.  You can probably get around it by running
@code{genflags} or @code{genoutput} manually and then retrying the
@code{make}.

@item 
On some versions of Ultrix, the system supplied compiler cannot compile
@file{cp-parse.c} because it cannot handle so many cases in a
@code{switch} statement.  You can avoid this problem by specifying
@samp{LANGUAGES=c} when you compile GNU CC with the Ultrix compiler.
Then you can compile the entire GNU compiler with GNU CC.

@item
If you use the 1.31 version of the MIPS assembler (such as was shipped
with Ultrix 3.1), you will need to use the -fno-delayed-branch switch
when optimizing floating point code.  Otherwise, the assembler will
complain when the GCC compiler fills a branch delay slot with a
floating point instruction, such as add.d.

@item
Users have reported some problems with version 2.0 of the MIPS
compiler tools that were shipped with Ultrix 4.1.  Version 2.10
which came with Ultrix 4.2 seems to work fine.

@item
On HP 9000 series 300 or 400 running HP-UX release 8.0, there is a bug
in the assembler that must be fixed before GNU CC can be built.  This
bug manifests itself during the first stage of compilation, while
building @file{libgcc2.a}:

@example
_floatdisf
cc1: warning: `-g' option not supported on this version of GCC
cc1: warning: `-g1' option not supported on this version of GCC
./gcc: Internal compiler error: program as got fatal signal 11
@end example

A patched version of the assembler is available by anonymous ftp from
@code{altdorf.ai.mit.edu} as the file
@file{archive/cph/hpux-8.0-assembler}.  If you have HP software support,
the patch can also be obtained directly from HP, as described in the
following note:

@quotation
This is the patched assembler, to patch SR#1653-010439, where the
assembler aborts on floating point constants.

The bug is not really in the assembler, but in the shared library
version of the function ``cvtnum(3c)''.  The bug on ``cvtnum(3c)'' is
SR#4701-078451.  Anyway, the attached assembler uses the archive
library version of ``cvtnum(3c)'' and thus does not exhibit the bug.
@end quotation

This patch is also known as PHCO_0800.

@item
Another assembler problem on the HP PA results in an error message like
this while compiling part of @file{libgcc2.a}:

@example
as: /usr/tmp/cca08196.s @@line#30 [err#1060]
  Argument 1 or 3 in FARG upper
         - lookahead = RTNVAL=GR
@end example

This happens because HP changed the assembler syntax after system
release 8.02.  GNU CC assumes the newer syntax; if your assembler wants
the older syntax, comment out this line in the file @file{pa1-hpux.h}:

@example
#define HP_FP_ARG_DESCRIPTOR_REVERSED
@end example

@item
Some versions of the Pyramid C compiler are reported to be unable to
compile GNU CC.  You must use an older version of GNU CC for
bootstrapping.  One indication of this problem is if you get a crash
when GNU CC compiles the function @code{muldi3} in file @file{libgcc2.c}.

You may be able to succeed by getting GNU CC version 1, installing it,
and using it to compile GNU CC version 2.  The bug in the Pyramid C
compiler does not seem to affect GNU CC version 1.

@item
On the Tower models 4@var{n}0 and 6@var{n}0, by default a process is not
allowed to have more than one megabyte of memory.  GNU CC cannot compile
itself (or many other programs) with @samp{-O} in that much memory.

To solve this problem, reconfigure the kernel adding the following line
to the configuration file:

@example
MAXUMEM = 4096
@end example

@item
On the Altos 3068, programs compiled with GNU CC won't work unless you
fix a kernel bug.  This happens using system versions V.2.2 1.0gT1 and
V.2.2 1.0e and perhaps later versions as well.  See the file
@file{README.ALTOS}.
@end itemize

@node Cross-Compiler Problems
@section Cross-Compiler Problems

@itemize @bullet
@item
Cross compilation can run into trouble for certain machines because
some target machines' assemblers require floating point numbers to be
written as @emph{integer} constants in certain contexts.

The compiler writes these integer constants by examining the floating
point value as an integer and printing that integer, because this is
simple to write and independent of the details of the floating point
representation.  But this does not work if the compiler is running on
a different machine with an incompatible floating point format, or
even a different byte-ordering.

In addition, correct constant folding of floating point values
requires representing them in the target machine's format.
(The C standard does not quite require this, but in practice
it is the only way to win.)

@ifset INTERNALS
It is now possible to overcome these problems by defining macros such
as @code{REAL_VALUE_TYPE}.  But doing so is a substantial amount of
work for each target machine.  @xref{Cross-compilation}.
@end ifset
@ifclear INTERNALS
It is now possible to overcome these problems by defining macros such
as @code{REAL_VALUE_TYPE}.  But doing so is a substantial amount of
work for each target machine.  @xref{Cross-compilation,,Cross
Compilation and Floating Point Format, gcc.info, Using and Porting GCC}.
@end ifclear

@item
At present, the program @file{mips-tfile} which adds debug
support to object files on MIPS systems does not work in a cross
compile environment.
@end itemize

@node Interoperation
@section Interoperation

This section lists various difficulties encountered in using GNU C or
GNU C++ together with other compilers or with the assemblers, linkers
and debuggers on certain systems.

@itemize @bullet
@item
GNU C normally compiles functions to return small structures and unions
in registers.  Most other compilers arrange to return them just like
larger structures and unions.  This can lead to trouble when you link
together code compiled by different compilers. To avoid the problem, you
can use the option @samp{-fpcc-struct-value} when compiling with GNU CC.

@item
GNU C++ does not do name mangling in the same way as other C++
compilers.  This means that object files compiled with one compiler
cannot be used with another.

GNU C++ also uses different techniques for arranging virtual function
tables and the layout of class instances.  In general, therefore,
linking code compiled with different C++ compilers does not work.

@item
Older GDB versions sometimes fail to read the output of GNU CC version
2.  If you have trouble, get GDB version 4.4 or later.

@item
@cindex DBX
DBX rejects some files produced by GNU CC, though it accepts similar
constructs in output from PCC.  Until someone can supply a coherent
description of what is valid DBX input and what is not, there is
nothing I can do about these problems.  You are on your own.

@item
The GNU assembler (GAS) does not support PIC.  To generate PIC code, you
must use some other assembler, such as @file{/bin/as}.

@item
On some BSD systems including some versions of Ultrix, use of profiling
causes static variable destructors (currently used only in C++) not to
be run.

@ignore
@cindex @code{vfork}, for the Sun-4
@item
There is a bug in @code{vfork} on the Sun-4 which causes the registers
of the child process to clobber those of the parent.  Because of this,
programs that call @code{vfork} are likely to lose when compiled
optimized with GNU CC when the child code alters registers which contain
C variables in the parent.  This affects variables which are live in the
parent across the call to @code{vfork}.

If you encounter this, you can work around the problem by declaring
variables @code{volatile} in the function that calls @code{vfork}, until
the problem goes away, or by not declaring them @code{register} and not
using @samp{-O} for those source files.
@end ignore

@item
On a Sun, linking using GNU CC fails to find a shared library and
reports that the library doesn't exist at all.

This happens if you are using the GNU linker, because it does only
static linking and looks only for unshared libraries.  If you have a
shared library with no unshared counterpart, the GNU linker won't find
anything.

We hope to make a linker which supports Sun shared libraries, but please
don't ask when it will be finished---we don't know.

@item
Sun forgot to include a static version of @file{libdl.a} with some
versions of SunOS (mainly 4.1).  This results in undefined symbols when
linking static binaries (that is, if you use @samp{-static}).  If you
see undefined symbols @code{_dlclose}, @code{_dlsym} or @code{_dlopen}
when linking, compile and link against the file
@file{mit/util/misc/dlsym.c} from the MIT version of X windows.

@item
On the HP PA machine, ADB sometimes fails to work on functions compiled
with GNU CC.  Specifically, it fails to work on functions that use
@code{alloca} or variable-size arrays.  This is because GNU CC doesn't
generate HPUX unwind descriptors for such functions.  It may even be
impossible to generate them.

@item 
Profiling is not supported on the HP PA machine.  Neither is debugging
(@samp{-g}), unless you use the preliminary GNU tools
(@pxref{Installation}).

@item
GNU CC on the HP PA handles variadic function arguments using a calling
convention incompatible with the HP compiler.  This is only a problem
for routines that take @code{va_list} as parameters, such as
@code{vprintf}.  This may be fixed eventually.

@item
The current version of the assembler (@file{/bin/as}) for the RS/6000
has certain problems that prevent the @samp{-g} option in GCC from
working.

IBM has produced a fixed version of the assembler.  The replacement
assembler is not a standard component of either AIX 3.1.5 or AIX 3.2,
but is expected to become standard in a future distribution.  This
assembler is available from IBM as APAR IX22829.  Yet more bugs have
been fixed in a newer assembler, which will shortly be available as APAR
IX26107.  See the file @file{README.RS6000} for more details on these
assemblers.

@item
On the IBM RS/6000, compiling code of the form

@example
extern int foo;

@dots{} foo @dots{}

static int foo;
@end example

@noindent
will cause the linker to report an undefined symbol @code{foo}.
Although this behavior differs from most other systems, it is not a
bug because redefining an @code{extern} variable as @code{static}
is undefined in ANSI C.

@item
On VMS, GAS versions 1.38.1 and earlier may cause spurious warning
messages from the linker.  These warning mess