home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / gcc-2.5.8-bin.lha / info / gcc.info-1 (.txt) < prev    next >
GNU Info File  |  1994-02-21  |  50KB  |  896 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License" and "Protect
  13. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  14. original, and provided that the entire resulting derived work is
  15. distributed under the terms of a permission notice identical to this
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that the sections entitled "GNU General Public
  19. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  20. permission notice, may be included in translations approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: gcc.info,  Node: Top,  Next: Copying,  Up: (DIR)
  23. Introduction
  24. ************
  25.    This manual documents how to run, install and port the GNU compiler,
  26. as well as its new features and incompatibilities, and how to report
  27. bugs.  It corresponds to GNU CC version 2.5.
  28. * Menu:
  29. * Copying::         GNU General Public License says
  30.                      how you can copy and share GNU CC.
  31. * Contributors::    People who have contributed to GNU CC.
  32. * Boycott::        Protect your freedom--fight "look and feel".
  33. * G++ and GCC::     You can compile C or C++ programs.
  34. * Invoking GCC::    Command options supported by `gcc'.
  35. * Installation::    How to configure, compile and install GNU CC.
  36. * C Extensions::    GNU extensions to the C language family.
  37. * C++ Extensions::  GNU extensions to the C++ language.
  38. * Trouble::         If you have trouble installing GNU CC.
  39. * Bugs::            How, why and where to report bugs.
  40. * Service::         How to find suppliers of support for GNU CC.
  41. * VMS::             Using GNU CC on VMS.
  42. * Portability::     Goals of GNU CC's portability features.
  43. * Interface::       Function-call interface of GNU CC output.
  44. * Passes::          Order of passes, what they do, and what each file is for.
  45. * RTL::             The intermediate representation that most passes work on.
  46. * Machine Desc::    How to write machine description instruction patterns.
  47. * Target Macros::   How to write the machine description C macros.
  48. * Config::          Writing the `xm-MACHINE.h' file.
  49. * Index::        Index of concepts and symbol names.
  50. File: gcc.info,  Node: Copying,  Next: Contributors,  Prev: Top,  Up: Top
  51. GNU GENERAL PUBLIC LICENSE
  52. **************************
  53.                          Version 2, June 1991
  54.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  55.      675 Mass Ave, Cambridge, MA 02139, USA
  56.      
  57.      Everyone is permitted to copy and distribute verbatim copies
  58.      of this license document, but changing it is not allowed.
  59. Preamble
  60. ========
  61.    The licenses for most software are designed to take away your
  62. freedom to share and change it.  By contrast, the GNU General Public
  63. License is intended to guarantee your freedom to share and change free
  64. software--to make sure the software is free for all its users.  This
  65. General Public License applies to most of the Free Software
  66. Foundation's software and to any other program whose authors commit to
  67. using it.  (Some other Free Software Foundation software is covered by
  68. the GNU Library General Public License instead.)  You can apply it to
  69. your programs, too.
  70.    When we speak of free software, we are referring to freedom, not
  71. price.  Our General Public Licenses are designed to make sure that you
  72. have the freedom to distribute copies of free software (and charge for
  73. this service if you wish), that you receive source code or can get it
  74. if you want it, that you can change the software or use pieces of it in
  75. new free programs; and that you know you can do these things.
  76.    To protect your rights, we need to make restrictions that forbid
  77. anyone to deny you these rights or to ask you to surrender the rights.
  78. These restrictions translate to certain responsibilities for you if you
  79. distribute copies of the software, or if you modify it.
  80.    For example, if you distribute copies of such a program, whether
  81. gratis or for a fee, you must give the recipients all the rights that
  82. you have.  You must make sure that they, too, receive or can get the
  83. source code.  And you must show them these terms so they know their
  84. rights.
  85.    We protect your rights with two steps: (1) copyright the software,
  86. and (2) offer you this license which gives you legal permission to copy,
  87. distribute and/or modify the software.
  88.    Also, for each author's protection and ours, we want to make certain
  89. that everyone understands that there is no warranty for this free
  90. software.  If the software is modified by someone else and passed on, we
  91. want its recipients to know that what they have is not the original, so
  92. that any problems introduced by others will not reflect on the original
  93. authors' reputations.
  94.    Finally, any free program is threatened constantly by software
  95. patents.  We wish to avoid the danger that redistributors of a free
  96. program will individually obtain patent licenses, in effect making the
  97. program proprietary.  To prevent this, we have made it clear that any
  98. patent must be licensed for everyone's free use or not licensed at all.
  99.    The precise terms and conditions for copying, distribution and
  100. modification follow.
  101.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  102.   0. This License applies to any program or other work which contains a
  103.      notice placed by the copyright holder saying it may be distributed
  104.      under the terms of this General Public License.  The "Program",
  105.      below, refers to any such program or work, and a "work based on
  106.      the Program" means either the Program or any derivative work under
  107.      copyright law: that is to say, a work containing the Program or a
  108.      portion of it, either verbatim or with modifications and/or
  109.      translated into another language.  (Hereinafter, translation is
  110.      included without limitation in the term "modification".)  Each
  111.      licensee is addressed as "you".
  112.      Activities other than copying, distribution and modification are
  113.      not covered by this License; they are outside its scope.  The act
  114.      of running the Program is not restricted, and the output from the
  115.      Program is covered only if its contents constitute a work based on
  116.      the Program (independent of having been made by running the
  117.      Program).  Whether that is true depends on what the Program does.
  118.   1. You may copy and distribute verbatim copies of the Program's
  119.      source code as you receive it, in any medium, provided that you
  120.      conspicuously and appropriately publish on each copy an appropriate
  121.      copyright notice and disclaimer of warranty; keep intact all the
  122.      notices that refer to this License and to the absence of any
  123.      warranty; and give any other recipients of the Program a copy of
  124.      this License along with the Program.
  125.      You may charge a fee for the physical act of transferring a copy,
  126.      and you may at your option offer warranty protection in exchange
  127.      for a fee.
  128.   2. You may modify your copy or copies of the Program or any portion
  129.      of it, thus forming a work based on the Program, and copy and
  130.      distribute such modifications or work under the terms of Section 1
  131.      above, provided that you also meet all of these conditions:
  132.        a. You must cause the modified files to carry prominent notices
  133.           stating that you changed the files and the date of any change.
  134.        b. You must cause any work that you distribute or publish, that
  135.           in whole or in part contains or is derived from the Program
  136.           or any part thereof, to be licensed as a whole at no charge
  137.           to all third parties under the terms of this License.
  138.        c. If the modified program normally reads commands interactively
  139.           when run, you must cause it, when started running for such
  140.           interactive use in the most ordinary way, to print or display
  141.           an announcement including an appropriate copyright notice and
  142.           a notice that there is no warranty (or else, saying that you
  143.           provide a warranty) and that users may redistribute the
  144.           program under these conditions, and telling the user how to
  145.           view a copy of this License.  (Exception: if the Program
  146.           itself is interactive but does not normally print such an
  147.           announcement, your work based on the Program is not required
  148.           to print an announcement.)
  149.      These requirements apply to the modified work as a whole.  If
  150.      identifiable sections of that work are not derived from the
  151.      Program, and can be reasonably considered independent and separate
  152.      works in themselves, then this License, and its terms, do not
  153.      apply to those sections when you distribute them as separate
  154.      works.  But when you distribute the same sections as part of a
  155.      whole which is a work based on the Program, the distribution of
  156.      the whole must be on the terms of this License, whose permissions
  157.      for other licensees extend to the entire whole, and thus to each
  158.      and every part regardless of who wrote it.
  159.      Thus, it is not the intent of this section to claim rights or
  160.      contest your rights to work written entirely by you; rather, the
  161.      intent is to exercise the right to control the distribution of
  162.      derivative or collective works based on the Program.
  163.      In addition, mere aggregation of another work not based on the
  164.      Program with the Program (or with a work based on the Program) on
  165.      a volume of a storage or distribution medium does not bring the
  166.      other work under the scope of this License.
  167.   3. You may copy and distribute the Program (or a work based on it,
  168.      under Section 2) in object code or executable form under the terms
  169.      of Sections 1 and 2 above provided that you also do one of the
  170.      following:
  171.        a. Accompany it with the complete corresponding machine-readable
  172.           source code, which must be distributed under the terms of
  173.           Sections 1 and 2 above on a medium customarily used for
  174.           software interchange; or,
  175.        b. Accompany it with a written offer, valid for at least three
  176.           years, to give any third party, for a charge no more than your
  177.           cost of physically performing source distribution, a complete
  178.           machine-readable copy of the corresponding source code, to be
  179.           distributed under the terms of Sections 1 and 2 above on a
  180.           medium customarily used for software interchange; or,
  181.        c. Accompany it with the information you received as to the offer
  182.           to distribute corresponding source code.  (This alternative is
  183.           allowed only for noncommercial distribution and only if you
  184.           received the program in object code or executable form with
  185.           such an offer, in accord with Subsection b above.)
  186.      The source code for a work means the preferred form of the work for
  187.      making modifications to it.  For an executable work, complete
  188.      source code means all the source code for all modules it contains,
  189.      plus any associated interface definition files, plus the scripts
  190.      used to control compilation and installation of the executable.
  191.      However, as a special exception, the source code distributed need
  192.      not include anything that is normally distributed (in either
  193.      source or binary form) with the major components (compiler,
  194.      kernel, and so on) of the operating system on which the executable
  195.      runs, unless that component itself accompanies the executable.
  196.      If distribution of executable or object code is made by offering
  197.      access to copy from a designated place, then offering equivalent
  198.      access to copy the source code from the same place counts as
  199.      distribution of the source code, even though third parties are not
  200.      compelled to copy the source along with the object code.
  201.   4. You may not copy, modify, sublicense, or distribute the Program
  202.      except as expressly provided under this License.  Any attempt
  203.      otherwise to copy, modify, sublicense or distribute the Program is
  204.      void, and will automatically terminate your rights under this
  205.      License.  However, parties who have received copies, or rights,
  206.      from you under this License will not have their licenses
  207.      terminated so long as such parties remain in full compliance.
  208.   5. You are not required to accept this License, since you have not
  209.      signed it.  However, nothing else grants you permission to modify
  210.      or distribute the Program or its derivative works.  These actions
  211.      are prohibited by law if you do not accept this License.
  212.      Therefore, by modifying or distributing the Program (or any work
  213.      based on the Program), you indicate your acceptance of this
  214.      License to do so, and all its terms and conditions for copying,
  215.      distributing or modifying the Program or works based on it.
  216.   6. Each time you redistribute the Program (or any work based on the
  217.      Program), the recipient automatically receives a license from the
  218.      original licensor to copy, distribute or modify the Program
  219.      subject to these terms and conditions.  You may not impose any
  220.      further restrictions on the recipients' exercise of the rights
  221.      granted herein.  You are not responsible for enforcing compliance
  222.      by third parties to this License.
  223.   7. If, as a consequence of a court judgment or allegation of patent
  224.      infringement or for any other reason (not limited to patent
  225.      issues), conditions are imposed on you (whether by court order,
  226.      agreement or otherwise) that contradict the conditions of this
  227.      License, they do not excuse you from the conditions of this
  228.      License.  If you cannot distribute so as to satisfy simultaneously
  229.      your obligations under this License and any other pertinent
  230.      obligations, then as a consequence you may not distribute the
  231.      Program at all.  For example, if a patent license would not permit
  232.      royalty-free redistribution of the Program by all those who
  233.      receive copies directly or indirectly through you, then the only
  234.      way you could satisfy both it and this License would be to refrain
  235.      entirely from distribution of the Program.
  236.      If any portion of this section is held invalid or unenforceable
  237.      under any particular circumstance, the balance of the section is
  238.      intended to apply and the section as a whole is intended to apply
  239.      in other circumstances.
  240.      It is not the purpose of this section to induce you to infringe any
  241.      patents or other property right claims or to contest validity of
  242.      any such claims; this section has the sole purpose of protecting
  243.      the integrity of the free software distribution system, which is
  244.      implemented by public license practices.  Many people have made
  245.      generous contributions to the wide range of software distributed
  246.      through that system in reliance on consistent application of that
  247.      system; it is up to the author/donor to decide if he or she is
  248.      willing to distribute software through any other system and a
  249.      licensee cannot impose that choice.
  250.      This section is intended to make thoroughly clear what is believed
  251.      to be a consequence of the rest of this License.
  252.   8. If the distribution and/or use of the Program is restricted in
  253.      certain countries either by patents or by copyrighted interfaces,
  254.      the original copyright holder who places the Program under this
  255.      License may add an explicit geographical distribution limitation
  256.      excluding those countries, so that distribution is permitted only
  257.      in or among countries not thus excluded.  In such case, this
  258.      License incorporates the limitation as if written in the body of
  259.      this License.
  260.   9. The Free Software Foundation may publish revised and/or new
  261.      versions of the General Public License from time to time.  Such
  262.      new versions will be similar in spirit to the present version, but
  263.      may differ in detail to address new problems or concerns.
  264.      Each version is given a distinguishing version number.  If the
  265.      Program specifies a version number of this License which applies
  266.      to it and "any later version", you have the option of following
  267.      the terms and conditions either of that version or of any later
  268.      version published by the Free Software Foundation.  If the Program
  269.      does not specify a version number of this License, you may choose
  270.      any version ever published by the Free Software Foundation.
  271.  10. If you wish to incorporate parts of the Program into other free
  272.      programs whose distribution conditions are different, write to the
  273.      author to ask for permission.  For software which is copyrighted
  274.      by the Free Software Foundation, write to the Free Software
  275.      Foundation; we sometimes make exceptions for this.  Our decision
  276.      will be guided by the two goals of preserving the free status of
  277.      all derivatives of our free software and of promoting the sharing
  278.      and reuse of software generally.
  279.                                 NO WARRANTY
  280.  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  281.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  282.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  283.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  284.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  285.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  286.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  287.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  288.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  289.      SERVICING, REPAIR OR CORRECTION.
  290.  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  291.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  292.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  293.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  294.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  295.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  296.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  297.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  298.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  299.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  300.                       END OF TERMS AND CONDITIONS
  301. How to Apply These Terms to Your New Programs
  302. =============================================
  303.    If you develop a new program, and you want it to be of the greatest
  304. possible use to the public, the best way to achieve this is to make it
  305. free software which everyone can redistribute and change under these
  306. terms.
  307.    To do so, attach the following notices to the program.  It is safest
  308. to attach them to the start of each source file to most effectively
  309. convey the exclusion of warranty; and each file should have at least
  310. the "copyright" line and a pointer to where the full notice is found.
  311.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  312.      Copyright (C) 19YY  NAME OF AUTHOR
  313.      
  314.      This program is free software; you can redistribute it and/or modify
  315.      it under the terms of the GNU General Public License as published by
  316.      the Free Software Foundation; either version 2 of the License, or
  317.      (at your option) any later version.
  318.      
  319.      This program is distributed in the hope that it will be useful,
  320.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  321.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  322.      GNU General Public License for more details.
  323.      
  324.      You should have received a copy of the GNU General Public License
  325.      along with this program; if not, write to the Free Software
  326.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  327.    Also add information on how to contact you by electronic and paper
  328. mail.
  329.    If the program is interactive, make it output a short notice like
  330. this when it starts in an interactive mode:
  331.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  332.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  333.      type `show w'.
  334.      This is free software, and you are welcome to redistribute it
  335.      under certain conditions; type `show c' for details.
  336.    The hypothetical commands `show w' and `show c' should show the
  337. appropriate parts of the General Public License.  Of course, the
  338. commands you use may be called something other than `show w' and `show
  339. c'; they could even be mouse-clicks or menu items--whatever suits your
  340. program.
  341.    You should also get your employer (if you work as a programmer) or
  342. your school, if any, to sign a "copyright disclaimer" for the program,
  343. if necessary.  Here is a sample; alter the names:
  344.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  345.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  346.      
  347.      SIGNATURE OF TY COON, 1 April 1989
  348.      Ty Coon, President of Vice
  349.    This General Public License does not permit incorporating your
  350. program into proprietary programs.  If your program is a subroutine
  351. library, you may consider it more useful to permit linking proprietary
  352. applications with the library.  If this is what you want to do, use the
  353. GNU Library General Public License instead of this License.
  354. File: gcc.info,  Node: Contributors,  Next: Boycott,  Prev: Copying,  Up: Top
  355. Contributors to GNU CC
  356. **********************
  357.    In addition to Richard Stallman, several people have written parts
  358. of GNU CC.
  359.    * The idea of using RTL and some of the optimization ideas came from
  360.      the program PO written at the University of Arizona by Jack
  361.      Davidson and Christopher Fraser.  See "Register Allocation and
  362.      Exhaustive Peephole Optimization", Software Practice and
  363.      Experience 14 (9), Sept. 1984, 857-866.
  364.    * Paul Rubin wrote most of the preprocessor.
  365.    * Leonard Tower wrote parts of the parser, RTL generator, and RTL
  366.      definitions, and of the Vax machine description.
  367.    * Ted Lemon wrote parts of the RTL reader and printer.
  368.    * Jim Wilson implemented loop strength reduction and some other loop
  369.      optimizations.
  370.    * Nobuyuki Hikichi of Software Research Associates, Tokyo,
  371.      contributed the support for the Sony NEWS machine.
  372.    * Charles LaBrec contributed the support for the Integrated Solutions
  373.      68020 system.
  374.    * Michael Tiemann of Cygnus Support wrote the front end for C++, as
  375.      well as the support for inline functions and instruction
  376.      scheduling.  Also the descriptions of the National Semiconductor
  377.      32000 series cpu, the SPARC cpu and part of the Motorola 88000 cpu.
  378.    * Jan Stein of the Chalmers Computer Society provided support for
  379.      Genix, as well as part of the 32000 machine description.
  380.    * Randy Smith finished the Sun FPA support.
  381.    * Robert Brown implemented the support for Encore 32000 systems.
  382.    * David Kashtan of SRI adapted GNU CC to the Vomit-Making System
  383.      (VMS).
  384.    * Alex Crain provided changes for the 3b1.
  385.    * Greg Satz and Chris Hanson assisted in making GNU CC work on HP-UX
  386.      for the 9000 series 300.
  387.    * William Schelter did most of the work on the Intel 80386 support.
  388.    * Christopher Smith did the port for Convex machines.
  389.    * Paul Petersen wrote the machine description for the Alliant FX/8.
  390.    * Alain Lichnewsky ported GNU CC to the Mips cpu.
  391.    * Devon Bowen, Dale Wiles and Kevin Zachmann ported GNU CC to the
  392.      Tahoe.
  393.    * Jonathan Stone wrote the machine description for the Pyramid
  394.      computer.
  395.    * Gary Miller ported GNU CC to Charles River Data Systems machines.
  396.    * Richard Kenner of the New York University Ultracomputer Research
  397.      Laboratory wrote the machine descriptions for the AMD 29000, the
  398.      DEC Alpha, the IBM RT PC, and the IBM RS/6000 as well as the
  399.      support for instruction attributes.  He also made changes to
  400.      better support RISC processors including changes to common
  401.      subexpression elimination, strength reduction, function calling
  402.      sequence handling, and condition code support, in addition to
  403.      generalizing the code for frame pointer elimination.
  404.    * Richard Kenner and Michael Tiemann jointly developed reorg.c, the
  405.      delay slot scheduler.
  406.    * Mike Meissner and Tom Wood of Data General finished the port to the
  407.      Motorola 88000.
  408.    * Masanobu Yuhara of Fujitsu Laboratories implemented the machine
  409.      description for the Tron architecture (specifically, the Gmicro).
  410.    * NeXT, Inc. donated the front end that supports the Objective C
  411.      language.
  412.    * James van Artsdalen wrote the code that makes efficient use of the
  413.      Intel 80387 register stack.
  414.    * Mike Meissner at the Open Software Foundation finished the port to
  415.      the MIPS cpu, including adding ECOFF debug support.
  416.    * Ron Guilmette implemented the `protoize' and `unprotoize' tools,
  417.      the support for Dwarf symbolic debugging information, and much of
  418.      the support for System V Release 4.  He has also worked heavily on
  419.      the Intel 386 and 860 support.
  420.    * Torbjorn Granlund of the Swedish Institute of Computer Science
  421.      implemented multiply-by-constant optimization and better long long
  422.      support, and improved leaf function register allocation.
  423.    * Mike Stump implemented the support for Elxsi 64 bit CPU.
  424.    * John Wehle added the machine description for the Western Electric
  425.      32000 processor used in several 3b series machines (no relation to
  426.      the National Semiconductor 32000 processor).
  427.    * Holger Teutsch provided the support for the Clipper cpu.
  428.    * Kresten Krab Thorup wrote the run time support for the Objective C
  429.      language.
  430.    * Stephen Moshier contributed the floating point emulator that
  431.      assists in cross-compilation and permits support for floating
  432.      point numbers wider than 64 bits.
  433.    * David Edelsohn contributed the changes to RS/6000 port to make it
  434.      support the PowerPC and POWER2 architectures.
  435.    * Steve Chamberlain wrote the support for the Hitachi SH processor.
  436.    * Peter Schauer wrote the code to allow debugging to work on the
  437.      Alpha.
  438. File: gcc.info,  Node: Boycott,  Next: G++ and GCC,  Prev: Contributors,  Up: Top
  439. Protect Your Freedom--Fight "Look And Feel"
  440. *******************************************
  441.      This section is a political message from the League for Programming
  442.      Freedom to the users of GNU CC.  It is included here as an
  443.      expression of support for the League on the part of the Free
  444.      Software Foundation.
  445.    Apple and Lotus are trying to create a new form of legal monopoly: a
  446. copyright on a class of user interfaces.  These monopolies would cause
  447. serious problems for users and developers of computer software and
  448. systems.  Xerox, too, has tried to make a monopoly for itself on window
  449. systems; their suit against Apple was thrown out on a technicality, but
  450. Xerox has not said anything to indicate it wouldn't try again.
  451.    Until a few years ago, the law seemed clear: no one could restrict
  452. others from using a user interface; programmers were free to implement
  453. any interface they chose.  Imitating interfaces, sometimes with changes,
  454. was standard practice in the computer field.  The interfaces we know
  455. evolved gradually in this way; for example, the Macintosh user interface
  456. drew ideas from the Xerox interface, which in turn drew on work done at
  457. Stanford and SRI.  1-2-3 imitated VisiCalc, and dBase imitated a
  458. database program from JPL.
  459.    Most computer companies, and nearly all computer users, were happy
  460. with this state of affairs.  The companies that are suing say it does
  461. not offer "enough incentive" to develop their products, but they must
  462. have considered it "enough" when they made their decision to do so.  It
  463. seems they are not satisfied with the opportunity to continue to compete
  464. in the marketplace--not even with a head start.
  465.    If companies like Xerox, Lotus, and Apple are permitted to make law
  466. through the courts, the precedent will hobble the software industry:
  467.    * Gratuitous incompatibilities will burden users.  Imagine if each
  468.      car manufacturer had to arrange the pedals in a different order.
  469.    * Software will become and remain more expensive.  Users will be
  470.      "locked in" to proprietary interfaces, for which there is no real
  471.      competition.
  472.    * Large companies have an unfair advantage wherever lawsuits become
  473.      commonplace.  Since they can easily afford to sue, they can
  474.      intimidate small companies with threats even when they don't
  475.      really have a case.
  476.    * User interface improvements will come slower, since incremental
  477.      evolution through creative imitation will no longer be permitted.
  478.    * Even Apple, etc., will find it harder to make improvements if they
  479.      can no longer adapt the good ideas that others introduce, for fear
  480.      of weakening their own legal positions.  Some users suggest that
  481.      this stagnation may already have started.
  482.    * If you use GNU software, you might find it of some concern that
  483.      user interface copyright will make it hard for the Free Software
  484.      Foundation to develop programs compatible with the interfaces that
  485.      you already know.
  486.    To protect our freedom from lawsuits like these, a group of
  487. programmers and users have formed a new grass-roots political
  488. organization, the League for Programming Freedom.
  489.    The purpose of the League is to oppose new monopolistic practices
  490. such as user-interface copyright and software patents; it calls for a
  491. return to the legal policies of the recent past, in which these
  492. practices were not allowed.  The League is not concerned with free
  493. software as an issue, and not affiliated with the Free Software
  494. Foundation.
  495.    The League's membership rolls include John McCarthy, inventor of
  496. Lisp, Marvin Minsky, founder of the Artificial Intelligence lab, Guy L.
  497. Steele, Jr., author of well-known books on Lisp and C, as well as
  498. Richard Stallman, the developer of GNU CC.  Please join and add your
  499. name to the list.  Membership dues in the League are $42 per year for
  500. programmers, managers and professionals; $10.50 for students; $21 for
  501. others.
  502.    The League needs both activist members and members who only pay their
  503. dues.
  504.    To join, or for more information, phone (617) 243-4091 or write to:
  505.      League for Programming Freedom
  506.      1 Kendall Square #143
  507.      P.O. Box 9171
  508.      Cambridge, MA 02139
  509.    You can also send electronic mail to `league@prep.ai.mit.edu'.
  510.    Here are some suggestions from the League for things you can do to
  511. protect your freedom to write programs:
  512.    * Don't buy from Xerox, Lotus or Apple.  Buy from their competitors
  513.      or from the defendants they are suing.
  514.    * Don't develop software to work with the systems made by these
  515.      companies.
  516.    * Port your existing software to competing systems, so that you
  517.      encourage users to switch.
  518.    * Write letters to company presidents to let them know their conduct
  519.      is unacceptable.
  520.    * Tell your friends and colleagues about this issue and how it
  521.      threatens to ruin the computer industry.
  522.    * Above all, don't work for the look-and-feel plaintiffs, and don't
  523.      accept contracts from them.
  524.    * Write to Congress to explain the importance of this issue.
  525.           House Subcommittee on Intellectual Property
  526.           2137 Rayburn Bldg
  527.           Washington, DC 20515
  528.           
  529.           Senate Subcommittee on Patents, Trademarks and Copyrights
  530.           United States Senate
  531.           Washington, DC 20510
  532.      (These committees have received lots of mail already; let's give
  533.      them even more.)
  534.    Express your opinion!  You can make a difference.
  535. File: gcc.info,  Node: G++ and GCC,  Next: Invoking GCC,  Prev: Boycott,  Up: Top
  536. Compile C, C++, or Objective C
  537. ******************************
  538.    The C, C++, and Objective C versions of the compiler are integrated;
  539. the GNU C compiler can compile programs written in C, C++, or Objective
  540.    "GCC" is a common shorthand term for the GNU C compiler.  This is
  541. both the most general name for the compiler, and the name used when the
  542. emphasis is on compiling C programs.
  543.    When referring to C++ compilation, it is usual to call the compiler
  544. "G++".  Since there is only one compiler, it is also accurate to call
  545. it "GCC" no matter what the language context; however, the term "G++"
  546. is more useful when the emphasis is on compiling C++ programs.
  547.    G++ is a *compiler*, not merely a preprocessor.  G++ builds object
  548. code directly from your C++ program source.  There is no intermediate C
  549. version of the program.  (By contrast, for example, some other
  550. implementations use a program that generates a C program from your C++
  551. source.)  Avoiding an intermediate C representation of the program means
  552. that you get better object code, and better debugging information.  The
  553. GNU debugger, GDB, works with this information in the object code to
  554. give you comprehensive C++ source-level editing capabilities (*note C
  555. and C++: (gdb.info)C.).
  556. File: gcc.info,  Node: Invoking GCC,  Next: Installation,  Prev: G++ and GCC,  Up: Top
  557. GNU CC Command Options
  558. **********************
  559.    When you invoke GNU CC, it normally does preprocessing, compilation,
  560. assembly and linking.  The "overall options" allow you to stop this
  561. process at an intermediate stage.  For example, the `-c' option says
  562. not to run the linker.  Then the output consists of object files output
  563. by the assembler.
  564.    Other options are passed on to one stage of processing.  Some options
  565. control the preprocessor and others the compiler itself.  Yet other
  566. options control the assembler and linker; most of these are not
  567. documented here, since you rarely need to use any of them.
  568.    Most of the command line options that you can use with GNU CC are
  569. useful for C programs; when an option is only useful with another
  570. language (usually C++), the explanation says so explicitly.  If the
  571. description for a particular option does not mention a source language,
  572. you can use that option with all supported languages.
  573.    *Note Compiling C++ Programs: Invoking G++, for a summary of special
  574. options for compiling C++ programs.
  575.    The `gcc' program accepts options and file names as operands.  Many
  576. options have multiletter names; therefore multiple single-letter options
  577. may *not* be grouped: `-dr' is very different from `-d -r'.
  578.    You can mix options and other arguments.  For the most part, the
  579. order you use doesn't matter.  Order does matter when you use several
  580. options of the same kind; for example, if you specify `-L' more than
  581. once, the directories are searched in the order specified.
  582.    Many options have long names starting with `-f' or with `-W'--for
  583. example, `-fforce-mem', `-fstrength-reduce', `-Wformat' and so on.
  584. Most of these have both positive and negative forms; the negative form
  585. of `-ffoo' would be `-fno-foo'.  This manual documents only one of
  586. these two forms, whichever one is not the default.
  587. * Menu:
  588. * Option Summary::    Brief list of all options, without explanations.
  589. * Overall Options::     Controlling the kind of output:
  590.                         an executable, object files, assembler files,
  591.                         or preprocessed source.
  592. * Invoking G++::    Compiling C++ programs.
  593. * C Dialect Options::   Controlling the variant of C language compiled.
  594. * C++ Dialect Options:: Variations on C++.
  595. * Warning Options::     How picky should the compiler be?
  596. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  597. * Optimize Options::    How much optimization?
  598. * Preprocessor Options:: Controlling header files and macro definitions.
  599.                          Also, getting dependency information for Make.
  600. * Assembler Options::   Passing options to the assembler.
  601. * Link Options::        Specifying libraries and so on.
  602. * Directory Options::   Where to find header files and libraries.
  603.                         Where to find the compiler executable files.
  604. * Target Options::      Running a cross-compiler, or an old version of GNU CC.
  605. * Submodel Options::    Specifying minor hardware or convention variations,
  606.                         such as 68010 vs 68020.
  607. * Code Gen Options::    Specifying conventions for function calls, data layout
  608.                         and register usage.
  609. * Environment Variables:: Env vars that affect GNU CC.
  610. * Running Protoize::    Automatically adding or removing function prototypes.
  611. File: gcc.info,  Node: Option Summary,  Next: Overall Options,  Up: Invoking GCC
  612. Option Summary
  613. ==============
  614.    Here is a summary of all the options, grouped by type.  Explanations
  615. are in the following sections.
  616. *Overall Options*
  617.      *Note Options Controlling the Kind of Output: Overall Options.
  618.           -c  -S  -E  -o FILE  -pipe  -v  -x LANGUAGE
  619. *C Language Options*
  620.      *Note Options Controlling C Dialect: C Dialect Options.
  621.           -ansi  -fcond-mismatch  -fno-asm  -fno-builtin
  622.           -fsigned-bitfields  -fsigned-char
  623.           -funsigned-bitfields  -funsigned-char  -fwritable-strings
  624.           -traditional  -traditional-cpp  -trigraphs
  625. *C++ Language Options*
  626.      *Note Options Controlling C++ Dialect: C++ Dialect Options.
  627.           -fall-virtual  -fdollars-in-identifiers
  628.           -felide-constructors  -fenum-int-equiv
  629.           -fexternal-templates  -fmemoize-lookups
  630.           -fno-strict-prototype  -fnonnull-objects
  631.           -fthis-is-variable  -nostdinc++
  632. *Warning Options*
  633.      *Note Options to Request or Suppress Warnings: Warning Options.
  634.           -fsyntax-only  -pedantic  -pedantic-errors
  635.           -w  -W  -Wall  -Waggregate-return  -Wcast-align
  636.           -Wcast-qual  -Wchar-subscript  -Wcomment  -Wconversion
  637.           -Wenum-clash  -Werror  -Wformat  -Wid-clash-LEN
  638.           -Wimplicit  -Wimport  -Winline  -Wmissing-prototypes
  639.           -Wnested-externs  -Woverloaded-virtual  -Wparentheses
  640.           -Wpointer-arith  -Wredundant-decls  -Wreturn-type
  641.           -Wshadow  -Wstrict-prototypes  -Wswitch
  642.           -Wtemplate-debugging  -Wtraditional  -Wtrigraphs
  643.           -Wuninitialized  -Wunused  -Wwrite-strings
  644. *Debugging Options*
  645.      *Note Options for Debugging Your Program or GCC: Debugging Options.
  646.           -a  -dLETTERS  -fpretend-float
  647.           -g  -gLEVEL -ggdb  -gdwarf -gdwarf+
  648.           -gstabs  -gstabs+  -gcoff -gxcoff  -gxcoff+
  649.           -p  -pg  -save-temps  -print-libgcc-file-name
  650. *Optimization Options*
  651.      *Note Options that Control Optimization: Optimize Options.
  652.           -fcaller-saves  -fcse-follow-jumps  -fcse-skip-blocks
  653.           -fdelayed-branch   -fexpensive-optimizations
  654.           -ffast-math  -ffloat-store  -fforce-addr  -fforce-mem
  655.           -finline-functions  -fkeep-inline-functions
  656.           -fno-default-inline  -fno-defer-pop  -fno-function-cse
  657.           -fno-inline  -fno-peephole  -fomit-frame-pointer
  658.           -frerun-cse-after-loop  -fschedule-insns
  659.           -fschedule-insns2  -fstrength-reduce  -fthread-jumps
  660.           -funroll-all-loops  -funroll-loops
  661.           -O  -O2
  662. *Preprocessor Options*
  663.      *Note Options Controlling the Preprocessor: Preprocessor Options.
  664.           -AASSERTION  -C  -dD  -dM  -dN
  665.           -DMACRO[=DEFN]  -E  -H
  666.           -idirafter DIR
  667.           -include FILE  -imacros FILE
  668.           -iprefix FILE  -iwithprefix DIR
  669.           -iwithprefixbefore DIR
  670.           -M  -MD  -MM  -MMD  -nostdinc  -P  -trigraphs  -UMACRO
  671. *Assembler Option*
  672.      *Note Passing Options to the Assembler: Assembler Options.
  673.           -Wa,OPTION
  674. *Linker Options*
  675.      *Note Options for Linking: Link Options.
  676.           OBJECT-FILE-NAME
  677.           -lLIBRARY  -nostartfiles  -nostdlib
  678.           -static  -shared  -symbolic
  679.           -Wl,OPTION  -Xlinker OPTION
  680.           -u SYMBOL
  681. *Directory Options*
  682.      *Note Options for Directory Search: Directory Options.
  683.           -BPREFIX  -IDIR  -I-  -LDIR
  684. *Target Options*
  685.      *Note Target Options::.
  686.           -b MACHINE  -V VERSION
  687. *Machine Dependent Options*
  688.      *Note Hardware Models and Configurations: Submodel Options.
  689.           *M680x0 Options*
  690.           -m68000  -m68020  -m68020-40  -m68030  -m68040  -m68881
  691.           -mbitfield  -mc68000  -mc68020  -mfpa  -mnobitfield
  692.           -mrtd  -mshort  -msoft-float
  693.           
  694.           *VAX Options*
  695.           -mg  -mgnu  -munix
  696.           
  697.           *SPARC Options*
  698.           -mepilogue  -mfpu  -mhard-float
  699.           -mno-fpu  -mno-epilogue  -msoft-float
  700.           -msparclite  -mv8
  701.           
  702.           *Convex Options*
  703.           -mc1  -mc2  -mc32  -mc34  -mc38
  704.           -margcount  -mnoargcount
  705.           -mlong32  -mlong64
  706.           -mbolatile-cache  -mvolatile-nocache
  707.           
  708.           *AMD29K Options*
  709.           -m29000  -m29050  -mbw  -mdw  -mkernel-registers
  710.           -mlarge  -mnbw  -mnodw  -mnormal  -msmall  -mstack-check
  711.           -muser-registers
  712.           
  713.           *M88K Options*
  714.           -m88000  -m88100  -m88110  -mbig-pic
  715.           -mcheck-zero-division  -mhandle-large-shift
  716.           -midentify-revision  -mno-check-zero-division
  717.           -mno-ocs-debug-info  -mno-ocs-frame-position
  718.           -mno-optimize-arg-area  -mno-serialize-volatile
  719.           -mno-underscores  -mocs-debug-info
  720.           -mocs-frame-position  -moptimize-arg-area
  721.           -mserialize-volatile  -mshort-data-NUM  -msvr3
  722.           -msvr4  -mtrap-large-shift  -muse-div-instruction
  723.           -mversion-03.00  -mwarn-passed-structs
  724.           
  725.           *RS/6000 Options and PowerPC*
  726.           -mcpu=CPU TYPE
  727.           -mpower -mno-power -mpower2 -pno-power2
  728.           -mpowerpc -mno-powerpc -mpowerpcsqr -mno-powerpcsqr
  729.           -mpowerpc64 -mno-powerpc64
  730.           -mnew-mnemonics -mno-new-mnemonics
  731.           -mnormal-toc   -mminimal-toc  -mno-fop-in-toc
  732.           
  733.           *RT Options*
  734.           -mcall-lib-mul  -mfp-arg-in-fpregs  -mfp-arg-in-gregs
  735.           -mfull-fp-blocks  -mhc-struct-return  -min-line-mul
  736.           -mminimum-fp-blocks  -mnohc-struct-return
  737.           
  738.           *MIPS Options*
  739.           -mcpu=CPU  TYPE  -mips2  -mips3  -mint64
  740.           -mlong64  -mlonglong128  -mmips-as  -mgas  -mrnames
  741.           -mno-rnames  -mgpopt  -mno-gpopt  -mstats  -mno-stats
  742.           -mmemcpy  -mno-memcpy  -mno-mips-tfile  -mmips-tfile
  743.           -msoft-float  -mhard-float  -mabicalls  -mno-abicalls
  744.           -mhalf-pic  -mno-half-pic -mlong-calls -mno-long-calls
  745.           -G  NUM  -nocpp
  746.           
  747.           *i386 Options*
  748.           -m486  -mno-486  -msoft-float  -msvr3-shlib  -mieee-fp
  749.           -mno-fp-ret-in-387
  750.           
  751.           *HPPA Options*
  752.           -mpa-risc-1-0
  753.           -mpa-risc-1-1
  754.           -mlong-calls
  755.           -mdisable-fpregs
  756.           -mdisable-indexing
  757.           -mtrailing-colon
  758.           
  759.           *Intel 960 Options*
  760.           -mCPU TYPE
  761.           -mnumerics  -msoft-float
  762.           -mcode-align  -mno-code-align
  763.           -mleaf-procedures  -mno-leaf-procedures
  764.           -mtail-call  -mno-tail-call
  765.           -mcomplex-addr  -mno-complex-addr
  766.           -mclean-linkage  -mno-clean-linkage
  767.           -mic-compat  -mic2.0-compat  -mic3.0-compat
  768.           -masm-compat  -mintel-asm
  769.           -mstrict-align  -mno-strict-align
  770.           -mold-align  -mno-old-align
  771.           
  772.           *DEC Alpha Options*
  773.           -mfp-regs  -mno-fp-regs  -mno-soft-float
  774.           -msoft-float
  775.           
  776.           *Clipper Options*
  777.           -mc300 -mc400
  778.           
  779.           *System V Options*
  780.           -G  -Qy  -Qn  -YP,PATHS  -Ym,DIR
  781. *Code Generation Options*
  782.      *Note Options for Code Generation Conventions: Code Gen Options.
  783.           -fcall-saved-REG  -fcall-used-REG
  784.           -ffixed-REG  -finhibit-size-directive
  785.           -fno-common  -fno-ident
  786.           -fno-gnu-linker  -fpcc-struct-return  -fpic  -fPIC
  787.           -freg-struct-return  -fshared-data  -fshort-enums
  788.           -fshort-double  -fvolatile  -fvolatile-global
  789.           -fverbose-asm
  790. * Menu:
  791. * Overall Options::     Controlling the kind of output:
  792.                         an executable, object files, assembler files,
  793.                         or preprocessed source.
  794. * C Dialect Options::   Controlling the variant of C language compiled.
  795. * C++ Dialect Options:: Variations on C++.
  796. * Warning Options::     How picky should the compiler be?
  797. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  798. * Optimize Options::    How much optimization?
  799. * Preprocessor Options:: Controlling header files and macro definitions.
  800.                          Also, getting dependency information for Make.
  801. * Assembler Options::   Passing options to the assembler.
  802. * Link Options::        Specifying libraries and so on.
  803. * Directory Options::   Where to find header files and libraries.
  804.                         Where to find the compiler executable files.
  805. * Target Options::      Running a cross-compiler, or an old version of GNU CC.
  806. File: gcc.info,  Node: Overall Options,  Next: Invoking G++,  Prev: Option Summary,  Up: Invoking GCC
  807. Options Controlling the Kind of Output
  808. ======================================
  809.    Compilation can involve up to four stages: preprocessing, compilation
  810. proper, assembly and linking, always in that order.  The first three
  811. stages apply to an individual source file, and end by producing an
  812. object file; linking combines all the object files (those newly
  813. compiled, and those specified as input) into an executable file.
  814.    For any given input file, the file name suffix determines what kind
  815. of compilation is done:
  816. `FILE.c'
  817.      C source code which must be preprocessed.
  818. `FILE.i'
  819.      C source code which should not be preprocessed.
  820. `FILE.ii'
  821.      C++ source code which should not be preprocessed.
  822. `FILE.m'
  823.      Objective-C source code.  Note that you must link with the library
  824.      `libobjc.a' to make an Objective-C program work.
  825. `FILE.h'
  826.      C header file (not to be compiled or linked).
  827. `FILE.cc'
  828. `FILE.cxx'
  829. `FILE.C'
  830.      C++ source code which must be preprocessed.  Note that in `.cxx',
  831.      the last two letters must both be literally `x'.  Likewise, `.C'
  832.      refers to a literal capital C.
  833. `FILE.s'
  834.      Assembler code.
  835. `FILE.S'
  836.      Assembler code which must be preprocessed.
  837. `OTHER'
  838.      An object file to be fed straight into linking.  Any file name
  839.      with no recognized suffix is treated this way.
  840.    You can specify the input language explicitly with the `-x' option:
  841. `-x LANGUAGE'
  842.      Specify explicitly the LANGUAGE for the following input files
  843.      (rather than letting the compiler choose a default based on the
  844.      file name suffix).  This option applies to all following input
  845.      files until the next `-x' option.  Possible values for LANGUAGE
  846.      are:
  847.           c  objective-c  c++
  848.           c-header  cpp-output  c++-cpp-output
  849.           assembler  assembler-with-cpp
  850. `-x none'
  851.      Turn off any specification of a language, so that subsequent files
  852.      are handled according to their file name suffixes (as they are if
  853.      `-x' has not been used at all).
  854.    If you only want some of the stages of compilation, you can use `-x'
  855. (or filename suffixes) to tell `gcc' where to start, and one of the
  856. options `-c', `-S', or `-E' to say where `gcc' is to stop.  Note that
  857. some combinations (for example, `-x cpp-output -E' instruct `gcc' to do
  858. nothing at all.
  859.      Compile or assemble the source files, but do not link.  The linking
  860.      stage simply is not done.  The ultimate output is in the form of an
  861.      object file for each source file.
  862.      By default, the object file name for a source file is made by
  863.      replacing the suffix `.c', `.i', `.s', etc., with `.o'.
  864.      Unrecognized input files, not requiring compilation or assembly,
  865.      are ignored.
  866.      Stop after the stage of compilation proper; do not assemble.  The
  867.      output is in the form of an assembler code file for each
  868.      non-assembler input file specified.
  869.      By default, the assembler file name for a source file is made by
  870.      replacing the suffix `.c', `.i', etc., with `.s'.
  871.      Input files that don't require compilation are ignored.
  872.      Stop after the preprocessing stage; do not run the compiler
  873.      proper.  The output is in the form of preprocessed source code,
  874.      which is sent to the standard output.
  875.      Input files which don't require preprocessing are ignored.
  876. `-o FILE'
  877.      Place output in file FILE.  This applies regardless to whatever
  878.      sort of output is being produced, whether it be an executable file,
  879.      an object file, an assembler file or preprocessed C code.
  880.      Since only one output file can be specified, it does not make
  881.      sense to use `-o' when compiling more than one input file, unless
  882.      you are producing an executable file as output.
  883.      If `-o' is not specified, the default is to put an executable file
  884.      in `a.out', the object file for `SOURCE.SUFFIX' in `SOURCE.o', its
  885.      assembler file in `SOURCE.s', and all preprocessed C source on
  886.      standard output.
  887.      Print (on standard error output) the commands executed to run the
  888.      stages of compilation.  Also print the version number of the
  889.      compiler driver program and of the preprocessor and the compiler
  890.      proper.
  891. `-pipe'
  892.      Use pipes rather than temporary files for communication between the
  893.      various stages of compilation.  This fails to work on some systems
  894.      where the assembler is unable to read from a pipe; but the GNU
  895.      assembler has no trouble.
  896.