home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-docs.zip / gcc.INF (.txt) < prev    next >
OS/2 Help File  |  2001-09-16  |  446KB  |  14,352 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. -Preface- ΓòÉΓòÉΓòÉ
  3.  
  4. This file documents the use of the GNU compiler. Published by the Free Software 
  5. Foundation 59 Temple Place - Suite 330 Boston, MA 02111-1307 USA 
  6.  
  7. Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 Free 
  8. Software Foundation, Inc. 
  9.  
  10. Permission is granted to make and distribute verbatim copies of this manual 
  11. provided the copyright notice and this permission notice are preserved on all 
  12. copies. 
  13.  
  14. Permission is granted to copy and distribute modified versions of this manual 
  15. under the conditions for verbatim copying, provided also that the sections 
  16. entitled ``GNU General Public License,'' ``Funding for Free Software,'' and 
  17. ``Protect Your Freedom---Fight `Look And Feel''' are included exactly as in the 
  18. original, and provided that the entire resulting derived work is distributed 
  19. under the terms of a permission notice identical to this one. 
  20.  
  21. Permission is granted to copy and distribute translations of this manual into 
  22. another language, under the above conditions for modified versions, except that 
  23. the sections entitled ``GNU General Public License,'' ``Funding for Free 
  24. Software,'' and ``Protect Your Freedom---Fight `Look And Feel''', and this 
  25. permission notice, may be included in translations approved by the Free 
  26. Software Foundation instead of in the original English. 
  27.  
  28.  
  29. ΓòÉΓòÉΓòÉ 2. Introduction ΓòÉΓòÉΓòÉ
  30.  
  31.  This manual documents how to run and install the GNU compiler, as well as its 
  32.  new features and incompatibilities, and how to report bugs.  It corresponds to 
  33.  GNU CC version 2.8.1. 
  34.  
  35.  G++ and GCC                   You can compile C or C++ programs. 
  36.  Invoking GCC                  Command options supported by 'gcc'. 
  37.  Installation                  How to configure, compile and install GNU CC. 
  38.  C Extensions                  GNU extensions to the C language family. 
  39.  C++ Extensions                GNU extensions to the C++ language. 
  40.  Gcov                          gcov: a GNU CC test coverage program. 
  41.  Trouble                       If you have trouble installing GNU CC. 
  42.  Bugs                          How, why and where to report bugs. 
  43.  Service                       How to find suppliers of support for GNU CC. 
  44.  Contributing                  How to contribute to testing and developing GNU 
  45.                                CC. 
  46.  VMS                           Using GNU CC on VMS. 
  47.  Index                         Index of concepts and symbol names. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 3. Compile C, C++, or Objective C ΓòÉΓòÉΓòÉ
  51.  
  52.  The C, C++, and Objective C versions of the compiler are integrated; the GNU C 
  53.  compiler can compile programs written in C, C++, or Objective C. 
  54.  
  55.  ``GCC'' is a common shorthand term for the GNU C compiler.  This is both the 
  56.  most general name for the compiler, and the name used when the emphasis is on 
  57.  compiling C programs. 
  58.  
  59.  When referring to C++ compilation, it is usual to call the compiler ``G++''. 
  60.  Since there is only one compiler, it is also accurate to call it ``GCC'' no 
  61.  matter what the language context; however, the term ``G++'' is more useful 
  62.  when the emphasis is on compiling C++ programs. 
  63.  
  64.  We use the name ``GNU CC'' to refer to the compilation system as a whole, and 
  65.  more specifically to the language-independent part of the compiler.  For 
  66.  example, we refer to the optimization options as affecting the behavior of 
  67.  ``GNU CC'' or sometimes just ``the compiler''. 
  68.  
  69.  Front ends for other languages, such as Ada 9X, Fortran, Modula-3, and Pascal, 
  70.  are under development.  These front-ends, like that for C++, are built in 
  71.  subdirectories of GNU CC and link to it.  The result is an integrated compiler 
  72.  that can compile programs written in C, C++, Objective C, or any of the 
  73.  languages for which you have installed front ends. 
  74.  
  75.  In this manual, we only discuss the options for the C, Objective-C, and C++ 
  76.  compilers and those of the GNU CC core.  Consult the documentation of the 
  77.  other front ends for the options to use when compiling programs written in 
  78.  other languages. 
  79.  
  80.  G++ is a compiler, not merely a preprocessor.  G++ builds object code directly 
  81.  from your C++ program source.  There is no intermediate C version of the 
  82.  program.  (By contrast, for example, some other implementations use a program 
  83.  that generates a C program from your C++ source.)  Avoiding an intermediate C 
  84.  representation of the program means that you get better object code, and 
  85.  better debugging information.  The GNU debugger, GDB, works with this 
  86.  information in the object code to give you comprehensive C++ source-level 
  87.  editing capabilities (see Section C and C++ of Debugging with GDB). 
  88.  
  89.  
  90. ΓòÉΓòÉΓòÉ 4. GNU CC Command Options ΓòÉΓòÉΓòÉ
  91.  
  92.  When you invoke GNU CC, it normally does preprocessing, compilation, assembly 
  93.  and linking.  The ``overall options'' allow you to stop this process at an 
  94.  intermediate stage.  For example, the '-c' option says not to run the linker. 
  95.  Then the output consists of object files output by the assembler. 
  96.  
  97.  Other options are passed on to one stage of processing.  Some options control 
  98.  the preprocessor and others the compiler itself.  Yet other options control 
  99.  the assembler and linker; most of these are not documented here, since you 
  100.  rarely need to use any of them. 
  101.  
  102.  Most of the command line options that you can use with GNU CC are useful for C 
  103.  programs; when an option is only useful with another language (usually C++), 
  104.  the explanation says so explicitly.  If the description for a particular 
  105.  option does not mention a source language, you can use that option with all 
  106.  supported languages. 
  107.  
  108.  See Compiling C++ Programs, for a summary of special options for compiling C++ 
  109.  programs. 
  110.  
  111.  The gcc program accepts options and file names as operands.  Many options have 
  112.  multiletter names; therefore multiple single-letter options may not be 
  113.  grouped: '-dr' is very different from '-d -r'. 
  114.  
  115.  You can mix options and other arguments.  For the most part, the order you use 
  116.  doesn't matter.  Order does matter when you use several options of the same 
  117.  kind; for example, if you specify '-L' more than once, the directories are 
  118.  searched in the order specified. 
  119.  
  120.  Many options have long names starting with '-f' or with '-W'---for example, 
  121.  '-fforce-mem', '-fstrength-reduce', '-Wformat' and so on.  Most of these have 
  122.  both positive and negative forms; the negative form of '-ffoo' would be 
  123.  '-fno-foo'.  This manual documents only one of these two forms, whichever one 
  124.  is not the default. 
  125.  
  126.  Option Summary                Brief list of all options, without explanations. 
  127.  Overall Options               Controlling the kind of output: an executable, 
  128.                                object files, assembler files, or preprocessed 
  129.                                source. 
  130.  Invoking G++                  Compiling C++ programs. 
  131.  C Dialect Options             Controlling the variant of C language compiled. 
  132.  C++ Dialect Options           Variations on C++. 
  133.  Warning Options               How picky should the compiler be? 
  134.  Debugging Options             Symbol tables, measurements, and debugging 
  135.                                dumps. 
  136.  Optimize Options              How much optimization? 
  137.  Preprocessor Options          Controlling header files and macro definitions. 
  138.                                Also, getting dependency information for Make. 
  139.  Assembler Options             Passing options to the assembler. 
  140.  Link Options                  Specifying libraries and so on. 
  141.  Directory Options             Where to find header files and libraries. Where 
  142.                                to find the compiler executable files. 
  143.  Target Options                Running a cross-compiler, or an old version of 
  144.                                GNU CC. 
  145.  Submodel Options              Specifying minor hardware or convention 
  146.                                variations, such as 68010 vs 68020. 
  147.  Code Gen Options              Specifying conventions for function calls, data 
  148.                                layout and register usage. 
  149.  Environment Variables         Env vars that affect GNU CC. 
  150.  Running Protoize              Automatically adding or removing function 
  151.                                prototypes. 
  152.  
  153.  
  154. ΓòÉΓòÉΓòÉ 4.1. Option Summary ΓòÉΓòÉΓòÉ
  155.  
  156.  Here is a summary of all the options, grouped by type.  Explanations are in 
  157.  the following sections. 
  158.  
  159.  Overall Options 
  160.            See Options Controlling the Kind of Output. 
  161.  
  162.                       -c  -S  -E  -o file  -pipe  -pass-exit-codes  -v  -x language
  163.  
  164.  C Language Options 
  165.            See Options Controlling C Dialect. 
  166.  
  167.                       -ansi  -fallow-single-precision  -fcond-mismatch  -fno-asm
  168.                       -fno-builtin  -ffreestanding  -fhosted  -fsigned-bitfields  -fsigned-char
  169.                       -funsigned-bitfields  -funsigned-char  -fwritable-strings
  170.                       -traditional  -traditional-cpp  -trigraphs
  171.  
  172.  C++ Language Options 
  173.            See Options Controlling C++ Dialect. 
  174.  
  175.                       -fall-virtual  -fdollars-in-identifiers  -felide-constructors
  176.                       -fenum-int-equiv  -fexternal-templates  -ffor-scope  -fno-for-scope
  177.                       -fhandle-signatures  -fmemoize-lookups  -fname-mangling-version-n
  178.                       -fno-default-inline  -fno-gnu-keywords -fnonnull-objects -fguiding-decls
  179.                       -foperator-names  -fstrict-prototype  -fthis-is-variable
  180.                       -ftemplate-depth-n  -nostdinc++  -traditional  +en
  181.  
  182.  Warning Options 
  183.            See Options to Request or Suppress Warnings. 
  184.  
  185.                       -fsyntax-only  -pedantic  -pedantic-errors
  186.                       -w  -W  -Wall  -Waggregate-return  -Wbad-function-cast
  187.                       -Wcast-align  -Wcast-qual  -Wchar-subscript  -Wcomment
  188.                       -Wconversion  -Werror  -Wformat
  189.                       -Wid-clash-len  -Wimplicit -Wimplicit-int
  190.                       -Wimplicit-function-declarations -Wimport  -Winline
  191.                       -Wlarger-than-len  -Wmain  -Wmissing-declarations
  192.                       -Wmissing-prototypes  -Wnested-externs
  193.                       -Wno-import  -Wold-style-cast  -Woverloaded-virtual  -Wparentheses
  194.                       -Wpointer-arith  -Wredundant-decls  -Wreorder  -Wreturn-type  -Wshadow
  195.                       -Wsign-compare  -Wstrict-prototypes  -Wswitch  -Wsynth
  196.                       -Wtemplate-debugging  -Wtraditional  -Wtrigraphs
  197.                       -Wundef  -Wuninitialized  -Wunused  -Wwrite-strings
  198.  
  199.  Debugging Options 
  200.            See Options for Debugging Your Program or GCC. 
  201.  
  202.                       -a  -ax  -dletters  -fpretend-float
  203.                       -fprofile-arcs  -ftest-coverage
  204.                       -g  -glevel  -gcoff  -gdwarf  -gdwarf-1  -gdwarf-1+  -gdwarf-2
  205.                       -ggdb  -gstabs  -gstabs+  -gxcoff  -gxcoff+
  206.                       -p  -pg  -print-file-name=library  -print-libgcc-file-name
  207.                       -print-prog-name=program  -print-search-dirs  -save-temps
  208.  
  209.  Optimization Options 
  210.            See Options that Control Optimization. 
  211.  
  212.                       -fbranch-probabilities
  213.                       -fcaller-saves  -fcse-follow-jumps  -fcse-skip-blocks
  214.                       -fdelayed-branch  -fexpensive-optimizations
  215.                       -ffast-math  -ffloat-store  -fforce-addr  -fforce-mem
  216.                       -ffunction-sections  -finline-functions
  217.                       -fkeep-inline-functions  -fno-default-inline
  218.                       -fno-defer-pop  -fno-function-cse
  219.                       -fno-inline  -fno-peephole  -fomit-frame-pointer
  220.                       -frerun-cse-after-loop  -fschedule-insns
  221.                       -fschedule-insns2  -fstrength-reduce  -fthread-jumps
  222.                       - funroll-all-loops  -funroll-loops
  223.                       -O  -O0  -O1  -O2  -O3
  224.  
  225.  Preprocessor Options 
  226.            See Options Controlling the Preprocessor. 
  227.  
  228.                       -Aquestion(answer)  -C  -dD  -dM  -dN
  229.                       -Dmacro[=defn]  -E  -H
  230.                       -idirafter dir
  231.                       -include file  -imacros file
  232.                       -iprefix file  -iwithprefix dir
  233.                       -iwithprefixbefore dir  -isystem dir
  234.                       -M  -MD  -MM  -MMD  -MG  -nostdinc  -P  -trigraphs
  235.                       -undef  -Umacro  -Wp,option
  236.  
  237.  Assembler Option 
  238.            See Passing Options to the Assembler. 
  239.  
  240.                       -Wa,option
  241.  
  242.  Linker Options 
  243.            See Options for Linking. 
  244.  
  245.                       object-file-name  -llibrary
  246.                       -nostartfiles  -nodefaultlibs  -nostdlib
  247.                       -s  -static  -shared  -symbolic
  248.                       -Wl,option  -Xlinker option
  249.                       -u symbol
  250.  
  251.  Directory Options 
  252.            See Options for Directory Search. 
  253.  
  254.                       -Bprefix  -Idir  -I-  -Ldir  -specs=file
  255.  
  256.  Target Options 
  257.            See Target Options. 
  258.  
  259.                       -b machine  -V version
  260.  
  261.  Machine Dependent Options 
  262.            See Hardware Models and Configurations. 
  263.  
  264.                       M680x0 Options
  265.                       -m68000  -m68020  -m68020-40  -m68020-60  -m68030  -m68040
  266.                       -m68060  -m5200  -m68881  -mbitfield  -mc68000  -mc68020  -mfpa
  267.                       -mnobitfield  -mrtd  -mshort  -msoft-float  -malign-int
  268.                       VAX Options
  269.                       -mg  -mgnu  -munix
  270.                       SPARC Options
  271.                       -mcpu=cpu type
  272.                       -mtune=cpu type
  273.                       -mcmodel=code model
  274.                       -malign-jumps=num  -malign-loops=num
  275.                       -malign-functions=num
  276.                       -m32  -m64
  277.                       -mapp-regs  -mbroken-saverestore  -mcypress  -mepilogue
  278.                       -mflat  -mfpu  -mhard-float  -mhard-quad-float
  279.                       -mimpure-text  -mlive-g0  -mno-app-regs  -mno-epilogue
  280.                       -mno-flat  -mno-fpu  -mno-impure-text
  281.                       -mno-stack-bias  -mno-unaligned-doubles
  282.                       -msoft-float  -msoft-quad-float  -msparclite  -mstack-bias
  283.                       -msupersparc  -munaligned-doubles  -mv8
  284.                       Convex Options
  285.                       -mc1  -mc2  -mc32  -mc34  -mc38
  286.                       -margcount  -mnoargcount
  287.                       -mlong32  -mlong64
  288.                       -mvolatile-cache  -mvolatile-nocache
  289.                       AMD29K Options
  290.                       -m29000  -m29050  -mbw  -mnbw  -mdw  -mndw
  291.                       -mlarge  -mnormal  -msmall
  292.                       -mkernel-registers  -mno-reuse-arg-regs
  293.                       -mno-stack-check  -mno-storem-bug
  294.                       -mreuse-arg-regs  -msoft-float  -mstack-check
  295.                       -mstorem-bug  -muser-registers
  296.                       ARM Options
  297.                       -mapcs-frame  -mapcs-26  -mapcs-32
  298.                       -mlittle-endian  -mbig-endian  -mwords-little-endian
  299.                       -mshort-load-bytes  -mno-short-load-bytes
  300.                       -msoft-float  -mhard-float
  301.                       -mbsd  -mxopen  -mno-symrename
  302.                       MN10300 Options
  303.                       -mmult-bug
  304.                       -mno-mult-bug
  305.                       M32R/D Options
  306.                       -mcode-model=model type  -msdata=sdata type
  307.                       -G num
  308.                       M88K Options
  309.                       -m88000  -m88100  -m88110  -mbig-pic
  310.                       -mcheck-zero-division  -mhandle-large-shift
  311.                       -midentify-revision  -mno-check-zero-division
  312.                       -mno-ocs-debug-info  -mno-ocs-frame-position
  313.                       -mno-optimize-arg-area  -mno-serialize-volatile
  314.                       -mno-underscores  -mocs-debug-info
  315.                       -mocs-frame-position  -moptimize-arg-area
  316.                       -mserialize-volatile  -mshort-data-num  -msvr3
  317.                       -msvr4  -mtrap-large-shift  -muse-div-instruction
  318.                       -mversion-03.00  -mwarn-passed-structs
  319.                       RS/6000 and PowerPC Options
  320.                       -mcpu=cpu type
  321.                       -mtune=cpu type
  322.                       -mpower  -mno-power  -mpower2  -mno-power2
  323.                       -mpowerpc  -mno-powerpc
  324.                       -mpowerpc-gpopt  -mno-powerpc-gpopt
  325.                       -mpowerpc-gfxopt  -mno-powerpc-gfxopt
  326.                       -mnew-mnemonics  -mno-new-mnemonics
  327.                       -mfull-toc  -mminimal-toc  -mno-fop-in-toc  -mno-sum-in-toc
  328.                       -mxl-call  -mno-xl-call  -mthreads  -mpe
  329.                       -msoft-float  -mhard-float  -mmultiple  -mno-multiple
  330.                       -mstring  -mno-string  -mupdate  -mno-update
  331.                       -mfused-madd  -mno-fused-madd  -mbit-align  -mno-bit-align
  332.                       -mstrict-align  -mno-strict-align  -mrelocatable
  333.                       -mno-relocatable  -mrelocatable-lib  -mno-relocatable-lib
  334.                       -mtoc  -mno-toc  -mtraceback  -mno-traceback
  335.                       -mlittle  -mlittle-endian  -mbig  -mbig-endian
  336.                       -mcall-aix  -mcall-sysv  -mprototype  -mno-prototype
  337.                       -msim  -mmvme  -mads  -myellowknife  -memb
  338.                       -msdata  -msdata=opt  -G num
  339.                       -mlongcall
  340.                       RT Options
  341.                       -mcall-lib-mul  -mfp-arg-in-fpregs  -mfp-arg-in-gregs
  342.                       -mfull-fp-blocks  -mhc-struct-return  -min-line-mul
  343.                       -mminimum-fp-blocks  -mnohc-struct-return
  344.                       MIPS Options
  345.                       -mabicalls  -mcpu=cpu type  -membedded-data
  346.                       -membedded-pic  -mfp32  -mfp64  -mgas  -mgp32  -mgp64
  347.                       -mgpopt  -mhalf-pic  -mhard-float  -mint64  -mips1
  348.                       -mips2  -mips3  -mlong64  -mlong-calls  -mmemcpy
  349.                       -mmips-as  -mmips-tfile  -mno-abicalls
  350.                       -mno-embedded-data  -mno-embedded-pic
  351.                       -mno-gpopt  -mno-long-calls
  352.                       -mno-memcpy  -mno-mips-tfile  -mno-rnames  -mno-stats
  353.                       -mrnames  -msoft-float
  354.                       -m4650  -msingle-float  -mmad
  355.                       -mstats  -EL  -EB  -G num  -nocpp
  356.                       i386 Options
  357.                       -mcpu=cpu type
  358.                       -march=cpu type
  359.                       -mieee-fp  -mno-fancy-math-387
  360.                       -mno-fp-ret-in-387  -msoft-float  -msvr3-shlib
  361.                       -mno-wide-multiply  -mrtd  -malign-double
  362.                       -mreg-alloc=list  -mregparm=num
  363.                       -malign-jumps=num  -malign-loops=num
  364.                       -malign-functions=num
  365.                       HPPA Options
  366.                       -mbig-switch  -mdisable-fpregs  -mdisable-indexing  -mfast-indirect-calls
  367.                       -mgas  -mjump-in-delay  -mlong-load-store  -mno-big-switch  -mno-disable-fpregs
  368.                       -mno-disable-indexing  -mno-fast-indirect-calls  -mno-gas
  369.                       -mno-jump-in-delay
  370.                       -mno-long-load-store
  371.                       -mno-portable-runtime  -mno-soft-float  -mno-space  -mno-space-regs
  372.                       -msoft-float
  373.                       -mpa-risc-1-0  -mpa-risc-1-1  -mportable-runtime
  374.                       -mschedule=list  -mspace  -mspace-regs
  375.                       Intel 960 Options
  376.                       -mcpu type  -masm-compat  -mclean-linkage
  377.                       -mcode-align  -mcomplex-addr  -mleaf-procedures
  378.                       -mic-compat  -mic2.0-compat  -mic3.0-compat
  379.                       -mintel-asm  -mno-clean-linkage  -mno-code-align
  380.                       -mno-complex-addr  -mno-leaf-procedures
  381.                       -mno-old-align  -mno-strict-align  -mno-tail-call
  382.                       -mnumerics  -mold-align  -msoft-float  -mstrict-align
  383.                       -mtail-call
  384.                       DEC Alpha Options
  385.                       -mfp-regs  -mno-fp-regs -mno-soft-float  -msoft-float
  386.                       -malpha-as -mgas
  387.                       -mieee  -mieee-with-inexact  -mieee-conformant
  388.                       -mfp-trap-mode=mode  -mfp-rounding-mode=mode
  389.                       -mtrap-precision=mode  -mbuild-constants
  390.                       -mcpu=cpu type
  391.                       -mbwx -mno-bwx -mcix -mno-cix -mmax -mno-max
  392.                       Clipper Options
  393.                       -mc300  -mc400
  394.                       H8/300 Options
  395.                       -mrelax  -mh -ms -mint32  -malign-300
  396.                       SH Options
  397.                       - m1  -m2  -m3  -m3e  -mb  -ml  -mrelax
  398.                       System V Options
  399.                       -Qy  -Qn  -YP,paths  -Ym,dir
  400.                       V850 Options
  401.                       -mlong-calls -mno-long-calls -mep -mno-ep
  402.                       -mprolog-function -mno-prolog-function -mspace
  403.                       -mtda=n -msda=n -mzda=n
  404.                       -mv850 -mbig-switch
  405.  
  406.  Code Generation Options 
  407.            See Options for Code Generation Conventions. 
  408.  
  409.                       -fcall-saved-reg  -fcall-used-reg
  410.                       -ffixed-reg  -finhibit-size-directive
  411.                       -fcheck-memory-usage  -fprefix-function-name
  412.                       -fno-common  -fno-ident  -fno-gnu-linker
  413.                       -fpcc-struct-return  -freg-struct-return
  414.                       -fshared-data  -fpic  -fPIC  -fexceptions
  415.                       -funwind-tables  -fshort-enums  -fshort-double
  416.                       -fvolatile  -fvolatile-global  -fvolatile-static
  417.                       -fverbose-asm  -fpack-struct  -fstack-check  +e0  +e1
  418.  
  419.  Overall Options               Controlling the kind of output: an executable, 
  420.                                object files, assembler files, or preprocessed 
  421.                                source. 
  422.  C Dialect Options             Controlling the variant of C language compiled. 
  423.  C++ Dialect Options           Variations on C++. 
  424.  Warning Options               How picky should the compiler be? 
  425.  Debugging Options             Symbol tables, measurements, and debugging 
  426.                                dumps. 
  427.  Optimize Options              How much optimization? 
  428.  Preprocessor Options          Controlling header files and macro definitions. 
  429.                                Also, getting dependency information for Make. 
  430.  Assembler Options             Passing options to the assembler. 
  431.  Link Options                  Specifying libraries and so on. 
  432.  Directory Options             Where to find header files and libraries. Where 
  433.                                to find the compiler executable files. 
  434.  Target Options                Running a cross-compiler, or an old version of 
  435.                                GNU CC. 
  436.  
  437.  
  438. ΓòÉΓòÉΓòÉ 4.2. Options Controlling the Kind of Output ΓòÉΓòÉΓòÉ
  439.  
  440.  Compilation can involve up to four stages: preprocessing, compilation proper, 
  441.  assembly and linking, always in that order.  The first three stages apply to 
  442.  an individual source file, and end by producing an object file; linking 
  443.  combines all the object files (those newly compiled, and those specified as 
  444.  input) into an executable file. 
  445.  
  446.  For any given input file, the file name suffix determines what kind of 
  447.  compilation is done: 
  448.  
  449.  file.c 
  450.            C source code which must be preprocessed. 
  451.  
  452.  file.i 
  453.            C source code which should not be preprocessed. 
  454.  
  455.  file.ii 
  456.            C++ source code which should not be preprocessed. 
  457.  
  458.  file.m 
  459.            Objective-C source code.  Note that you must link with the library 
  460.            'libobjc.a' to make an Objective-C program work. 
  461.  
  462.  file.h 
  463.            C header file (not to be compiled or linked). 
  464.  
  465.  file.cc 
  466.  
  467.  file.cxx 
  468.  
  469.  file.cpp 
  470.  
  471.  file.C 
  472.            C++ source code which must be preprocessed.  Note that in '.cxx', 
  473.            the last two letters must both be literally 'x'.  Likewise, '.C' 
  474.            refers to a literal capital C. 
  475.  
  476.  file.s 
  477.            Assembler code. 
  478.  
  479.  file.S 
  480.            Assembler code which must be preprocessed. 
  481.  
  482.  other 
  483.            An object file to be fed straight into linking. Any file name with 
  484.            no recognized suffix is treated this way. 
  485.  
  486.  You can specify the input language explicitly with the '-x' option: 
  487.  
  488.  -x language 
  489.            Specify explicitly the language for the following input files 
  490.            (rather than letting the compiler choose a default based on the file 
  491.            name suffix).  This option applies to all following input files 
  492.            until the next '-x' option.  Possible values for language are: 
  493.  
  494.                       c  objective-c  c++
  495.                       c-header  cpp-output  c++-cpp-output
  496.                       assembler  assembler-with-cpp
  497.  
  498.  -x none 
  499.            Turn off any specification of a language, so that subsequent files 
  500.            are handled according to their file name suffixes (as they are if 
  501.            '-x' has not been used at all). 
  502.  
  503.  If you only want some of the stages of compilation, you can use '-x' (or 
  504.  filename suffixes) to tell gcc where to start, and one of the options '-c', 
  505.  '-S', or '-E' to say where gcc is to stop.  Note that some combinations (for 
  506.  example, '-x cpp-output -E' instruct gcc to do nothing at all. 
  507.  
  508.  -c 
  509.            Compile or assemble the source files, but do not link.  The linking 
  510.            stage simply is not done.  The ultimate output is in the form of an 
  511.            object file for each source file. 
  512.  
  513.            By default, the object file name for a source file is made by 
  514.            replacing the suffix '.c', '.i', '.s', etc., with '.o'. 
  515.  
  516.            Unrecognized input files, not requiring compilation or assembly, are 
  517.            ignored. 
  518.  
  519.  -S 
  520.            Stop after the stage of compilation proper; do not assemble.  The 
  521.            output is in the form of an assembler code file for each 
  522.            non-assembler input file specified. 
  523.  
  524.            By default, the assembler file name for a source file is made by 
  525.            replacing the suffix '.c', '.i', etc., with '.s'. 
  526.  
  527.            Input files that don't require compilation are ignored. 
  528.  
  529.  -E 
  530.            Stop after the preprocessing stage; do not run the compiler proper. 
  531.            The output is in the form of preprocessed source code, which is sent 
  532.            to the standard output. 
  533.  
  534.            Input files which don't require preprocessing are ignored. 
  535.  
  536.  -o file 
  537.            Place output in file file.  This applies regardless to whatever sort 
  538.            of output is being produced, whether it be an executable file, an 
  539.            object file, an assembler file or preprocessed C code. 
  540.  
  541.            Since only one output file can be specified, it does not make sense 
  542.            to use '-o' when compiling more than one input file, unless you are 
  543.            producing an executable file as output. 
  544.  
  545.            If '-o' is not specified, the default is to put an executable file 
  546.            in 'a.out', the object file for 'source.suffix' in 'source.o', its 
  547.            assembler file in 'source.s', and all preprocessed C source on 
  548.            standard output. 
  549.  
  550.  -v 
  551.            Print (on standard error output) the commands executed to run the 
  552.            stages of compilation.  Also print the version number of the 
  553.            compiler driver program and of the preprocessor and the compiler 
  554.            proper. 
  555.  
  556.  -pipe 
  557.            Use pipes rather than temporary files for communication between the 
  558.            various stages of compilation.  This fails to work on some systems 
  559.            where the assembler is unable to read from a pipe; but the GNU 
  560.            assembler has no trouble. 
  561.  
  562.  - pass-exit-codes 
  563.            Normally the gcc program will exit with the code of 1 if any phase 
  564.            of the compiler returns a non-success return code.  If you specify 
  565.            '-pass-exit-codes', the gcc program will instead return with 
  566.            numerically highest error produced by any phase that returned an 
  567.            error indication. 
  568.  
  569.  
  570. ΓòÉΓòÉΓòÉ 4.3. Compiling C++ Programs ΓòÉΓòÉΓòÉ
  571.  
  572.  C++ source files conventionally use one of the suffixes '.C', '.cc', 'cpp', or 
  573.  '.cxx'; preprocessed C++ files use the suffix '.ii'.  GNU CC recognizes files 
  574.  with these names and compiles them as C++ programs even if you call the 
  575.  compiler the same way as for compiling C programs (usually with the name gcc). 
  576.  
  577.  However, C++ programs often require class libraries as well as a compiler that 
  578.  understands the C++ language---and under some circumstances, you might want to 
  579.  compile programs from standard input, or otherwise without a suffix that flags 
  580.  them as C++ programs. g++ is a program that calls GNU CC with the default 
  581.  language set to C++, and automatically specifies linking against the C++ 
  582.  library. xx  (1) On many systems, the script g++ is also installed with the 
  583.  name c++. 
  584.  
  585.  When you compile C++ programs, you may specify many of the same command-line 
  586.  options that you use for compiling programs in any language; or command-line 
  587.  options meaningful for C and related languages; or options that are meaningful 
  588.  only for C++ programs. See Options Controlling C Dialect, for explanations of 
  589.  options for languages related to C. See Options Controlling C++ Dialect, for 
  590.  explanations of options that are meaningful only for C++ programs. 
  591.  
  592.  
  593. ΓòÉΓòÉΓòÉ 4.4. Options Controlling C Dialect ΓòÉΓòÉΓòÉ
  594.  
  595.  The following options control the dialect of C (or languages derived from C, 
  596.  such as C++ and Objective C) that the compiler accepts: 
  597.  
  598.  -ansi 
  599.            Support all ANSI standard C programs. 
  600.  
  601.            This turns off certain features of GNU C that are incompatible with 
  602.            ANSI C, such as the asm, inline and typeof keywords, and predefined 
  603.            macros such as unix and vax that identify the type of system you are 
  604.            using.  It also enables the undesirable and rarely used ANSI 
  605.            trigraph feature, and it disables recognition of C++ style '//' 
  606.            comments. 
  607.  
  608.            The alternate keywords __asm__, __extension__, __inline__ and 
  609.            __typeof__ continue to work despite '-ansi'.  You would not want to 
  610.            use them in an ANSI C program, of course, but it is useful to put 
  611.            them in header files that might be included in compilations done 
  612.            with '-ansi'.  Alternate predefined macros such as __unix__ and 
  613.            __vax__ are also available, with or without '-ansi'. 
  614.  
  615.            The '-ansi' option does not cause non-ANSI programs to be rejected 
  616.            gratuitously.  For that, '-pedantic' is required in addition to 
  617.            '-ansi'.  See Warning Options. 
  618.  
  619.            The macro __STRICT_ANSI__ is predefined when the '-ansi' option is 
  620.            used.  Some header files may notice this macro and refrain from 
  621.            declaring certain functions or defining certain macros that the ANSI 
  622.            standard doesn't call for; this is to avoid interfering with any 
  623.            programs that might use these names for other things. 
  624.  
  625.            The functions alloca, abort, exit, and _exit are not builtin 
  626.            functions when '-ansi' is used. 
  627.  
  628.  -fno-asm 
  629.            Do not recognize asm, inline or typeof as a keyword, so that code 
  630.            can use these words as identifiers.  You can use the keywords 
  631.            __asm__, __inline__ and __typeof__ instead.  '-ansi' implies 
  632.            '-fno-asm'. 
  633.  
  634.            In C++, this switch only affects the typeof keyword, since asm and 
  635.            inline are standard keywords.  You may want to use the 
  636.            '-fno-gnu-keywords' flag instead, as it also disables the other, 
  637.            C++-specific, extension keywords such as headof. 
  638.  
  639.  -fno-builtin 
  640.            Don't recognize builtin functions that do not begin with two leading 
  641.            underscores.  Currently, the functions affected include abort, abs, 
  642.            alloca, cos, exit, fabs, ffs, labs, memcmp, memcpy, sin, sqrt, 
  643.            strcmp, strcpy, and strlen. 
  644.  
  645.            GCC normally generates special code to handle certain builtin 
  646.            functions more efficiently; for instance, calls to alloca may become 
  647.            single instructions that adjust the stack directly, and calls to 
  648.            memcpy may become inline copy loops.  The resulting code is often 
  649.            both smaller and faster, but since the function calls no longer 
  650.            appear as such, you cannot set a breakpoint on those calls, nor can 
  651.            you change the behavior of the functions by linking with a different 
  652.            library. 
  653.  
  654.            The '-ansi' option prevents alloca and ffs from being builtin 
  655.            functions, since these functions do not have an ANSI standard 
  656.            meaning. 
  657.  
  658.  -fhosted 
  659.            Assert that compilation takes place in a hosted environment.  This 
  660.            implies '-fbuiltin'.  A hosted environment is one in which the 
  661.            entire standard library is available, and in which main has a return 
  662.            type of int.  Examples are nearly everything except a kernel. This 
  663.            is equivalent to '-fno-freestanding'. 
  664.  
  665.  -ffreestanding 
  666.            Assert that compilation takes place in a freestanding environment. 
  667.            This implies '-fno-builtin'.  A freestanding environment is one in 
  668.            which the standard library may not exist, and program startup may 
  669.            not necessarily be at main.  The most obvious example is an OS 
  670.            kernel. This is equivalent to '-fno-hosted'. 
  671.  
  672.  -trigraphs 
  673.            Support ANSI C trigraphs.  You don't want to know about this 
  674.            brain-damage.  The '-ansi' option implies '-trigraphs'. 
  675.  
  676.  -traditional 
  677.            Attempt to support some aspects of traditional C compilers. 
  678.            Specifically: 
  679.  
  680.                1. All extern declarations take effect globally even if they are 
  681.                   written inside of a function definition.  This includes 
  682.                   implicit declarations of functions. 
  683.  
  684.                2. The newer keywords typeof, inline, signed, const and volatile 
  685.                   are not recognized.  (You can still use the alternative 
  686.                   keywords such as __typeof__, __inline__, and so on.) 
  687.  
  688.                3. Comparisons between pointers and integers are always allowed. 
  689.  
  690.                4. Integer types unsigned short and unsigned char promote to 
  691.                   unsigned int. 
  692.  
  693.                5. Out-of-range floating point literals are not an error. 
  694.  
  695.                6. Certain constructs which ANSI regards as a single invalid 
  696.                   preprocessing number, such as '0xe-0xd', are treated as 
  697.                   expressions instead. 
  698.  
  699.                7. String ``constants'' are not necessarily constant; they are 
  700.                   stored in writable space, and identical looking constants are 
  701.                   allocated separately.  (This is the same as the effect of 
  702.                   '-fwritable-strings'.) 
  703.  
  704.                8. All automatic variables not declared register are preserved 
  705.                   by longjmp.  Ordinarily, GNU C follows ANSI C: automatic 
  706.                   variables not declared volatile may be clobbered. 
  707.  
  708.                9. The character escape sequences '\x' and '\a' evaluate as the 
  709.                   literal characters 'x' and 'a' respectively.  Without 
  710.                   '-traditional', '\x' is a prefix for the hexadecimal 
  711.                   representation of a character, and '\a' produces a bell. 
  712.  
  713.                10.In C++ programs, assignment to this is permitted with 
  714.                   '-traditional'.  (The option '-fthis-is-variable' also has 
  715.                   this effect.) 
  716.  
  717.              You may wish to use '-fno-builtin' as well as '-traditional' if 
  718.              your program uses names that are normally GNU C builtin functions 
  719.              for other purposes of its own. 
  720.  
  721.              You cannot use '-traditional' if you include any header files that 
  722.              rely on ANSI C features.  Some vendors are starting to ship 
  723.              systems with ANSI C header files and you cannot use '-traditional' 
  724.              on such systems to compile files that include any system headers. 
  725.  
  726.              The '-traditional' option also enables the '-traditional-cpp' 
  727.              option, which is described next. 
  728.  
  729.  -traditional-cpp 
  730.            Attempt to support some aspects of traditional C preprocessors. 
  731.            Specifically: 
  732.  
  733.                1. Comments convert to nothing at all, rather than to a space. 
  734.                   This allows traditional token concatenation. 
  735.  
  736.                2. In a preprocessing directive, the '#' symbol must appear as 
  737.                   the first character of a line. 
  738.  
  739.                3. Macro arguments are recognized within string constants in a 
  740.                   macro definition (and their values are stringified, though 
  741.                   without additional quote marks, when they appear in such a 
  742.                   context).  The preprocessor always considers a string 
  743.                   constant to end at a newline. 
  744.  
  745.                4. The predefined macro __STDC__ is not defined when you use 
  746.                   '-traditional', but __GNUC__ is (since the GNU extensions 
  747.                   which __GNUC__ indicates are not affected by '-traditional'). 
  748.                   If you need to write header files that work differently 
  749.                   depending on whether '-traditional' is in use, by testing 
  750.                   both of these predefined macros you can distinguish four 
  751.                   situations: GNU C, traditional GNU C, other ANSI C compilers, 
  752.                   and other old C compilers.  The predefined macro 
  753.                   __STDC_VERSION__ is also not defined when you use 
  754.                   '-traditional'.  See Section Standard Predefined Macros of 
  755.                   The C Preprocessor, for more discussion of these and other 
  756.                   predefined macros. 
  757.  
  758.                5. The preprocessor considers a string constant to end at a 
  759.                   newline (unless the newline is escaped with '\').  (Without 
  760.                   '-traditional', string constants can contain the newline 
  761.                   character as typed.) 
  762.  
  763.  -fcond-mismatch 
  764.            Allow conditional expressions with mismatched types in the second 
  765.            and third arguments.  The value of such an expression is void. 
  766.  
  767.  -funsigned-char 
  768.            Let the type char be unsigned, like unsigned char. 
  769.  
  770.            Each kind of machine has a default for what char should be.  It is 
  771.            either like unsigned char by default or like signed char by default. 
  772.  
  773.            Ideally, a portable program should always use signed char or 
  774.            unsigned char when it depends on the signedness of an object. But 
  775.            many programs have been written to use plain char and expect it to 
  776.            be signed, or expect it to be unsigned, depending on the machines 
  777.            they were written for.  This option, and its inverse, let you make 
  778.            such a program work with the opposite default. 
  779.  
  780.            The type char is always a distinct type from each of signed char or 
  781.            unsigned char, even though its behavior is always just like one of 
  782.            those two. 
  783.  
  784.  -fsigned-char 
  785.            Let the type char be signed, like signed char. 
  786.  
  787.            Note that this is equivalent to '-fno-unsigned-char', which is the 
  788.            negative form of '-funsigned-char'.  Likewise, the option 
  789.            '-fno-signed-char' is equivalent to '-funsigned-char'. 
  790.  
  791.            You may wish to use '-fno-builtin' as well as '-traditional' if your 
  792.            program uses names that are normally GNU C builtin functions for 
  793.            other purposes of its own. 
  794.  
  795.            You cannot use '-traditional' if you include any header files that 
  796.            rely on ANSI C features.  Some vendors are starting to ship systems 
  797.            with ANSI C header files and you cannot use '-traditional' on such 
  798.            systems to compile files that include any system headers. 
  799.  
  800.  -fsigned-bitfields 
  801.  
  802.  -funsigned-bitfields 
  803.  
  804.  -fno-signed-bitfields 
  805.  
  806.  -fno-unsigned-bitfields 
  807.            These options control whether a bitfield is signed or unsigned, when 
  808.            the declaration does not use either signed or unsigned.  By default, 
  809.            such a bitfield is signed, because this is consistent: the basic 
  810.            integer types such as int are signed types. 
  811.  
  812.            However, when '-traditional' is used, bitfields are all unsigned no 
  813.            matter what. 
  814.  
  815.  -fwritable-strings 
  816.            Store string constants in the writable data segment and don't 
  817.            uniquize them.  This is for compatibility with old programs which 
  818.            assume they can write into string constants.  The option 
  819.            '-traditional' also has this effect. 
  820.  
  821.            Writing into string constants is a very bad idea; ``constants'' 
  822.            should be constant. 
  823.  
  824.  -fallow-single-precision 
  825.            Do not promote single precision math operations to double precision, 
  826.            even when compiling with '-traditional'. 
  827.  
  828.            Traditional K&R C promotes all floating point operations to double 
  829.            precision, regardless of the sizes of the operands.  On the 
  830.            architecture for which you are compiling, single precision may be 
  831.            faster than double precision.  If you must use '-traditional', but 
  832.            want to use single precision operations when the operands are single 
  833.            precision, use this option.  This option has no effect when 
  834.            compiling with ANSI or GNU C conventions (the default). 
  835.  
  836.  
  837. ΓòÉΓòÉΓòÉ 4.5. Options Controlling C++ Dialect ΓòÉΓòÉΓòÉ
  838.  
  839.  This section describes the command-line options that are only meaningful for 
  840.  C++ programs; but you can also use most of the GNU compiler options regardless 
  841.  of what language your program is in.  For example, you might compile a file 
  842.  firstClass.C like this: 
  843.  
  844.                       g++ -g -felide-constructors -O -c firstClass.C
  845.  
  846.  In this example, only '-felide-constructors' is an option meant only for C++ 
  847.  programs; you can use the other options with any language supported by GNU CC. 
  848.  
  849.  Here is a list of options that are only for compiling C++ programs: 
  850.  
  851.  -fno-access-control 
  852.            Turn off all access checking.  This switch is mainly useful for 
  853.            working around bugs in the access control code. 
  854.  
  855.  -fall-virtual 
  856.            Treat all possible member functions as virtual, implicitly. All 
  857.            member functions (except for constructor functions and new or delete 
  858.            member operators) are treated as virtual functions of the class 
  859.            where they appear. 
  860.  
  861.            This does not mean that all calls to these member functions will be 
  862.            made through the internal table of virtual functions.  Under some 
  863.            circumstances, the compiler can determine that a call to a given 
  864.            virtual function can be made directly; in these cases the calls are 
  865.            direct in any case. 
  866.  
  867.  -fcheck-new 
  868.            Check that the pointer returned by operator new is non-null before 
  869.            attempting to modify the storage allocated.  The current Working 
  870.            Paper requires that operator new never return a null pointer, so 
  871.            this check is normally unnecessary. 
  872.  
  873.  -fconserve-space 
  874.            Put uninitialized or runtime-initialized global variables into the 
  875.            common segment, as C does.  This saves space in the executable at 
  876.            the cost of not diagnosing duplicate definitions.  If you compile 
  877.            with this flag and your program mysteriously crashes after main() 
  878.            has completed, you may have an object that is being destroyed twice 
  879.            because two definitions were merged. 
  880.  
  881.  -fdollars-in-identifiers 
  882.            Accept '$' in identifiers.  You can also explicitly prohibit use of 
  883.            '$' with the option '-fno-dollars-in-identifiers'.  (GNU C allows 
  884.            '$' by default on most target systems, but there are a few 
  885.            exceptions.) Traditional C allowed the character '$' to form part of 
  886.            identifiers.  However, ANSI C and C++ forbid '$' in identifiers. 
  887.  
  888.  -fenum-int-equiv 
  889.            Anachronistically permit implicit conversion of int to enumeration 
  890.            types.  Current C++ allows conversion of enum to int, but not the 
  891.            other way around. 
  892.  
  893.  -fexternal-templates 
  894.            Cause template instantiations to obey '#pragma interface' and 
  895.            'implementation'; template instances are emitted or not according to 
  896.            the location of the template definition.  See Template 
  897.            Instantiation, for more information. 
  898.  
  899.            This option is deprecated. 
  900.  
  901.  -falt-external-templates 
  902.            Similar to -fexternal-templates, but template instances are emitted 
  903.            or not according to the place where they are first instantiated. See 
  904.            Template Instantiation, for more information. 
  905.  
  906.            This option is deprecated. 
  907.  
  908.  -ffor-scope 
  909.  
  910.  -fno-for-scope 
  911.            If -ffor-scope is specified, the scope of variables declared in a 
  912.            for-init-statement is limited to the 'for' loop itself, as specified 
  913.            by the draft C++ standard. If -fno-for-scope is specified, the scope 
  914.            of variables declared in a for-init-statement extends to the end of 
  915.            the enclosing scope, as was the case in old versions of gcc, and 
  916.            other (traditional) implementations of C++. 
  917.  
  918.            The default if neither flag is given to follow the standard, but to 
  919.            allow and give a warning for old-style code that would otherwise be 
  920.            invalid, or have different behavior. 
  921.  
  922.  -fno-gnu-keywords 
  923.            Do not recognize classof, headof, signature, sigof or typeof as a 
  924.            keyword, so that code can use these words as identifiers.  You can 
  925.            use the keywords __classof__, __headof__, __signature__, __sigof__, 
  926.            and __typeof__ instead.  '-ansi' implies '-fno-gnu-keywords'. 
  927.  
  928.  -fguiding-decls 
  929.            Treat a function declaration with the same type as a potential 
  930.            function template instantiation as though it declares that 
  931.            instantiation, not a normal function.  If a definition is given for 
  932.            the function later in the translation unit (or another translation 
  933.            unit if the target supports weak symbols), that definition will be 
  934.            used; otherwise the template will be instantiated.  This behavior 
  935.            reflects the C++ language prior to September 1996, when guiding 
  936.            declarations were removed. 
  937.  
  938.            This option implies '-fname-mangling-version-0', and will not work 
  939.            with other name mangling versions. 
  940.  
  941.  -fno-implicit-templates 
  942.            Never emit code for templates which are instantiated implicitly 
  943.            (i.e. by use); only emit code for explicit instantiations.  See 
  944.            Template Instantiation, for more information. 
  945.  
  946.  -fhandle-signatures 
  947.            Recognize the signature and sigof keywords for specifying abstract 
  948.            types.  The default ('-fno-handle-signatures') is not to recognize 
  949.            them.  See C++ Signatures: Type Abstraction using Signatures. 
  950.  
  951.  -fhuge-objects 
  952.            Support virtual function calls for objects that exceed the size 
  953.            representable by a 'short int'.  Users should not use this flag by 
  954.            default; if you need to use it, the compiler will tell you so.  If 
  955.            you compile any of your code with this flag, you must compile all of 
  956.            your code with this flag (including the C++ library, if you use it). 
  957.  
  958.            This flag is not useful when compiling with -fvtable-thunks. 
  959.  
  960.  -fno-implement-inlines 
  961.            To save space, do not emit out-of-line copies of inline functions 
  962.            controlled by '#pragma implementation'.  This will cause linker 
  963.            errors if these functions are not inlined everywhere they are 
  964.            called. 
  965.  
  966.  -fmemoize-lookups 
  967.  
  968.  -fsave-memoized 
  969.            Use heuristics to compile faster.  These heuristics are not enabled 
  970.            by default, since they are only effective for certain input files. 
  971.            Other input files compile more slowly. 
  972.  
  973.            The first time the compiler must build a call to a member function 
  974.            (or reference to a data member), it must (1) determine whether the 
  975.            class implements member functions of that name; (2) resolve which 
  976.            member function to call (which involves figuring out what sorts of 
  977.            type conversions need to be made); and (3) check the visibility of 
  978.            the member function to the caller.  All of this adds up to slower 
  979.            compilation. Normally, the second time a call is made to that member 
  980.            function (or reference to that data member), it must go through the 
  981.            same lengthy process again.  This means that code like this: 
  982.  
  983.                       cout << "This " << p << " has " << n << " legs.\n";
  984.  
  985.  makes six passes through all three steps.  By using a software cache, a 
  986.  ``hit'' significantly reduces this cost.  Unfortunately, using the cache 
  987.  introduces another layer of mechanisms which must be implemented, and so 
  988.  incurs its own overhead.  '-fmemoize-lookups' enables the software cache. 
  989.  
  990.  Because access privileges (visibility) to members and member functions may 
  991.  differ from one function context to the next, G++ may need to flush the cache. 
  992.  With the '-fmemoize-lookups' flag, the cache is flushed after every function 
  993.  that is compiled.  The '-fsave-memoized' flag enables the same software cache, 
  994.  but when the compiler determines that the context of the last function 
  995.  compiled would yield the same access privileges of the next function to 
  996.  compile, it preserves the cache. This is most helpful when defining many 
  997.  member functions for the same class: with the exception of member functions 
  998.  which are friends of other classes, each member function has exactly the same 
  999.  access privileges as every other, and the cache need not be flushed. 
  1000.  
  1001.  The code that implements these flags has rotted; you should probably avoid 
  1002.  using them. 
  1003.  
  1004.  -fstrict-prototype 
  1005.            Within an 'extern "C"' linkage specification, treat a function 
  1006.            declaration with no arguments, such as 'int foo ();', as declaring 
  1007.            the function to take no arguments.  Normally, such a declaration 
  1008.            means that the function foo can take any combination of arguments, 
  1009.            as in C.  '-pedantic' implies '-fstrict-prototype' unless overridden 
  1010.            with '-fno-strict-prototype'. 
  1011.  
  1012.            This flag no longer affects declarations with C++ linkage. 
  1013.  
  1014.  -fname-mangling-version-n 
  1015.            Control the way in which names are mangled.  Version 0 is compatible 
  1016.            with versions of g++ before 2.8.  Version 1 is the default.  Version 
  1017.            1 will allow correct mangling of function templates.  For example, 
  1018.            version 0 mangling does not mangle foo<int, double> and foo<int, 
  1019.            char> given this declaration: 
  1020.  
  1021.                       template <class T, class U> void foo(T t);
  1022.  
  1023.  -fno-nonnull-objects 
  1024.            Don't assume that a reference is initialized to refer to a valid 
  1025.            object. Although the current C++ Working Paper prohibits null 
  1026.            references, some old code may rely on them, and you can use 
  1027.            '-fno-nonnull-objects' to turn on checking. 
  1028.  
  1029.            At the moment, the compiler only does this checking for conversions 
  1030.            to virtual base classes. 
  1031.  
  1032.  -foperator-names 
  1033.            Recognize the operator name keywords and, bitand, bitor, compl, not, 
  1034.            or and xor as synonyms for the symbols they refer to.  '-ansi' 
  1035.            implies '-foperator-names'. 
  1036.  
  1037.  -fthis-is-variable 
  1038.            Permit assignment to this.  The incorporation of user-defined free 
  1039.            store management into C++ has made assignment to 'this' an 
  1040.            anachronism.  Therefore, by default it is invalid to assign to this 
  1041.            within a class member function; that is, GNU C++ treats 'this' in a 
  1042.            member function of class X as a non-lvalue of type 'X *'.  However, 
  1043.            for backwards compatibility, you can make it valid with 
  1044.            '-fthis-is-variable'. 
  1045.  
  1046.  -fvtable-thunks 
  1047.            Use 'thunks' to implement the virtual function dispatch table 
  1048.            ('vtable').  The traditional (cfront-style) approach to implementing 
  1049.            vtables was to store a pointer to the function and two offsets for 
  1050.            adjusting the 'this' pointer at the call site.  Newer 
  1051.            implementations store a single pointer to a 'thunk' function which 
  1052.            does any necessary adjustment and then calls the target function. 
  1053.  
  1054.            This option also enables a heuristic for controlling emission of 
  1055.            vtables; if a class has any non-inline virtual functions, the vtable 
  1056.            will be emitted in the translation unit containing the first one of 
  1057.            those. 
  1058.  
  1059.  -ftemplate-depth-n 
  1060.            Set the maximum instantiation depth for template classes to n. A 
  1061.            limit on the template instantiation depth is needed to detect 
  1062.            endless recursions during template class instantiation. ANSI/ISO C++ 
  1063.            conforming programs must not rely on a maximum depth greater than 
  1064.            17. 
  1065.  
  1066.  -nostdinc++ 
  1067.            Do not search for header files in the standard directories specific 
  1068.            to C++, but do still search the other standard directories.  (This 
  1069.            option is used when building the C++ library.) 
  1070.  
  1071.  -traditional 
  1072.            For C++ programs (in addition to the effects that apply to both C 
  1073.            and C++), this has the same effect as '-fthis-is-variable'. See 
  1074.            Options Controlling C Dialect. 
  1075.  
  1076.  In addition, these optimization, warning, and code generation options have 
  1077.  meanings only for C++ programs: 
  1078.  
  1079.  -fno-default-inline 
  1080.            Do not assume 'inline' for functions defined inside a class scope. 
  1081.            See Options That Control Optimization. 
  1082.  
  1083.  -Wold-style-cast 
  1084.  
  1085.  -Woverloaded-virtual 
  1086.  
  1087.  -Wtemplate-debugging 
  1088.            Warnings that apply only to C++ programs.  See Options to Request or 
  1089.            Suppress Warnings. 
  1090.  
  1091.  -Weffc++ 
  1092.            Warn about violation of some style rules from Effective C++ by Scott 
  1093.            Myers. 
  1094.  
  1095.  +en 
  1096.            Control how virtual function definitions are used, in a fashion 
  1097.            compatible with cfront 1.x.  See Options for Code Generation 
  1098.            Conventions. 
  1099.  
  1100.  
  1101. ΓòÉΓòÉΓòÉ 4.6. Options to Request or Suppress Warnings ΓòÉΓòÉΓòÉ
  1102.  
  1103.  Warnings are diagnostic messages that report constructions which are not 
  1104.  inherently erroneous but which are risky or suggest there may have been an 
  1105.  error. 
  1106.  
  1107.  You can request many specific warnings with options beginning '-W', for 
  1108.  example '-Wimplicit' to request warnings on implicit declarations.  Each of 
  1109.  these specific warning options also has a negative form beginning '-Wno-' to 
  1110.  turn off warnings; for example, '-Wno-implicit'.  This manual lists only one 
  1111.  of the two forms, whichever is not the default. 
  1112.  
  1113.  These options control the amount and kinds of warnings produced by GNU CC: 
  1114.  
  1115.  -fsyntax-only 
  1116.            Check the code for syntax errors, but don't do anything beyond that. 
  1117.  
  1118.  -pedantic 
  1119.            Issue all the warnings demanded by strict ANSI standard C; reject 
  1120.            all programs that use forbidden extensions. 
  1121.  
  1122.            Valid ANSI standard C programs should compile properly with or 
  1123.            without this option (though a rare few will require '-ansi'). 
  1124.            However, without this option, certain GNU extensions and traditional 
  1125.            C features are supported as well.  With this option, they are 
  1126.            rejected. 
  1127.  
  1128.            '-pedantic' does not cause warning messages for use of the alternate 
  1129.            keywords whose names begin and end with '__'.  Pedantic warnings are 
  1130.            also disabled in the expression that follows __extension__. 
  1131.            However, only system header files should use these escape routes; 
  1132.            application programs should avoid them. See Alternate Keywords. 
  1133.  
  1134.            This option is not intended to be useful; it exists only to satisfy 
  1135.            pedants who would otherwise claim that GNU CC fails to support the 
  1136.            ANSI standard. 
  1137.  
  1138.            Some users try to use '-pedantic' to check programs for strict ANSI 
  1139.            C conformance.  They soon find that it does not do quite what they 
  1140.            want: it finds some non-ANSI practices, but not all---only those for 
  1141.            which ANSI C requires a diagnostic. 
  1142.  
  1143.            A feature to report any failure to conform to ANSI C might be useful 
  1144.            in some instances, but would require considerable additional work 
  1145.            and would be quite different from '-pedantic'.  We recommend, 
  1146.            rather, that users take advantage of the extensions of GNU C and 
  1147.            disregard the limitations of other compilers.  Aside from certain 
  1148.            supercomputers and obsolete small machines, there is less and less 
  1149.            reason ever to use any other C compiler other than for bootstrapping 
  1150.            GNU CC. 
  1151.  
  1152.  -pedantic-errors 
  1153.            Like '-pedantic', except that errors are produced rather than 
  1154.            warnings. 
  1155.  
  1156.  -w 
  1157.            Inhibit all warning messages. 
  1158.  
  1159.  -Wno-import 
  1160.            Inhibit warning messages about the use of '#import'. 
  1161.  
  1162.  -Wchar-subscripts 
  1163.            Warn if an array subscript has type char.  This is a common cause of 
  1164.            error, as programmers often forget that this type is signed on some 
  1165.            machines. 
  1166.  
  1167.  -Wcomment 
  1168.            Warn whenever a comment-start sequence '/*' appears in a '/*' 
  1169.            comment, or whenever a Backslash-Newline appears in a '//' comment. 
  1170.  
  1171.  -Wformat 
  1172.            Check calls to printf and scanf, etc., to make sure that the 
  1173.            arguments supplied have types appropriate to the format string 
  1174.            specified. 
  1175.  
  1176.  -Wimplicit-int 
  1177.            Warn when a declaration does not specify a type. 
  1178.  
  1179.  -Wimplicit-function-declarations 
  1180.            Warn whenever a function is used before being declared. 
  1181.  
  1182.  -Wimplicit 
  1183.            Same as '-Wimplicit-int' '-Wimplicit-function-declaration'. 
  1184.  
  1185.  -Wmain 
  1186.            Warn if the type of 'main' is suspicious.  'main' should be a 
  1187.            function with external linkage, returning int, taking either zero 
  1188.            arguments, two, or three arguments of appropriate types. 
  1189.  
  1190.  -Wparentheses 
  1191.            Warn if parentheses are omitted in certain contexts, such as when 
  1192.            there is an assignment in a context where a truth value is expected, 
  1193.            or when operators are nested whose precedence people often get 
  1194.            confused about. 
  1195.  
  1196.            Also warn about constructions where there may be confusion to which 
  1197.            if statement an else branch belongs.  Here is an example of such a 
  1198.            case: 
  1199.  
  1200.                       {
  1201.                        if (a)
  1202.                         if (b)
  1203.                          foo ();
  1204.                        else
  1205.                         bar ();
  1206.                       }
  1207.  
  1208.  In C, every else branch belongs to the innermost possible if statement, which 
  1209.  in this example is if (b).  This is often not what the programmer expected, as 
  1210.  illustrated in the above example by indentation the programmer chose.  When 
  1211.  there is the potential for this confusion, GNU C will issue a warning when 
  1212.  this flag is specified. To eliminate the warning, add explicit braces around 
  1213.  the innermost if statement so there is no way the else could belong to the 
  1214.  enclosing if.  The resulting code would look like this: 
  1215.  
  1216.                       {
  1217.                        if (a)
  1218.                         {
  1219.                          if (b)
  1220.                           foo ();
  1221.                          else
  1222.                           bar ();
  1223.                         }
  1224.                       }
  1225.  
  1226.  -Wreturn-type 
  1227.            Warn whenever a function is defined with a return-type that defaults 
  1228.            to int.  Also warn about any return statement with no return-value 
  1229.            in a function whose return-type is not void. 
  1230.  
  1231.  -Wswitch 
  1232.            Warn whenever a switch statement has an index of enumeral type and 
  1233.            lacks a case for one or more of the named codes of that enumeration. 
  1234.            (The presence of a default label prevents this warning.)  case 
  1235.            labels outside the enumeration range also provoke warnings when this 
  1236.            option is used. 
  1237.  
  1238.  -Wtrigraphs 
  1239.            Warn if any trigraphs are encountered (assuming they are enabled). 
  1240.  
  1241.  -Wunused 
  1242.            Warn whenever a variable is unused aside from its declaration, 
  1243.            whenever a function is declared static but never defined, whenever a 
  1244.            label is declared but not used, and whenever a statement computes a 
  1245.            result that is explicitly not used. 
  1246.  
  1247.            In order to get a warning about an unused function parameter, you 
  1248.            must specify both '-W' and '-Wunused'. 
  1249.  
  1250.            To suppress this warning for an expression, simply cast it to void. 
  1251.            For unused variables and parameters, use the 'unused' attribute (see 
  1252.            Variable Attributes). 
  1253.  
  1254.  -Wuninitialized 
  1255.            An automatic variable is used without first being initialized. 
  1256.  
  1257.            These warnings are possible only in optimizing compilation, because 
  1258.            they require data flow information that is computed only when 
  1259.            optimizing.  If you don't specify '-O', you simply won't get these 
  1260.            warnings. 
  1261.  
  1262.            These warnings occur only for variables that are candidates for 
  1263.            register allocation.  Therefore, they do not occur for a variable 
  1264.            that is declared volatile, or whose address is taken, or whose size 
  1265.            is other than 1, 2, 4 or 8 bytes.  Also, they do not occur for 
  1266.            structures, unions or arrays, even when they are in registers. 
  1267.  
  1268.            Note that there may be no warning about a variable that is used only 
  1269.            to compute a value that itself is never used, because such 
  1270.            computations may be deleted by data flow analysis before the 
  1271.            warnings are printed. 
  1272.  
  1273.            These warnings are made optional because GNU CC is not smart enough 
  1274.            to see all the reasons why the code might be correct despite 
  1275.            appearing to have an error.  Here is one example of how this can 
  1276.            happen: 
  1277.  
  1278.                       {
  1279.                        int x;
  1280.                        switch (y)
  1281.                         {
  1282.                         case 1: x = 1;
  1283.                          break;
  1284.                         case 2: x = 4;
  1285.                          break;
  1286.                         case 3: x = 5;
  1287.                         }
  1288.                        foo (x);
  1289.                       }
  1290.  
  1291.  If the value of y is always 1, 2 or 3, then x is always initialized, but GNU 
  1292.  CC doesn't know this.  Here is another common case: 
  1293.  
  1294.                       {
  1295.                        int save_y;
  1296.                        if (change_y) save_y = y, y = new_y;
  1297.                        ┬╖┬╖┬╖
  1298.                        if (change_y) y = save_y;
  1299.                       }
  1300.  
  1301.  This has no bug because save_y is used only if it is set. 
  1302.  
  1303.  Some spurious warnings can be avoided if you declare all the functions you use 
  1304.  that never return as noreturn.  See Function Attributes. 
  1305.  
  1306.  -Wreorder (C++ only) 
  1307.            Warn when the order of member initializers given in the code does 
  1308.            not match the order in which they must be executed.  For instance: 
  1309.  
  1310.                       struct A {
  1311.                        int i;
  1312.                        int j;
  1313.                        A(): j (0), i (1) { }
  1314.                       };
  1315.  
  1316.  Here the compiler will warn that the member initializers for 'i' and 'j' will 
  1317.  be rearranged to match the declaration order of the members. 
  1318.  
  1319.  -Wtemplate-debugging 
  1320.            When using templates in a C++ program, warn if debugging is not yet 
  1321.            fully available (C++ only). 
  1322.  
  1323.  -Wall 
  1324.            All of the above '-W' options combined.  This enables all the 
  1325.            warnings about constructions that some users consider questionable, 
  1326.            and that are easy to avoid (or modify to prevent the warning), even 
  1327.            in conjunction with macros. 
  1328.  
  1329.  The following '-W┬╖┬╖┬╖' options are not implied by '-Wall'. Some of them warn 
  1330.  about constructions that users generally do not consider questionable, but 
  1331.  which occasionally you might wish to check for; others warn about 
  1332.  constructions that are necessary or hard to avoid in some cases, and there is 
  1333.  no simple way to modify the code to suppress the warning. 
  1334.  
  1335.  -W 
  1336.            Print extra warning messages for these events: 
  1337.  
  1338.                1. A nonvolatile automatic variable might be changed by a call 
  1339.                   to longjmp.  These warnings as well are possible only in 
  1340.                   optimizing compilation. 
  1341.  
  1342.                   The compiler sees only the calls to setjmp.  It cannot know 
  1343.                   where longjmp will be called; in fact, a signal handler could 
  1344.                   call it at any point in the code.  As a result, you may get a 
  1345.                   warning even when there is in fact no problem because longjmp 
  1346.                   cannot in fact be called at the place which would cause a 
  1347.                   problem. 
  1348.  
  1349.                2. A function can return either with or without a value. 
  1350.                   (Falling off the end of the function body is considered 
  1351.                   returning without a value.)  For example, this function would 
  1352.                   evoke such a warning: 
  1353.  
  1354.                                                         foo (a)
  1355.                                                         {
  1356.                                                          if (a > 0)
  1357.                                                           return a;
  1358.                                                         }
  1359.  
  1360.                3. An expression-statement or the left-hand side of a comma 
  1361.                   expression contains no side effects. To suppress the warning, 
  1362.                   cast the unused expression to void. For example, an 
  1363.                   expression such as 'x[i,j]' will cause a warning, but 
  1364.                   'x[(void)i,j]' will not. 
  1365.  
  1366.                4. An unsigned value is compared against zero with '<' or '<='. 
  1367.  
  1368.                5. A comparison like 'x<=y<=z' appears; this is equivalent to 
  1369.                   '(x<=y ? 1 : 0) <= z', which is a different interpretation 
  1370.                   from that of ordinary mathematical notation. 
  1371.  
  1372.                6. Storage-class specifiers like static are not the first things 
  1373.                   in a declaration.  According to the C Standard, this usage is 
  1374.                   obsolescent. 
  1375.  
  1376.                7. If '-Wall' or '-Wunused' is also specified, warn about unused 
  1377.                   arguments. 
  1378.  
  1379.                8. A comparison between signed and unsigned values could produce 
  1380.                   an incorrect result when the signed value is converted to 
  1381.                   unsigned. (But do not warn if '-Wno-sign-compare' is also 
  1382.                   specified.) 
  1383.  
  1384.                9. An aggregate has a partly bracketed initializer. For example, 
  1385.                   the following code would evoke such a warning, because braces 
  1386.                   are missing around the initializer for x.h: 
  1387.  
  1388.                                                         struct s { int f, g; };
  1389.                                                         struct t { struct s h; int i; };
  1390.                                                         struct t x = { 1, 2, 3 };
  1391.  
  1392.  -Wtraditional 
  1393.            Warn about certain constructs that behave differently in traditional 
  1394.            and ANSI C. 
  1395.  
  1396.                1. Macro arguments occurring within string constants in the 
  1397.                   macro body. These would substitute the argument in 
  1398.                   traditional C, but are part of the constant in ANSI C. 
  1399.  
  1400.                2. A function declared external in one block and then used after 
  1401.                   the end of the block. 
  1402.  
  1403.                3. A switch statement has an operand of type long. 
  1404.  
  1405.  -Wundef 
  1406.            Warn if an undefined identifier is evaluated in an '#if' directive. 
  1407.  
  1408.  -Wshadow 
  1409.            Warn whenever a local variable shadows another local variable. 
  1410.  
  1411.  -Wid-clash-len 
  1412.            Warn whenever two distinct identifiers match in the first len 
  1413.            characters.  This may help you prepare a program that will compile 
  1414.            with certain obsolete, brain-damaged compilers. 
  1415.  
  1416.  -Wlarger-than-len 
  1417.            Warn whenever an object of larger than len bytes is defined. 
  1418.  
  1419.  -Wpointer-arith 
  1420.            Warn about anything that depends on the ``size of'' a function type 
  1421.            or of void.  GNU C assigns these types a size of 1, for convenience 
  1422.            in calculations with void * pointers and pointers to functions. 
  1423.  
  1424.  -Wbad-function-cast 
  1425.            Warn whenever a function call is cast to a non-matching type. For 
  1426.            example, warn if int malloc() is cast to anything *. 
  1427.  
  1428.  -Wcast-qual 
  1429.            Warn whenever a pointer is cast so as to remove a type qualifier 
  1430.            from the target type.  For example, warn if a const char * is cast 
  1431.            to an ordinary char *. 
  1432.  
  1433.  -Wcast-align 
  1434.            Warn whenever a pointer is cast such that the required alignment of 
  1435.            the target is increased.  For example, warn if a char * is cast to 
  1436.            an int * on machines where integers can only be accessed at two- or 
  1437.            four-byte boundaries. 
  1438.  
  1439.  -Wwrite-strings 
  1440.            Give string constants the type const char[length] so that copying 
  1441.            the address of one into a non-const char * pointer will get a 
  1442.            warning.  These warnings will help you find at compile time code 
  1443.            that can try to write into a string constant, but only if you have 
  1444.            been very careful about using const in declarations and prototypes. 
  1445.            Otherwise, it will just be a nuisance; this is why we did not make 
  1446.            '-Wall' request these warnings. 
  1447.  
  1448.  -Wconversion 
  1449.            Warn if a prototype causes a type conversion that is different from 
  1450.            what would happen to the same argument in the absence of a 
  1451.            prototype.  This includes conversions of fixed point to floating and 
  1452.            vice versa, and conversions changing the width or signedness of a 
  1453.            fixed point argument except when the same as the default promotion. 
  1454.  
  1455.            Also, warn if a negative integer constant expression is implicitly 
  1456.            converted to an unsigned type.  For example, warn about the 
  1457.            assignment x = -1 if x is unsigned.  But do not warn about explicit 
  1458.            casts like (unsigned) -1. 
  1459.  
  1460.  -Wsign-compare 
  1461.            Warn when a comparison between signed and unsigned values could 
  1462.            produce an incorrect result when the signed value is converted to 
  1463.            unsigned. This warning is also enabled by '-W'; to get the other 
  1464.            warnings of '-W' without this warning, use '-W -Wno-sign-compare'. 
  1465.  
  1466.  -Waggregate-return 
  1467.            Warn if any functions that return structures or unions are defined 
  1468.            or called.  (In languages where you can return an array, this also 
  1469.            elicits a warning.) 
  1470.  
  1471.  -Wstrict-prototypes 
  1472.            Warn if a function is declared or defined without specifying the 
  1473.            argument types.  (An old-style function definition is permitted 
  1474.            without a warning if preceded by a declaration which specifies the 
  1475.            argument types.) 
  1476.  
  1477.  -Wmissing-prototypes 
  1478.            Warn if a global function is defined without a previous prototype 
  1479.            declaration.  This warning is issued even if the definition itself 
  1480.            provides a prototype.  The aim is to detect global functions that 
  1481.            fail to be declared in header files. 
  1482.  
  1483.  -Wmissing-declarations 
  1484.            Warn if a global function is defined without a previous declaration. 
  1485.            Do so even if the definition itself provides a prototype. Use this 
  1486.            option to detect global functions that are not declared in header 
  1487.            files. 
  1488.  
  1489.  -Wredundant-decls 
  1490.            Warn if anything is declared more than once in the same scope, even 
  1491.            in cases where multiple declaration is valid and changes nothing. 
  1492.  
  1493.  -Wnested-externs 
  1494.            Warn if an extern declaration is encountered within an function. 
  1495.  
  1496.  -Winline 
  1497.            Warn if a function can not be inlined, and either it was declared as 
  1498.            inline, or else the '-finline-functions' option was given. 
  1499.  
  1500.  -Wold-style-cast 
  1501.            Warn if an old-style (C-style) cast is used within a program. 
  1502.  
  1503.  -Woverloaded-virtual 
  1504.            Warn when a derived class function declaration may be an error in 
  1505.            defining a virtual function (C++ only).  In a derived class, the 
  1506.            definitions of virtual functions must match the type signature of a 
  1507.            virtual function declared in the base class.  With this option, the 
  1508.            compiler warns when you define a function with the same name as a 
  1509.            virtual function, but with a type signature that does not match any 
  1510.            declarations from the base class. 
  1511.  
  1512.  -Wsynth (C++ only) 
  1513.            Warn when g++'s synthesis behavior does not match that of cfront. 
  1514.            For instance: 
  1515.  
  1516.                                               struct A {
  1517.                                                operator int ();
  1518.                                                A& operator = (int);
  1519.                                               };
  1520.                                               main ()
  1521.                                               {
  1522.                                                A a,b;
  1523.                                                a = b;
  1524.                                               }
  1525.  
  1526.              In this example, g++ will synthesize a default 'A& operator = 
  1527.              (const A&);', while cfront will use the user-defined 'operator ='. 
  1528.  
  1529.  -Werror 
  1530.            Make all warnings into errors. 
  1531.  
  1532.  
  1533. ΓòÉΓòÉΓòÉ 4.7. Options for Debugging Your Program or GNU CC ΓòÉΓòÉΓòÉ
  1534.  
  1535.  GNU CC has various special options that are used for debugging either your 
  1536.  program or GCC: 
  1537.  
  1538.  -g 
  1539.            Produce debugging information in the operating system's native 
  1540.            format (stabs, COFF, XCOFF, or DWARF).  GDB can work with this 
  1541.            debugging information. 
  1542.  
  1543.            On most systems that use stabs format, '-g' enables use of extra 
  1544.            debugging information that only GDB can use; this extra information 
  1545.            makes debugging work better in GDB but will probably make other 
  1546.            debuggers crash or refuse to read the program.  If you want to 
  1547.            control for certain whether to generate the extra information, use 
  1548.            '-gstabs+', '-gstabs', '-gxcoff+', '-gxcoff', '-gdwarf-1+', or 
  1549.            '-gdwarf-1' (see below). 
  1550.  
  1551.            Unlike most other C compilers, GNU CC allows you to use '-g' with 
  1552.            '-O'.  The shortcuts taken by optimized code may occasionally 
  1553.            produce surprising results: some variables you declared may not 
  1554.            exist at all; flow of control may briefly move where you did not 
  1555.            expect it; some statements may not be executed because they compute 
  1556.            constant results or their values were already at hand; some 
  1557.            statements may execute in different places because they were moved 
  1558.            out of loops. 
  1559.  
  1560.            Nevertheless it proves possible to debug optimized output.  This 
  1561.            makes it reasonable to use the optimizer for programs that might 
  1562.            have bugs. 
  1563.  
  1564.            The following options are useful when GNU CC is generated with the 
  1565.            capability for more than one debugging format. 
  1566.  
  1567.  -ggdb 
  1568.            Produce debugging information for use by GDB.  This means to use the 
  1569.            most expressive format available (DWARF 2, stabs, or the native 
  1570.            format if neither of those are supported), including GDB extensions 
  1571.            if at all possible. 
  1572.  
  1573.  -gstabs 
  1574.            Produce debugging information in stabs format (if that is 
  1575.            supported), without GDB extensions.  This is the format used by DBX 
  1576.            on most BSD systems.  On MIPS, Alpha and System V Release 4 systems 
  1577.            this option produces stabs debugging output which is not understood 
  1578.            by DBX or SDB. On System V Release 4 systems this option requires 
  1579.            the GNU assembler. 
  1580.  
  1581.  -gstabs+ 
  1582.            Produce debugging information in stabs format (if that is 
  1583.            supported), using GNU extensions understood only by the GNU debugger 
  1584.            (GDB).  The use of these extensions is likely to make other 
  1585.            debuggers crash or refuse to read the program. 
  1586.  
  1587.  -gcoff 
  1588.            Produce debugging information in COFF format (if that is supported). 
  1589.            This is the format used by SDB on most System V systems prior to 
  1590.            System V Release 4. 
  1591.  
  1592.  -gxcoff 
  1593.            Produce debugging information in XCOFF format (if that is 
  1594.            supported). This is the format used by the DBX debugger on IBM 
  1595.            RS/6000 systems. 
  1596.  
  1597.  -gxcoff+ 
  1598.            Produce debugging information in XCOFF format (if that is 
  1599.            supported), using GNU extensions understood only by the GNU debugger 
  1600.            (GDB).  The use of these extensions is likely to make other 
  1601.            debuggers crash or refuse to read the program, and may cause 
  1602.            assemblers other than the GNU assembler (GAS) to fail with an error. 
  1603.  
  1604.  -gdwarf 
  1605.            Produce debugging information in DWARF version 1 format (if that is 
  1606.            supported).  This is the format used by SDB on most System V Release 
  1607.            4 systems. 
  1608.  
  1609.  -gdwarf+ 
  1610.            Produce debugging information in DWARF version 1 format (if that is 
  1611.            supported), using GNU extensions understood only by the GNU debugger 
  1612.            (GDB).  The use of these extensions is likely to make other 
  1613.            debuggers crash or refuse to read the program. 
  1614.  
  1615.  -gdwarf-2 
  1616.            Produce debugging information in DWARF version 2 format (if that is 
  1617.            supported).  This is the format used by DBX on IRIX 6. 
  1618.  
  1619.  -glevel 
  1620.  
  1621.  -ggdblevel 
  1622.  
  1623.  -gstabslevel 
  1624.  
  1625.  -gcofflevel 
  1626.  
  1627.  -gxcofflevel 
  1628.  
  1629.  -gdwarflevel 
  1630.  
  1631.  -gdwarf-2level 
  1632.            Request debugging information and also use level to specify how much 
  1633.            information.  The default level is 2. 
  1634.  
  1635.            Level 1 produces minimal information, enough for making backtraces 
  1636.            in parts of the program that you don't plan to debug.  This includes 
  1637.            descriptions of functions and external variables, but no information 
  1638.            about local variables and no line numbers. 
  1639.  
  1640.            Level 3 includes extra information, such as all the macro 
  1641.            definitions present in the program.  Some debuggers support macro 
  1642.            expansion when you use '-g3'. 
  1643.  
  1644.  -p 
  1645.            Generate extra code to write profile information suitable for the 
  1646.            analysis program prof.  You must use this option when compiling the 
  1647.            source files you want data about, and you must also use it when 
  1648.            linking. 
  1649.  
  1650.  -pg 
  1651.            Generate extra code to write profile information suitable for the 
  1652.            analysis program gprof.  You must use this option when compiling the 
  1653.            source files you want data about, and you must also use it when 
  1654.            linking. 
  1655.  
  1656.  - a 
  1657.            Generate extra code to write profile information for basic blocks, 
  1658.            which will record the number of times each basic block is executed, 
  1659.            the basic block start address, and the function name containing the 
  1660.            basic block.  If '-g' is used, the line number and filename of the 
  1661.            start of the basic block will also be recorded.  If not overridden 
  1662.            by the machine description, the default action is to append to the 
  1663.            text file 'bb.out'. 
  1664.  
  1665.            This data could be analyzed by a program like tcov.  Note, however, 
  1666.            that the format of the data is not what tcov expects. Eventually GNU 
  1667.            gprof should be extended to process this data. 
  1668.  
  1669.  -ax 
  1670.            Generate extra code to profile basic blocks.  Your executable will 
  1671.            produce output that is a superset of that produced when '-a' is 
  1672.            used.  Additional output is the source and target address of the 
  1673.            basic blocks where a jump takes place, the number of times a jump is 
  1674.            executed, and (optionally) the complete sequence of basic blocks 
  1675.            being executed. The output is appended to file 'bb.out'. 
  1676.  
  1677.            You can examine different profiling aspects without recompilation. 
  1678.            Your executable will read a list of function names from file 
  1679.            'bb.in'. Profiling starts when a function on the list is entered and 
  1680.            stops when that invocation is exited.  To exclude a function from 
  1681.            profiling, prefix its name with `-'.  If a function name is not 
  1682.            unique, you can disambiguate it by writing it in the form 
  1683.            '/path/filename.d:functionname'.  Your executable will write the 
  1684.            available paths and filenames in file 'bb.out'. 
  1685.  
  1686.            Several function names have a special meaning: 
  1687.  
  1688.              __bb_jumps__ 
  1689.                          Write source, target and frequency of jumps to file 
  1690.                          'bb.out'. 
  1691.  
  1692.              __bb_hidecall__ 
  1693.                          Exclude function calls from frequency count. 
  1694.  
  1695.              __bb_showret__ 
  1696.                          Include function returns in frequency count. 
  1697.  
  1698.              __bb_trace__ 
  1699.                          Write the sequence of basic blocks executed to file 
  1700.                          'bbtrace.gz'. The file will be compressed using the 
  1701.                          program 'gzip', which must exist in your PATH.  On 
  1702.                          systems without the 'popen' function, the file will be 
  1703.                          named 'bbtrace' and will not be compressed.  Profiling 
  1704.                          for even a few seconds on these systems will produce a 
  1705.                          very large file.  Note: __bb_hidecall__ and 
  1706.                          __bb_showret__ will not affect the sequence written to 
  1707.                          'bbtrace.gz'. 
  1708.  
  1709.              Here's a short example using different profiling parameters in 
  1710.              file 'bb.in'.  Assume function foo consists of basic blocks 1 and 
  1711.              2 and is called twice from block 3 of function main.  After the 
  1712.              calls, block 3 transfers control to block 4 of main. 
  1713.  
  1714.              With __bb_trace__ and main contained in file 'bb.in', the 
  1715.              following sequence of blocks is written to file 'bbtrace.gz': 0 3 
  1716.              1 2 1 2 4.  The return from block 2 to block 3 is not shown, 
  1717.              because the return is to a point inside the block and not to the 
  1718.              top.  The block address 0 always indicates, that control is 
  1719.              transferred to the trace from somewhere outside the observed 
  1720.              functions.  With '-foo' added to 'bb.in', the blocks of function 
  1721.              foo are removed from the trace, so only 0 3 4 remains. 
  1722.  
  1723.              With __bb_jumps__ and main contained in file 'bb.in', jump 
  1724.              frequencies will be written to file 'bb.out'.  The frequencies are 
  1725.              obtained by constructing a trace of blocks and incrementing a 
  1726.              counter for every neighbouring pair of blocks in the trace.  The 
  1727.              trace 0 3 1 2 1 2 4 displays the following frequencies: 
  1728.  
  1729.                                               Jump from block 0x0 to block 0x3 executed 1 time(s)
  1730.                                               Jump from block 0x3 to block 0x1 executed 1 time(s)
  1731.                                               Jump from block 0x1 to block 0x2 executed 2 time(s)
  1732.                                               Jump from block 0x2 to block 0x1 executed 1 time(s)
  1733.                                               Jump from block 0x2 to block 0x4 executed 1 time(s)
  1734.  
  1735.              With __bb_hidecall__, control transfer due to call instructions is 
  1736.              removed from the trace, that is the trace is cut into three parts: 
  1737.              0 3 4, 0 1 2 and 0 1 2.  With __bb_showret__, control transfer due 
  1738.              to return instructions is added to the trace.  The trace becomes: 
  1739.              0 3 1 2 3 1 2 3 4.  Note, that this trace is not the same, as the 
  1740.              sequence written to 'bbtrace.gz'.  It is solely used for counting 
  1741.              jump frequencies. 
  1742.  
  1743.  -fprofile-arcs 
  1744.            Instrument arcs during compilation.  For each function of your 
  1745.            program, GNU CC creates a program flow graph, then finds a spanning 
  1746.            tree for the graph.  Only arcs that are not on the spanning tree 
  1747.            have to be instrumented: the compiler adds code to count the number 
  1748.            of times that these arcs are executed.  When an arc is the only exit 
  1749.            or only entrance to a block, the instrumentation code can be added 
  1750.            to the block; otherwise, a new basic block must be created to hold 
  1751.            the instrumentation code. 
  1752.  
  1753.            Since not every arc in the program must be instrumented, programs 
  1754.            compiled with this option run faster than programs compiled with 
  1755.            '-a', which adds instrumentation code to every basic block in the 
  1756.            program.  The tradeoff: since gcov does not have execution counts 
  1757.            for all branches, it must start with the execution counts for the 
  1758.            instrumented branches, and then iterate over the program flow graph 
  1759.            until the entire graph has been solved.  Hence, gcov runs a little 
  1760.            more slowly than a program which uses information from '-a'. 
  1761.  
  1762.            '-fprofile-arcs' also makes it possible to estimate branch 
  1763.            probabilities, and to calculate basic block execution counts.  In 
  1764.            general, basic block execution counts do not give enough information 
  1765.            to estimate all branch probabilities.  When the compiled program 
  1766.            exits, it saves the arc execution counts to a file called 
  1767.            'sourcename.da'.  Use the compiler option '-fbranch-probabilities' 
  1768.            (see Options that Control Optimization) when recompiling, to 
  1769.            optimize using estimated branch probabilities. 
  1770.  
  1771.  -ftest-coverage 
  1772.            Create data files for the gcov code-coverage utility (see gcov: a 
  1773.            GNU CC Test Coverage Program). The data file names begin with the 
  1774.            name of your source file: 
  1775.  
  1776.              sourcename.bb 
  1777.                          A mapping from basic blocks to line numbers, which 
  1778.                          gcov uses to associate basic block execution counts 
  1779.                          with line numbers. 
  1780.  
  1781.              sourcename.bbg 
  1782.                          A list of all arcs in the program flow graph.  This 
  1783.                          allows gcov to reconstruct the program flow graph, so 
  1784.                          that it can compute all basic block and arc execution 
  1785.                          counts from the information in the sourcename.da file 
  1786.                          (this last file is the output from '-fprofile-arcs'). 
  1787.  
  1788.  -Q 
  1789.            Makes the compiler print out each function name as it is compiled, 
  1790.            and print some statistics about each pass when it finishes. 
  1791.  
  1792.  -dletters 
  1793.            Says to make debugging dumps during compilation at times specified 
  1794.            by letters.  This is used for debugging the compiler.  The file 
  1795.            names for most of the dumps are made by appending a word to the 
  1796.            source file name (e.g.  'foo.c.rtl' or 'foo.c.jump').  Here are the 
  1797.            possible letters for use in letters, and their meanings: 
  1798.  
  1799.              'M' 
  1800.                          Dump all macro definitions, at the end of 
  1801.                          preprocessing, and write no output. 
  1802.  
  1803.              'N' 
  1804.                          Dump all macro names, at the end of preprocessing. 
  1805.  
  1806.              'D' 
  1807.                          Dump all macro definitions, at the end of 
  1808.                          preprocessing, in addition to normal output. 
  1809.  
  1810.              'y' 
  1811.                          Dump debugging information during parsing, to standard 
  1812.                          error. 
  1813.  
  1814.              'r' 
  1815.                          Dump after RTL generation, to 'file.rtl'. 
  1816.  
  1817.              'x' 
  1818.                          Just generate RTL for a function instead of compiling 
  1819.                          it.  Usually used with 'r'. 
  1820.  
  1821.              'j' 
  1822.                          Dump after first jump optimization, to 'file.jump'. 
  1823.  
  1824.              's' 
  1825.                          Dump after CSE (including the jump optimization that 
  1826.                          sometimes follows CSE), to 'file.cse'. 
  1827.  
  1828.              'D' 
  1829.                          Dump after purging ADDRESSOF, to 'file.addressof'. 
  1830.  
  1831.              'L' 
  1832.                          Dump after loop optimization, to 'file.loop'. 
  1833.  
  1834.              't' 
  1835.                          Dump after the second CSE pass (including the jump 
  1836.                          optimization that sometimes follows CSE), to 
  1837.                          'file.cse2'. 
  1838.  
  1839.              'b' 
  1840.                          Dump after computing branch probabilities, to 
  1841.                          'file.bp'. 
  1842.  
  1843.              'f' 
  1844.                          Dump after flow analysis, to 'file.flow'. 
  1845.  
  1846.              'c' 
  1847.                          Dump after instruction combination, to the file 
  1848.                          'file.combine'. 
  1849.  
  1850.              'S' 
  1851.                          Dump after the first instruction scheduling pass, to 
  1852.                          'file.sched'. 
  1853.  
  1854.              'l' 
  1855.                          Dump after local register allocation, to 'file.lreg'. 
  1856.  
  1857.              'g' 
  1858.                          Dump after global register allocation, to 'file.greg'. 
  1859.  
  1860.              'R' 
  1861.                          Dump after the second instruction scheduling pass, to 
  1862.                          'file.sched2'. 
  1863.  
  1864.              'J' 
  1865.                          Dump after last jump optimization, to 'file.jump2'. 
  1866.  
  1867.              'd' 
  1868.                          Dump after delayed branch scheduling, to 'file.dbr'. 
  1869.  
  1870.              'k' 
  1871.                          Dump after conversion from registers to stack, to 
  1872.                          'file.stack'. 
  1873.  
  1874.              'a' 
  1875.                          Produce all the dumps listed above. 
  1876.  
  1877.              'm' 
  1878.                          Print statistics on memory usage, at the end of the 
  1879.                          run, to standard error. 
  1880.  
  1881.              'p' 
  1882.                          Annotate the assembler output with a comment 
  1883.                          indicating which pattern and alternative was used. 
  1884.  
  1885.              'A' 
  1886.                          Annotate the assembler output with miscellaneous 
  1887.                          debugging information. 
  1888.  
  1889.  -fpretend-float 
  1890.            When running a cross-compiler, pretend that the target machine uses 
  1891.            the same floating point format as the host machine.  This causes 
  1892.            incorrect output of the actual floating constants, but the actual 
  1893.            instruction sequence will probably be the same as GNU CC would make 
  1894.            when running on the target machine. 
  1895.  
  1896.  -save-temps 
  1897.            Store the usual ``temporary'' intermediate files permanently; place 
  1898.            them in the current directory and name them based on the source 
  1899.            file.  Thus, compiling 'foo.c' with '-c -save-temps' would produce 
  1900.            files 'foo.i' and 'foo.s', as well as 'foo.o'. 
  1901.  
  1902.  -print-file-name=library 
  1903.            Print the full absolute name of the library file library that would 
  1904.            be used when linking---and don't do anything else.  With this 
  1905.            option, GNU CC does not compile or link anything; it just prints the 
  1906.            file name. 
  1907.  
  1908.  -print-prog-name=program 
  1909.            Like '-print-file-name', but searches for a program such as 'cpp'. 
  1910.  
  1911.  -print-libgcc-file-name 
  1912.            Same as '-print-file-name=libgcc.a'. 
  1913.  
  1914.            This is useful when you use '-nostdlib' or '-nodefaultlibs' but you 
  1915.            do want to link with 'libgcc.a'.  You can do 
  1916.  
  1917.                                               gcc -nostdlib files┬╖┬╖┬╖ `gcc -print-libgcc-file-name`
  1918.  
  1919.  -print-search-dirs 
  1920.            Print the name of the configured installation directory and a list 
  1921.            of program and library directories gcc will search---and don't do 
  1922.            anything else. 
  1923.  
  1924.            This is useful when gcc prints the error message 'installation 
  1925.            problem, cannot exec cpp: No such file or directory'. To resolve 
  1926.            this you either need to put 'cpp' and the other compiler components 
  1927.            where gcc expects to find them, or you can set the environment 
  1928.            variable GCC_EXEC_PREFIX to the directory where you installed them. 
  1929.            Don't forget the trailing '/'. See Environment Variables. 
  1930.  
  1931.  
  1932. ΓòÉΓòÉΓòÉ 4.8. Options That Control Optimization ΓòÉΓòÉΓòÉ
  1933.  
  1934.  These options control various sorts of optimizations: 
  1935.  
  1936.  -O 
  1937.  
  1938.  -O1 
  1939.            Optimize.  Optimizing compilation takes somewhat more time, and a 
  1940.            lot more memory for a large function. 
  1941.  
  1942.            Without '-O', the compiler's goal is to reduce the cost of 
  1943.            compilation and to make debugging produce the expected results. 
  1944.            Statements are independent: if you stop the program with a 
  1945.            breakpoint between statements, you can then assign a new value to 
  1946.            any variable or change the program counter to any other statement in 
  1947.            the function and get exactly the results you would expect from the 
  1948.            source code. 
  1949.  
  1950.            Without '-O', the compiler only allocates variables declared 
  1951.            register in registers.  The resulting compiled code is a little 
  1952.            worse than produced by PCC without '-O'. 
  1953.  
  1954.            With '-O', the compiler tries to reduce code size and execution 
  1955.            time. 
  1956.  
  1957.            When you specify '-O', the compiler turns on '-fthread-jumps' and 
  1958.            '-fdefer-pop' on all machines.  The compiler turns on 
  1959.            '-fdelayed-branch' on machines that have delay slots, and 
  1960.            '-fomit-frame-pointer' on machines that can support debugging even 
  1961.            without a frame pointer.  On some machines the compiler also turns 
  1962.            on other flags. 
  1963.  
  1964.  -O2 
  1965.            Optimize even more.  GNU CC performs nearly all supported 
  1966.            optimizations that do not involve a space-speed tradeoff.  The 
  1967.            compiler does not perform loop unrolling or function inlining when 
  1968.            you specify '-O2'. As compared to '-O', this option increases both 
  1969.            compilation time and the performance of the generated code. 
  1970.  
  1971.            '-O2' turns on all optional optimizations except for loop unrolling 
  1972.            and function inlining.  It also turns on the '-fforce-mem' option on 
  1973.            all machines and frame pointer elimination on machines where doing 
  1974.            so does not interfere with debugging. 
  1975.  
  1976.  -O3 
  1977.            Optimize yet more.  '-O3' turns on all optimizations specified by 
  1978.            '-O2' and also turns on the 'inline-functions' option. 
  1979.  
  1980.  -O0 
  1981.            Do not optimize. 
  1982.  
  1983.            If you use multiple '-O' options, with or without level numbers, the 
  1984.            last such option is the one that is effective. 
  1985.  
  1986.  Options of the form '-fflag' specify machine-independent flags.  Most flags 
  1987.  have both positive and negative forms; the negative form of '-ffoo' would be 
  1988.  '-fno-foo'.  In the table below, only one of the forms is listed---the one 
  1989.  which is not the default. You can figure out the other form by either removing 
  1990.  'no-' or adding it. 
  1991.  
  1992.  -ffloat-store 
  1993.            Do not store floating point variables in registers, and inhibit 
  1994.            other options that might change whether a floating point value is 
  1995.            taken from a register or memory. 
  1996.  
  1997.            This option prevents undesirable excess precision on machines such 
  1998.            as the 68000 where the floating registers (of the 68881) keep more 
  1999.            precision than a double is supposed to have.  Similarly for the x86 
  2000.            architecture.  For most programs, the excess precision does only 
  2001.            good, but a few programs rely on the precise definition of IEEE 
  2002.            floating point.  Use '-ffloat-store' for such programs. 
  2003.  
  2004.  -fno-default-inline 
  2005.            Do not make member functions inline by default merely because they 
  2006.            are defined inside the class scope (C++ only).  Otherwise, when you 
  2007.            specify '-O', member functions defined inside class scope are 
  2008.            compiled inline by default; i.e., you don't need to add 'inline' in 
  2009.            front of the member function name. 
  2010.  
  2011.  -fno-defer-pop 
  2012.            Always pop the arguments to each function call as soon as that 
  2013.            function returns.  For machines which must pop arguments after a 
  2014.            function call, the compiler normally lets arguments accumulate on 
  2015.            the stack for several function calls and pops them all at once. 
  2016.  
  2017.  -fforce-mem 
  2018.            Force memory operands to be copied into registers before doing 
  2019.            arithmetic on them.  This produces better code by making all memory 
  2020.            references potential common subexpressions.  When they are not 
  2021.            common subexpressions, instruction combination should eliminate the 
  2022.            separate register-load.  The '-O2' option turns on this option. 
  2023.  
  2024.  -fforce-addr 
  2025.            Force memory address constants to be copied into registers before 
  2026.            doing arithmetic on them.  This may produce better code just as 
  2027.            '-fforce-mem' may. 
  2028.  
  2029.  -fomit-frame-pointer 
  2030.            Don't keep the frame pointer in a register for functions that don't 
  2031.            need one.  This avoids the instructions to save, set up and restore 
  2032.            frame pointers; it also makes an extra register available in many 
  2033.            functions.  It also makes debugging impossible on some machines. 
  2034.  
  2035.            On some machines, such as the Vax, this flag has no effect, because 
  2036.            the standard calling sequence automatically handles the frame 
  2037.            pointer and nothing is saved by pretending it doesn't exist.  The 
  2038.            machine-description macro FRAME_POINTER_REQUIRED controls whether a 
  2039.            target machine supports this flag.  See Section Register Usage of 
  2040.            Using and Porting GCC. 
  2041.  
  2042.  -fno-inline 
  2043.            Don't pay attention to the inline keyword.  Normally this option is 
  2044.            used to keep the compiler from expanding any functions inline. Note 
  2045.            that if you are not optimizing, no functions can be expanded inline. 
  2046.  
  2047.  -finline-functions 
  2048.            Integrate all simple functions into their callers.  The compiler 
  2049.            heuristically decides which functions are simple enough to be worth 
  2050.            integrating in this way. 
  2051.  
  2052.            If all calls to a given function are integrated, and the function is 
  2053.            declared static, then the function is normally not output as 
  2054.            assembler code in its own right. 
  2055.  
  2056.  -fkeep-inline-functions 
  2057.            Even if all calls to a given function are integrated, and the 
  2058.            function is declared static, nevertheless output a separate run-time 
  2059.            callable version of the function.  This switch does not affect 
  2060.            extern inline functions. 
  2061.  
  2062.  -fkeep-static-consts 
  2063.            Emit variables declared static const when optimization isn't turned 
  2064.            on, even if the variables aren't referenced. 
  2065.  
  2066.            GNU CC enables this option by default.  If you want to force the 
  2067.            compiler to check if the variable was referenced, regardless of 
  2068.            whether or not optimization is turned on, use the 
  2069.            '-fno-keep-static-consts' option. 
  2070.  
  2071.  -fno-function-cse 
  2072.            Do not put function addresses in registers; make each instruction 
  2073.            that calls a constant function contain the function's address 
  2074.            explicitly. 
  2075.  
  2076.            This option results in less efficient code, but some strange hacks 
  2077.            that alter the assembler output may be confused by the optimizations 
  2078.            performed when this option is not used. 
  2079.  
  2080.  -ffast-math 
  2081.            This option allows GCC to violate some ANSI or IEEE rules and/or 
  2082.            specifications in the interest of optimizing code for speed.  For 
  2083.            example, it allows the compiler to assume arguments to the sqrt 
  2084.            function are non-negative numbers and that no floating-point values 
  2085.            are NaNs. 
  2086.  
  2087.            This option should never be turned on by any '-O' option since it 
  2088.            can result in incorrect output for programs which depend on an exact 
  2089.            implementation of IEEE or ANSI rules/specifications for math 
  2090.            functions. 
  2091.  
  2092.  The following options control specific optimizations.  The '-O2' option turns 
  2093.  on all of these optimizations except '-funroll-loops' and 
  2094.  '-funroll-all-loops'.  On most machines, the '-O' option turns on the 
  2095.  '-fthread-jumps' and '-fdelayed-branch' options, but specific machines may 
  2096.  handle it differently. 
  2097.  
  2098.  You can use the following flags in the rare cases when ``fine-tuning'' of 
  2099.  optimizations to be performed is desired. 
  2100.  
  2101.  -fstrength-reduce 
  2102.            Perform the optimizations of loop strength reduction and elimination 
  2103.            of iteration variables. 
  2104.  
  2105.  -fthread-jumps 
  2106.            Perform optimizations where we check to see if a jump branches to a 
  2107.            location where another comparison subsumed by the first is found. 
  2108.            If so, the first branch is redirected to either the destination of 
  2109.            the second branch or a point immediately following it, depending on 
  2110.            whether the condition is known to be true or false. 
  2111.  
  2112.  -fcse-follow-jumps 
  2113.            In common subexpression elimination, scan through jump instructions 
  2114.            when the target of the jump is not reached by any other path.  For 
  2115.            example, when CSE encounters an if statement with an else clause, 
  2116.            CSE will follow the jump when the condition tested is false. 
  2117.  
  2118.  -fcse-skip-blocks 
  2119.            This is similar to '-fcse-follow-jumps', but causes CSE to follow 
  2120.            jumps which conditionally skip over blocks.  When CSE encounters a 
  2121.            simple if statement with no else clause, '-fcse-skip-blocks' causes 
  2122.            CSE to follow the jump around the body of the if. 
  2123.  
  2124.  -frerun-cse-after-loop 
  2125.            Re-run common subexpression elimination after loop optimizations has 
  2126.            been performed. 
  2127.  
  2128.  -fexpensive-optimizations 
  2129.            Perform a number of minor optimizations that are relatively 
  2130.            expensive. 
  2131.  
  2132.  -fdelayed-branch 
  2133.            If supported for the target machine, attempt to reorder instructions 
  2134.            to exploit instruction slots available after delayed branch 
  2135.            instructions. 
  2136.  
  2137.  -fschedule-insns 
  2138.            If supported for the target machine, attempt to reorder instructions 
  2139.            to eliminate execution stalls due to required data being 
  2140.            unavailable.  This helps machines that have slow floating point or 
  2141.            memory load instructions by allowing other instructions to be issued 
  2142.            until the result of the load or floating point instruction is 
  2143.            required. 
  2144.  
  2145.  -fschedule-insns2 
  2146.            Similar to '-fschedule-insns', but requests an additional pass of 
  2147.            instruction scheduling after register allocation has been done. 
  2148.            This is especially useful on machines with a relatively small number 
  2149.            of registers and where memory load instructions take more than one 
  2150.            cycle. 
  2151.  
  2152.  -ffunction-sections 
  2153.            Place each function into its own section in the output file if the 
  2154.            target supports arbitrary sections.  The function's name determines 
  2155.            the section's name in the output file. 
  2156.  
  2157.            Use this option on systems where the linker can perform 
  2158.            optimizations to improve locality of reference in the instruction 
  2159.            space.  HPPA processors running HP-UX and Sparc processors running 
  2160.            Solaris 2 have linkers with such optimizations.  Other systems using 
  2161.            the ELF object format as well as AIX may have these optimizations in 
  2162.            the future. 
  2163.  
  2164.            Only use this option when there are significant benefits from doing 
  2165.            so.  When you specify this option, the assembler and linker will 
  2166.            create larger object and executable files and will also be slower. 
  2167.            You will not be able to use gprof on all systems if you specify this 
  2168.            option and you may have problems with debugging if you specify both 
  2169.            this option and '-g'. 
  2170.  
  2171.  -fcaller-saves 
  2172.            Enable values to be allocated in registers that will be clobbered by 
  2173.            function calls, by emitting extra instructions to save and restore 
  2174.            the registers around such calls.  Such allocation is done only when 
  2175.            it seems to result in better code than would otherwise be produced. 
  2176.  
  2177.            This option is enabled by default on certain machines, usually those 
  2178.            which have no call-preserved registers to use instead. 
  2179.  
  2180.  -funroll-loops 
  2181.            Perform the optimization of loop unrolling.  This is only done for 
  2182.            loops whose number of iterations can be determined at compile time 
  2183.            or run time. '-funroll-loop' implies both '-fstrength-reduce' and 
  2184.            '-frerun-cse-after-loop'. 
  2185.  
  2186.  -funroll-all-loops 
  2187.            Perform the optimization of loop unrolling.  This is done for all 
  2188.            loops and usually makes programs run more slowly. 
  2189.            '-funroll-all-loops' implies '-fstrength-reduce' as well as 
  2190.            '-frerun-cse-after-loop'. 
  2191.  
  2192.  -fno-peephole 
  2193.            Disable any machine-specific peephole optimizations. 
  2194.  
  2195.  -fbranch-probabilities 
  2196.            After running a program compiled with '-fprofile-arcs' (see Options 
  2197.            for Debugging Your Program or gcc), you can compile it a second time 
  2198.            using '-fbranch-probabilities', to improve optimizations based on 
  2199.            guessing the path a branch might take. 
  2200.  
  2201.  
  2202. ΓòÉΓòÉΓòÉ 4.9. Options Controlling the Preprocessor ΓòÉΓòÉΓòÉ
  2203.  
  2204.  These options control the C preprocessor, which is run on each C source file 
  2205.  before actual compilation. 
  2206.  
  2207.  If you use the '-E' option, nothing is done except preprocessing. Some of 
  2208.  these options make sense only together with '-E' because they cause the 
  2209.  preprocessor output to be unsuitable for actual compilation. 
  2210.  
  2211.  -include file 
  2212.            Process file as input before processing the regular input file. In 
  2213.            effect, the contents of file are compiled first.  Any '-D' and '-U' 
  2214.            options on the command line are always processed before '-include 
  2215.            file', regardless of the order in which they are written.  All the 
  2216.            '-include' and '-imacros' options are processed in the order in 
  2217.            which they are written. 
  2218.  
  2219.  -imacros file 
  2220.            Process file as input, discarding the resulting output, before 
  2221.            processing the regular input file.  Because the output generated 
  2222.            from file is discarded, the only effect of '-imacros file' is to 
  2223.            make the macros defined in file available for use in the main input. 
  2224.  
  2225.            Any '-D' and '-U' options on the command line are always processed 
  2226.            before '-imacros file', regardless of the order in which they are 
  2227.            written.  All the '-include' and '-imacros' options are processed in 
  2228.            the order in which they are written. 
  2229.  
  2230.  -idirafter dir 
  2231.            Add the directory dir to the second include path.  The directories 
  2232.            on the second include path are searched when a header file is not 
  2233.            found in any of the directories in the main include path (the one 
  2234.            that '-I' adds to). 
  2235.  
  2236.  -iprefix prefix 
  2237.            Specify prefix as the prefix for subsequent '-iwithprefix' options. 
  2238.  
  2239.  -iwithprefix dir 
  2240.            Add a directory to the second include path.  The directory's name is 
  2241.            made by concatenating prefix and dir, where prefix was specified 
  2242.            previously with '-iprefix'.  If you have not specified a prefix yet, 
  2243.            the directory containing the installed passes of the compiler is 
  2244.            used as the default. 
  2245.  
  2246.  -iwithprefixbefore dir 
  2247.            Add a directory to the main include path.  The directory's name is 
  2248.            made by concatenating prefix and dir, as in the case of 
  2249.            '-iwithprefix'. 
  2250.  
  2251.  -isystem dir 
  2252.            Add a directory to the beginning of the second include path, marking 
  2253.            it as a system directory, so that it gets the same special treatment 
  2254.            as is applied to the standard system directories. 
  2255.  
  2256.  -nostdinc 
  2257.            Do not search the standard system directories for header files. 
  2258.            Only the directories you have specified with '-I' options (and the 
  2259.            current directory, if appropriate) are searched.  See Directory 
  2260.            Options, for information on '-I'. 
  2261.  
  2262.            By using both '-nostdinc' and '-I-', you can limit the include-file 
  2263.            search path to only those directories you specify explicitly. 
  2264.  
  2265.  -undef 
  2266.            Do not predefine any nonstandard macros.  (Including architecture 
  2267.            flags). 
  2268.  
  2269.  -E 
  2270.            Run only the C preprocessor.  Preprocess all the C source files 
  2271.            specified and output the results to standard output or to the 
  2272.            specified output file. 
  2273.  
  2274.  -C 
  2275.            Tell the preprocessor not to discard comments.  Used with the '-E' 
  2276.            option. 
  2277.  
  2278.  -P 
  2279.            Tell the preprocessor not to generate '#line' directives. Used with 
  2280.            the '-E' option. 
  2281.  
  2282.  -M 
  2283.            Tell the preprocessor to output a rule suitable for make describing 
  2284.            the dependencies of each object file.  For each source file, the 
  2285.            preprocessor outputs one make-rule whose target is the object file 
  2286.            name for that source file and whose dependencies are all the 
  2287.            #include header files it uses.  This rule may be a single line or 
  2288.            may be continued with '\'-newline if it is long.  The list of rules 
  2289.            is printed on standard output instead of the preprocessed C program. 
  2290.  
  2291.            '-M' implies '-E'. 
  2292.  
  2293.            Another way to specify output of a make rule is by setting the 
  2294.            environment variable DEPENDENCIES_OUTPUT (see Environment 
  2295.            Variables). 
  2296.  
  2297.  -MM 
  2298.            Like '-M' but the output mentions only the user header files 
  2299.            included with '#include "file"'.  System header files included with 
  2300.            '#include <file>' are omitted. 
  2301.  
  2302.  -MD 
  2303.            Like '-M' but the dependency information is written to a file made 
  2304.            by replacing ".c" with ".d" at the end of the input file names. This 
  2305.            is in addition to compiling the file as specified---'-MD' does not 
  2306.            inhibit ordinary compilation the way '-M' does. 
  2307.  
  2308.            In Mach, you can use the utility md to merge multiple dependency 
  2309.            files into a single dependency file suitable for using with the 
  2310.            'make' command. 
  2311.  
  2312.  -MMD 
  2313.            Like '-MD' except mention only user header files, not system header 
  2314.            files. 
  2315.  
  2316.  - MG 
  2317.            Treat missing header files as generated files and assume they live 
  2318.            in the same directory as the source file.  If you specify '-MG', you 
  2319.            must also specify either '-M' or '-MM'.  '-MG' is not supported with 
  2320.            '-MD' or '-MMD'. 
  2321.  
  2322.  -H 
  2323.            Print the name of each header file used, in addition to other normal 
  2324.            activities. 
  2325.  
  2326.  -Aquestion(answer) 
  2327.            Assert the answer answer for question, in case it is tested with a 
  2328.            preprocessing conditional such as '#if #question(answer)'.  '-A-' 
  2329.            disables the standard assertions that normally describe the target 
  2330.            machine. 
  2331.  
  2332.  -Dmacro 
  2333.            Define macro macro with the string '1' as its definition. 
  2334.  
  2335.  -Dmacro=defn 
  2336.            Define macro macro as defn.  All instances of '-D' on the command 
  2337.            line are processed before any '-U' options. 
  2338.  
  2339.  -Umacro 
  2340.            Undefine macro macro.  '-U' options are evaluated after all '-D' 
  2341.            options, but before any '-include' and '-imacros' options. 
  2342.  
  2343.  -dM 
  2344.            Tell the preprocessor to output only a list of the macro definitions 
  2345.            that are in effect at the end of preprocessing.  Used with the '-E' 
  2346.            option. 
  2347.  
  2348.  -dD 
  2349.            Tell the preprocessing to pass all macro definitions into the 
  2350.            output, in their proper sequence in the rest of the output. 
  2351.  
  2352.  -dN 
  2353.            Like '-dD' except that the macro arguments and contents are omitted. 
  2354.            Only '#define name' is included in the output. 
  2355.  
  2356.  -trigraphs 
  2357.            Support ANSI C trigraphs.  The '-ansi' option also has this effect. 
  2358.  
  2359.  -Wp,option 
  2360.            Pass option as an option to the preprocessor.  If option contains 
  2361.            commas, it is split into multiple options at the commas. 
  2362.  
  2363.  
  2364. ΓòÉΓòÉΓòÉ 4.10. Passing Options to the Assembler ΓòÉΓòÉΓòÉ
  2365.  
  2366.  You can pass options to the assembler. 
  2367.  
  2368.  -Wa,option 
  2369.            Pass option as an option to the assembler.  If option contains 
  2370.            commas, it is split into multiple options at the commas. 
  2371.  
  2372.  
  2373. ΓòÉΓòÉΓòÉ 4.11. Options for Linking ΓòÉΓòÉΓòÉ
  2374.  
  2375.  These options come into play when the compiler links object files into an 
  2376.  executable output file.  They are meaningless if the compiler is not doing a 
  2377.  link step. 
  2378.  
  2379.  object-file-name 
  2380.            A file name that does not end in a special recognized suffix is 
  2381.            considered to name an object file or library.  (Object files are 
  2382.            distinguished from libraries by the linker according to the file 
  2383.            contents.)  If linking is done, these object files are used as input 
  2384.            to the linker. 
  2385.  
  2386.  -c 
  2387.  
  2388.  -S 
  2389.  
  2390.  -E 
  2391.            If any of these options is used, then the linker is not run, and 
  2392.            object file names should not be used as arguments.  See Overall 
  2393.            Options. 
  2394.  
  2395.  -llibrary 
  2396.            Search the library named library when linking. 
  2397.  
  2398.            It makes a difference where in the command you write this option; 
  2399.            the linker searches processes libraries and object files in the 
  2400.            order they are specified.  Thus, 'foo.o -lz bar.o' searches library 
  2401.            'z' after file 'foo.o' but before 'bar.o'.  If 'bar.o' refers to 
  2402.            functions in 'z', those functions may not be loaded. 
  2403.  
  2404.            The linker searches a standard list of directories for the library, 
  2405.            which is actually a file named 'liblibrary.a'.  The linker then uses 
  2406.            this file as if it had been specified precisely by name. 
  2407.  
  2408.            The directories searched include several standard system directories 
  2409.            plus any that you specify with '-L'. 
  2410.  
  2411.            Normally the files found this way are library files---archive files 
  2412.            whose members are object files.  The linker handles an archive file 
  2413.            by scanning through it for members which define symbols that have so 
  2414.            far been referenced but not defined.  But if the file that is found 
  2415.            is an ordinary object file, it is linked in the usual fashion.  The 
  2416.            only difference between using an '-l' option and specifying a file 
  2417.            name is that '-l' surrounds library with 'lib' and '.a' and searches 
  2418.            several directories. 
  2419.  
  2420.  -lobjc 
  2421.            You need this special case of the '-l' option in order to link an 
  2422.            Objective C program. 
  2423.  
  2424.  -nostartfiles 
  2425.            Do not use the standard system startup files when linking. The 
  2426.            standard system libraries are used normally, unless -nostdlib or 
  2427.            -nodefaultlibs is used. 
  2428.  
  2429.  -nodefaultlibs 
  2430.            Do not use the standard system libraries when linking. Only the 
  2431.            libraries you specify will be passed to the linker. The standard 
  2432.            startup files are used normally, unless -nostartfiles is used. 
  2433.  
  2434.  -nostdlib 
  2435.            Do not use the standard system startup files or libraries when 
  2436.            linking. No startup files and only the libraries you specify will be 
  2437.            passed to the linker. 
  2438.  
  2439.            One of the standard libraries bypassed by '-nostdlib' and 
  2440.            '-nodefaultlibs' is 'libgcc.a', a library of internal subroutines 
  2441.            that GNU CC uses to overcome shortcomings of particular machines, or 
  2442.            special needs for some languages. (See Section Interfacing to GNU CC 
  2443.            Output of Porting GNU CC, for more discussion of 'libgcc.a'.) In 
  2444.            most cases, you need 'libgcc.a' even when you want to avoid other 
  2445.            standard libraries.  In other words, when you specify '-nostdlib' or 
  2446.            '-nodefaultlibs' you should usually specify '-lgcc' as well. This 
  2447.            ensures that you have no unresolved references to internal GNU CC 
  2448.            library subroutines.  (For example, '__main', used to ensure C++ 
  2449.            constructors will be called; see collect2.) 
  2450.  
  2451.  -s 
  2452.            Remove all symbol table and relocation information from the 
  2453.            executable. 
  2454.  
  2455.  -static 
  2456.            On systems that support dynamic linking, this prevents linking with 
  2457.            the shared libraries.  On other systems, this option has no effect. 
  2458.  
  2459.  -shared 
  2460.            Produce a shared object which can then be linked with other objects 
  2461.            to form an executable.  Not all systems support this option.  You 
  2462.            must also specify '-fpic' or '-fPIC' on some systems when you 
  2463.            specify this option. 
  2464.  
  2465.  -symbolic 
  2466.            Bind references to global symbols when building a shared object. 
  2467.            Warn about any unresolved references (unless overridden by the link 
  2468.            editor option '-Xlinker -z -Xlinker defs').  Only a few systems 
  2469.            support this option. 
  2470.  
  2471.  -Xlinker option 
  2472.            Pass option as an option to the linker.  You can use this to supply 
  2473.            system-specific linker options which GNU CC does not know how to 
  2474.            recognize. 
  2475.  
  2476.            If you want to pass an option that takes an argument, you must use 
  2477.            '-Xlinker' twice, once for the option and once for the argument. For 
  2478.            example, to pass '-assert definitions', you must write '-Xlinker 
  2479.            -assert -Xlinker definitions'.  It does not work to write '-Xlinker 
  2480.            "-assert definitions"', because this passes the entire string as a 
  2481.            single argument, which is not what the linker expects. 
  2482.  
  2483.  -Wl,option 
  2484.            Pass option as an option to the linker.  If option contains commas, 
  2485.            it is split into multiple options at the commas. 
  2486.  
  2487.  -u symbol 
  2488.            Pretend the symbol symbol is undefined, to force linking of library 
  2489.            modules to define it.  You can use '-u' multiple times with 
  2490.            different symbols to force loading of additional library modules. 
  2491.  
  2492.  
  2493. ΓòÉΓòÉΓòÉ 4.12. Options for Directory Search ΓòÉΓòÉΓòÉ
  2494.  
  2495.  These options specify directories to search for header files, for libraries 
  2496.  and for parts of the compiler: 
  2497.  
  2498.  -Idir 
  2499.            Add the directory dir to the head of the list of directories to be 
  2500.            searched for header files.  This can be used to override a system 
  2501.            header file, substituting your own version, since these directories 
  2502.            are searched before the system header file directories.  If you use 
  2503.            more than one '-I' option, the directories are scanned in 
  2504.            left-to-right order; the standard system directories come after. 
  2505.  
  2506.  -I- 
  2507.            Any directories you specify with '-I' options before the '-I-' 
  2508.            option are searched only for the case of '#include "file"'; they are 
  2509.            not searched for '#include <file>'. 
  2510.  
  2511.            If additional directories are specified with '-I' options after the 
  2512.            '-I-', these directories are searched for all '#include' directives. 
  2513.            (Ordinarily all '-I' directories are used this way.) 
  2514.  
  2515.            In addition, the '-I-' option inhibits the use of the current 
  2516.            directory (where the current input file came from) as the first 
  2517.            search directory for '#include "file"'.  There is no way to override 
  2518.            this effect of '-I-'.  With '-I.' you can specify searching the 
  2519.            directory which was current when the compiler was invoked.  That is 
  2520.            not exactly the same as what the preprocessor does by default, but 
  2521.            it is often satisfactory. 
  2522.  
  2523.            '-I-' does not inhibit the use of the standard system directories 
  2524.            for header files.  Thus, '-I-' and '-nostdinc' are independent. 
  2525.  
  2526.  -Ldir 
  2527.            Add directory dir to the list of directories to be searched for 
  2528.            '-l'. 
  2529.  
  2530.  -Bprefix 
  2531.            This option specifies where to find the executables, libraries, 
  2532.            include files, and data files of the compiler itself. 
  2533.  
  2534.            The compiler driver program runs one or more of the subprograms 
  2535.            'cpp', 'cc1', 'as' and 'ld'.  It tries prefix as a prefix for each 
  2536.            program it tries to run, both with and without 'machine/version/' 
  2537.            (see Target Options). 
  2538.  
  2539.            For each subprogram to be run, the compiler driver first tries the 
  2540.            '-B' prefix, if any.  If that name is not found, or if '-B' was not 
  2541.            specified, the driver tries two standard prefixes, which are 
  2542.            '/usr/lib/gcc/' and '/usr/local/lib/gcc-lib/'.  If neither of those 
  2543.            results in a file name that is found, the unmodified program name is 
  2544.            searched for using the directories specified in your 'PATH' 
  2545.            environment variable. 
  2546.  
  2547.            '-B' prefixes that effectively specify directory names also apply to 
  2548.            libraries in the linker, because the compiler translates these 
  2549.            options into '-L' options for the linker.  They also apply to 
  2550.            includes files in the preprocessor, because the compiler translates 
  2551.            these options into '-isystem' options for the preprocessor.  In this 
  2552.            case, the compiler appends 'include' to the prefix. 
  2553.  
  2554.            The run-time support file 'libgcc.a' can also be searched for using 
  2555.            the '-B' prefix, if needed.  If it is not found there, the two 
  2556.            standard prefixes above are tried, and that is all.  The file is 
  2557.            left out of the link if it is not found by those means. 
  2558.  
  2559.            Another way to specify a prefix much like the '-B' prefix is to use 
  2560.            the environment variable GCC_EXEC_PREFIX.  See Environment 
  2561.            Variables. 
  2562.  
  2563.  -specs=file 
  2564.            Process file after the compiler reads in the standard 'specs' file, 
  2565.            in order to override the defaults that the 'gcc' driver program uses 
  2566.            when determining what switches to pass to 'cc1', 'cc1plus', 'as', 
  2567.            'ld', etc.  More than one '-specs='file can be specified on the 
  2568.            command line, and they are processed in order, from left to right. 
  2569.  
  2570.  
  2571. ΓòÉΓòÉΓòÉ 4.13. Specifying Target Machine and Compiler Version ΓòÉΓòÉΓòÉ
  2572.  
  2573.  By default, GNU CC compiles code for the same type of machine that you are 
  2574.  using.  However, it can also be installed as a cross-compiler, to compile for 
  2575.  some other type of machine.  In fact, several different configurations of GNU 
  2576.  CC, for different target machines, can be installed side by side.  Then you 
  2577.  specify which one to use with the '-b' option. 
  2578.  
  2579.  In addition, older and newer versions of GNU CC can be installed side by side. 
  2580.  One of them (probably the newest) will be the default, but you may sometimes 
  2581.  wish to use another. 
  2582.  
  2583.  -b machine 
  2584.            The argument machine specifies the target machine for compilation. 
  2585.            This is useful when you have installed GNU CC as a cross-compiler. 
  2586.  
  2587.            The value to use for machine is the same as was specified as the 
  2588.            machine type when configuring GNU CC as a cross-compiler.  For 
  2589.            example, if a cross-compiler was configured with 'configure i386v', 
  2590.            meaning to compile for an 80386 running System V, then you would 
  2591.            specify '-b i386v' to run that cross compiler. 
  2592.  
  2593.            When you do not specify '-b', it normally means to compile for the 
  2594.            same type of machine that you are using. 
  2595.  
  2596.  -V version 
  2597.            The argument version specifies which version of GNU CC to run. This 
  2598.            is useful when multiple versions are installed.  For example, 
  2599.            version might be '2.0', meaning to run GNU CC version 2.0. 
  2600.  
  2601.            The default version, when you do not specify '-V', is the last 
  2602.            version of GNU CC that you installed. 
  2603.  
  2604.  The '-b' and '-V' options actually work by controlling part of the file name 
  2605.  used for the executable files and libraries used for compilation.  A given 
  2606.  version of GNU CC, for a given target machine, is normally kept in the 
  2607.  directory '/usr/local/lib/gcc-lib/machine/version'. 
  2608.  
  2609.  Thus, sites can customize the effect of '-b' or '-V' either by changing the 
  2610.  names of these directories or adding alternate names (or symbolic links).  If 
  2611.  in directory '/usr/local/lib/gcc-lib/' the file '80386' is a link to the file 
  2612.  'i386v', then '-b 80386' becomes an alias for '-b i386v'. 
  2613.  
  2614.  In one respect, the '-b' or '-V' do not completely change to a different 
  2615.  compiler: the top-level driver program gcc that you originally invoked 
  2616.  continues to run and invoke the other executables (preprocessor, compiler per 
  2617.  se, assembler and linker) that do the real work.  However, since no real work 
  2618.  is done in the driver program, it usually does not matter that the driver 
  2619.  program in use is not the one for the specified target and version. 
  2620.  
  2621.  The only way that the driver program depends on the target machine is in the 
  2622.  parsing and handling of special machine-specific options. However, this is 
  2623.  controlled by a file which is found, along with the other executables, in the 
  2624.  directory for the specified version and target machine.  As a result, a single 
  2625.  installed driver program adapts to any specified target machine and compiler 
  2626.  version. 
  2627.  
  2628.  The driver program executable does control one significant thing, however: the 
  2629.  default version and target machine.  Therefore, you can install different 
  2630.  instances of the driver program, compiled for different targets or versions, 
  2631.  under different names. 
  2632.  
  2633.  For example, if the driver for version 2.0 is installed as ogcc and that for 
  2634.  version 2.1 is installed as gcc, then the command gcc will use version 2.1 by 
  2635.  default, while ogcc will use 2.0 by default.  However, you can choose either 
  2636.  version with either command with the '-V' option. 
  2637.  
  2638.  
  2639. ΓòÉΓòÉΓòÉ 4.14. Hardware Models and Configurations ΓòÉΓòÉΓòÉ
  2640.  
  2641.  Earlier we discussed the standard option '-b' which chooses among different 
  2642.  installed compilers for completely different target machines, such as Vax vs. 
  2643.  68000 vs. 80386. 
  2644.  
  2645.  In addition, each of these target machine types can have its own special 
  2646.  options, starting with '-m', to choose among various hardware models or 
  2647.  configurations---for example, 68010 vs 68020, floating coprocessor or none.  A 
  2648.  single installed version of the compiler can compile for any model or 
  2649.  configuration, according to the options specified. 
  2650.  
  2651.  Some configurations of the compiler also support additional special options, 
  2652.  usually for compatibility with other compilers on the same platform. 
  2653.  
  2654.  M680x0 Options                M680x0 Options 
  2655.  VAX Options                   VAX Options 
  2656.  SPARC Options                 SPARC Options 
  2657.  Convex Options                Convex Options 
  2658.  AMD29K Options                AMD29K Options 
  2659.  ARM Options                   ARM Options 
  2660.  MN10300 Options               MN10300 Options 
  2661.  M32R/D Options                M32R/D Options 
  2662.  M88K Options                  M88K Options 
  2663.  RS/6000 and PowerPC Options   RS/6000 and PowerPC Options 
  2664.  RT Options                    RT Options 
  2665.  MIPS Options                  MIPS Options 
  2666.  i386 Options                  i386 Options 
  2667.  HPPA Options                  HPPA Options 
  2668.  Intel 960 Options             Intel 960 Options 
  2669.  DEC Alpha Options             DEC Alpha Options 
  2670.  Clipper Options               Clipper Options 
  2671.  H8/300 Options                H8/300 Options 
  2672.  SH Options                    SH Options 
  2673.  System V Options              System V Options 
  2674.  V850 Options                  V850 Options 
  2675.  
  2676.  
  2677. ΓòÉΓòÉΓòÉ 4.14.1. M680x0 Options ΓòÉΓòÉΓòÉ
  2678.  
  2679.  These are the '-m' options defined for the 68000 series.  The default values 
  2680.  for these options depends on which style of 68000 was selected when the 
  2681.  compiler was configured; the defaults for the most common choices are given 
  2682.  below. 
  2683.  
  2684.  -m68000 
  2685.  
  2686.  -mc68000 
  2687.            Generate output for a 68000.  This is the default when the compiler 
  2688.            is configured for 68000-based systems. 
  2689.  
  2690.  -m68020 
  2691.  
  2692.  -mc68020 
  2693.            Generate output for a 68020.  This is the default when the compiler 
  2694.            is configured for 68020-based systems. 
  2695.  
  2696.  -m68881 
  2697.            Generate output containing 68881 instructions for floating point. 
  2698.            This is the default for most 68020 systems unless '-nfp' was 
  2699.            specified when the compiler was configured. 
  2700.  
  2701.  -m68030 
  2702.            Generate output for a 68030.  This is the default when the compiler 
  2703.            is configured for 68030-based systems. 
  2704.  
  2705.  -m68040 
  2706.            Generate output for a 68040.  This is the default when the compiler 
  2707.            is configured for 68040-based systems. 
  2708.  
  2709.            This option inhibits the use of 68881/68882 instructions that have 
  2710.            to be emulated by software on the 68040.  If your 68040 does not 
  2711.            have code to emulate those instructions, use '-m68040'. 
  2712.  
  2713.  -m68060 
  2714.            Generate output for a 68060.  This is the default when the compiler 
  2715.            is configured for 68060-based systems. 
  2716.  
  2717.            This option inhibits the use of 68020 and 68881/68882 instructions 
  2718.            that have to be emulated by software on the 68060.  If your 68060 
  2719.            does not have code to emulate those instructions, use '-m68060'. 
  2720.  
  2721.  -m5200 
  2722.            Generate output for a 520X "coldfire" family cpu.  This is the 
  2723.            default when the compiler is configured for 520X-based systems. 
  2724.  
  2725.  -m68020-40 
  2726.            Generate output for a 68040, without using any of the new 
  2727.            instructions. This results in code which can run relatively 
  2728.            efficiently on either a 68020/68881 or a 68030 or a 68040.  The 
  2729.            generated code does use the 68881 instructions that are emulated on 
  2730.            the 68040. 
  2731.  
  2732.  -m68020-60 
  2733.            Generate output for a 68060, without using any of the new 
  2734.            instructions. This results in code which can run relatively 
  2735.            efficiently on either a 68020/68881 or a 68030 or a 68040.  The 
  2736.            generated code does use the 68881 instructions that are emulated on 
  2737.            the 68060. 
  2738.  
  2739.  -mfpa 
  2740.            Generate output containing Sun FPA instructions for floating point. 
  2741.  
  2742.  -msoft-float 
  2743.            Generate output containing library calls for floating point. 
  2744.            Warning: the requisite libraries are not available for all m68k 
  2745.            targets.  Normally the facilities of the machine's usual C compiler 
  2746.            are used, but this can't be done directly in cross-compilation.  You 
  2747.            must make your own arrangements to provide suitable library 
  2748.            functions for cross-compilation.  The embedded targets 'm68k-*-aout' 
  2749.            and 'm68k-*-coff' do provide software floating point support. 
  2750.  
  2751.  -mshort 
  2752.            Consider type int to be 16 bits wide, like short int. 
  2753.  
  2754.  -mnobitfield 
  2755.            Do not use the bit-field instructions.  The '-m68000' option implies 
  2756.            '-mnobitfield'. 
  2757.  
  2758.  -mbitfield 
  2759.            Do use the bit-field instructions.  The '-m68020' option implies 
  2760.            '-mbitfield'.  This is the default if you use a configuration 
  2761.            designed for a 68020. 
  2762.  
  2763.  -mrtd 
  2764.            Use a different function-calling convention, in which functions that 
  2765.            take a fixed number of arguments return with the rtd instruction, 
  2766.            which pops their arguments while returning.  This saves one 
  2767.            instruction in the caller since there is no need to pop the 
  2768.            arguments there. 
  2769.  
  2770.            This calling convention is incompatible with the one normally used 
  2771.            on Unix, so you cannot use it if you need to call libraries compiled 
  2772.            with the Unix compiler. 
  2773.  
  2774.            Also, you must provide function prototypes for all functions that 
  2775.            take variable numbers of arguments (including printf); otherwise 
  2776.            incorrect code will be generated for calls to those functions. 
  2777.  
  2778.            In addition, seriously incorrect code will result if you call a 
  2779.            function with too many arguments.  (Normally, extra arguments are 
  2780.            harmlessly ignored.) 
  2781.  
  2782.            The rtd instruction is supported by the 68010, 68020, 68030, 68040, 
  2783.            and 68060 processors, but not by the 68000 or 5200. 
  2784.  
  2785.  -malign-int 
  2786.  
  2787.  -mno-align-int 
  2788.            Control whether GNU CC aligns int, long, long long, float, double, 
  2789.            and long double variables on a 32-bit boundary ('-malign-int') or a 
  2790.            16-bit boundary ('-mno-align-int'). Aligning variables on 32-bit 
  2791.            boundaries produces code that runs somewhat faster on processors 
  2792.            with 32-bit busses at the expense of more memory. 
  2793.  
  2794.            Warning: if you use the '-malign-int' switch, GNU CC will align 
  2795.            structures containing the above types  differently than most 
  2796.            published application binary interface specifications for the m68k. 
  2797.  
  2798.  
  2799. ΓòÉΓòÉΓòÉ 4.14.2. VAX Options ΓòÉΓòÉΓòÉ
  2800.  
  2801.  These '-m' options are defined for the Vax: 
  2802.  
  2803.  -munix 
  2804.            Do not output certain jump instructions (aobleq and so on) that the 
  2805.            Unix assembler for the Vax cannot handle across long ranges. 
  2806.  
  2807.  -mgnu 
  2808.            Do output those jump instructions, on the assumption that you will 
  2809.            assemble with the GNU assembler. 
  2810.  
  2811.  -mg 
  2812.            Output code for g-format floating point numbers instead of d-format. 
  2813.  
  2814.  
  2815. ΓòÉΓòÉΓòÉ 4.14.3. SPARC Options ΓòÉΓòÉΓòÉ
  2816.  
  2817.  These '-m' switches are supported on the SPARC: 
  2818.  
  2819.  -mno-app-regs 
  2820.  
  2821.  -mapp-regs 
  2822.            Specify '-mapp-regs' to generate output using the global registers 2 
  2823.            through 4, which the SPARC SVR4 ABI reserves for applications.  This 
  2824.            is the default. 
  2825.  
  2826.            To be fully SVR4 ABI compliant at the cost of some performance loss, 
  2827.            specify '-mno-app-regs'.  You should compile libraries and system 
  2828.            software with this option. 
  2829.  
  2830.  -mfpu 
  2831.  
  2832.  -mhard-float 
  2833.            Generate output containing floating point instructions.  This is the 
  2834.            default. 
  2835.  
  2836.  -mno-fpu 
  2837.  
  2838.  -msoft-float 
  2839.            Generate output containing library calls for floating point. 
  2840.            Warning: the requisite libraries are not available for all SPARC 
  2841.            targets.  Normally the facilities of the machine's usual C compiler 
  2842.            are used, but this cannot be done directly in cross-compilation. 
  2843.            You must make your own arrangements to provide suitable library 
  2844.            functions for cross-compilation.  The embedded targets 
  2845.            'sparc-*-aout' and 'sparclite-*-*' do provide software floating 
  2846.            point support. 
  2847.  
  2848.            '-msoft-float' changes the calling convention in the output file; 
  2849.            therefore, it is only useful if you compile all of a program with 
  2850.            this option.  In particular, you need to compile 'libgcc.a', the 
  2851.            library that comes with GNU CC, with '-msoft-float' in order for 
  2852.            this to work. 
  2853.  
  2854.  -mhard-quad-float 
  2855.            Generate output containing quad-word (long double) floating point 
  2856.            instructions. 
  2857.  
  2858.  -msoft-quad-float 
  2859.            Generate output containing library calls for quad-word (long double) 
  2860.            floating point instructions.  The functions called are those 
  2861.            specified in the SPARC ABI.  This is the default. 
  2862.  
  2863.            As of this writing, there are no sparc implementations that have 
  2864.            hardware support for the quad-word floating point instructions. 
  2865.            They all invoke a trap handler for one of these instructions, and 
  2866.            then the trap handler emulates the effect of the instruction. 
  2867.            Because of the trap handler overhead, this is much slower than 
  2868.            calling the ABI library routines.  Thus the '-msoft-quad-float' 
  2869.            option is the default. 
  2870.  
  2871.  -mno-epilogue 
  2872.  
  2873.  -mepilogue 
  2874.            With '-mepilogue' (the default), the compiler always emits code for 
  2875.            function exit at the end of each function.  Any function exit in the 
  2876.            middle of the function (such as a return statement in C) will 
  2877.            generate a jump to the exit code at the end of the function. 
  2878.  
  2879.            With '-mno-epilogue', the compiler tries to emit exit code inline at 
  2880.            every function exit. 
  2881.  
  2882.  -mno-flat 
  2883.  
  2884.  -mflat 
  2885.            With '-mflat', the compiler does not generate save/restore 
  2886.            instructions and will use a "flat" or single register window calling 
  2887.            convention. This model uses %i7 as the frame pointer and is 
  2888.            compatible with the normal register window model.  Code from either 
  2889.            may be intermixed. The local registers and the input registers (0-5) 
  2890.            are still treated as "call saved" registers and will be saved on the 
  2891.            stack as necessary. 
  2892.  
  2893.            With '-mno-flat' (the default), the compiler emits save/restore 
  2894.            instructions (except for leaf functions) and is the normal mode of 
  2895.            operation. 
  2896.  
  2897.  -mno-unaligned-doubles 
  2898.  
  2899.  -munaligned-doubles 
  2900.            Assume that doubles have 8 byte alignment.  This is the default. 
  2901.  
  2902.            With '-munaligned-doubles', GNU CC assumes that doubles have 8 byte 
  2903.            alignment only if they are contained in another type, or if they 
  2904.            have an absolute address.  Otherwise, it assumes they have 4 byte 
  2905.            alignment. Specifying this option avoids some rare compatibility 
  2906.            problems with code generated by other compilers.  It is not the 
  2907.            default because it results in a performance loss, especially for 
  2908.            floating point code. 
  2909.  
  2910.  -mv8 
  2911.  
  2912.  -msparclite 
  2913.            These two options select variations on the SPARC architecture. 
  2914.  
  2915.            By default (unless specifically configured for the Fujitsu 
  2916.            SPARClite), GCC generates code for the v7 variant of the SPARC 
  2917.            architecture. 
  2918.  
  2919.            '-mv8' will give you SPARC v8 code.  The only difference from v7 
  2920.            code is that the compiler emits the integer multiply and integer 
  2921.            divide instructions which exist in SPARC v8 but not in SPARC v7. 
  2922.  
  2923.            '-msparclite' will give you SPARClite code.  This adds the integer 
  2924.            multiply, integer divide step and scan (ffs) instructions which 
  2925.            exist in SPARClite but not in SPARC v7. 
  2926.  
  2927.            These options are deprecated and will be deleted in GNU CC 2.9. They 
  2928.            have been replaced with '-mcpu=xxx'. 
  2929.  
  2930.  -mcypress 
  2931.  
  2932.  -msupersparc 
  2933.            These two options select the processor for which the code is 
  2934.            optimised. 
  2935.  
  2936.            With '-mcypress' (the default), the compiler optimizes code for the 
  2937.            Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx 
  2938.            series. This is also appropriate for the older SparcStation 1, 2, 
  2939.            IPX etc. 
  2940.  
  2941.            With '-msupersparc' the compiler optimizes code for the SuperSparc 
  2942.            cpu, as used in the SparcStation 10, 1000 and 2000 series. This flag 
  2943.            also enables use of the full SPARC v8 instruction set. 
  2944.  
  2945.            These options are deprecated and will be deleted in GNU CC 2.9. They 
  2946.            have been replaced with '-mcpu=xxx'. 
  2947.  
  2948.  -mcpu=cpu_type 
  2949.            Set the instruction set, register set, and instruction scheduling 
  2950.            parameters for machine type cpu_type.  Supported values for cpu_type 
  2951.            are 'v7', 'cypress', 'v8', 'supersparc', 'sparclite', 'f930', 
  2952.            'f934', 'sparclet', 'tsc701', 'v9', and 'ultrasparc'. 
  2953.  
  2954.            Default instruction scheduling parameters are used for values that 
  2955.            select an architecture and not an implementation.  These are 'v7', 
  2956.            'v8', 'sparclite', 'sparclet', 'v9'. 
  2957.  
  2958.            Here is a list of each supported architecture and their supported 
  2959.            implementations. 
  2960.  
  2961.                         v7:       cypress
  2962.                         v8:       supersparc
  2963.                         sparclite:    f930, f934
  2964.                         sparclet:    tsc701
  2965.                         v9:       ultrasparc
  2966.  
  2967.  -mtune=cpu_type 
  2968.            Set the instruction scheduling parameters for machine type cpu_type, 
  2969.            but do not set the instruction set or register set that the option 
  2970.            '-mcpu='cpu_type would. 
  2971.  
  2972.            The same values for '-mcpu='cpu_type are used for '-mtune='cpu_type, 
  2973.            though the only useful values are those that select a particular cpu 
  2974.            implementation: 'cypress', 'supersparc', 'f930', 'f934', 'tsc701', 
  2975.            'ultrasparc'. 
  2976.  
  2977.  -malign-loops=num 
  2978.            Align loops to a 2 raised to a num byte boundary.  If 
  2979.            '-malign-loops' is not specified, the default is 2. 
  2980.  
  2981.  -malign-jumps=num 
  2982.            Align instructions that are only jumped to to a 2 raised to a num 
  2983.            byte boundary.  If '-malign-jumps' is not specified, the default is 
  2984.            2. 
  2985.  
  2986.  -malign-functions=num 
  2987.            Align the start of functions to a 2 raised to num byte boundary. If 
  2988.            '-malign-functions' is not specified, the default is 2 if compiling 
  2989.            for 32 bit sparc, and 5 if compiling for 64 bit sparc. 
  2990.  
  2991.  These '-m' switches are supported in addition to the above on the SPARCLET 
  2992.  processor. 
  2993.  
  2994.  -mlittle-endian 
  2995.            Generate code for a processor running in little-endian mode. 
  2996.  
  2997.  -mlive-g0 
  2998.            Treat register %g0 as a normal register. GCC will continue to 
  2999.            clobber it as necessary but will not assume it always reads as 0. 
  3000.  
  3001.  -mbroken-saverestore 
  3002.            Generate code that does not use non-trivial forms of the save and 
  3003.            restore instructions.  Early versions of the SPARCLET processor do 
  3004.            not correctly handle save and restore instructions used with 
  3005.            arguments.  They correctly handle them used without arguments.  A 
  3006.            save instruction used without arguments increments the current 
  3007.            window pointer but does not allocate a new stack frame.  It is 
  3008.            assumed that the window overflow trap handler will properly handle 
  3009.            this case as will interrupt handlers. 
  3010.  
  3011.  These '-m' switches are supported in addition to the above on SPARC V9 
  3012.  processors in 64 bit environments. 
  3013.  
  3014.  -mlittle-endian 
  3015.            Generate code for a processor running in little-endian mode. 
  3016.  
  3017.  -m32 
  3018.  
  3019.  -m64 
  3020.            Generate code for a 32 bit or 64 bit environment. The 32 bit 
  3021.            environment sets int, long and pointer to 32 bits. The 64 bit 
  3022.            environment sets int to 32 bits and long and pointer to 64 bits. 
  3023.  
  3024.  - mcmodel=medlow 
  3025.            Generate code for the Medium/Low code model: the program must be 
  3026.            linked in the low 32 bits of the address space.  Pointers are 64 
  3027.            bits. Programs can be statically or dynamically linked. 
  3028.  
  3029.  -mcmodel=medmid 
  3030.            Generate code for the Medium/Middle code model: the program must be 
  3031.            linked in the low 44 bits of the address space, the text segment 
  3032.            must be less than 2G bytes, and data segment must be within 2G of 
  3033.            the text segment. Pointers are 64 bits. 
  3034.  
  3035.  -mcmodel=medany 
  3036.            Generate code for the Medium/Anywhere code model: the program may be 
  3037.            linked anywhere in the address space, the text segment must be less 
  3038.            than 2G bytes, and data segment must be within 2G of the text 
  3039.            segment. Pointers are 64 bits. 
  3040.  
  3041.  -mcmodel=embmedany 
  3042.            Generate code for the Medium/Anywhere code model for embedded 
  3043.            systems: assume a 32 bit text and a 32 bit data segment, both 
  3044.            starting anywhere (determined at link time).  Register %g4 points to 
  3045.            the base of the data segment.  Pointers still 64 bits. Programs are 
  3046.            statically linked, PIC is not supported. 
  3047.  
  3048.  -mstack-bias 
  3049.  
  3050.  -mno-stack-bias 
  3051.            With '-mstack-bias', GNU CC assumes that the stack pointer, and 
  3052.            frame pointer if present, are offset by -2047 which must be added 
  3053.            back when making stack frame references. Otherwise, assume no such 
  3054.            offset is present. 
  3055.  
  3056.  
  3057. ΓòÉΓòÉΓòÉ 4.14.4. Convex Options ΓòÉΓòÉΓòÉ
  3058.  
  3059.  These '-m' options are defined for Convex: 
  3060.  
  3061.  -mc1 
  3062.            Generate output for C1.  The code will run on any Convex machine. 
  3063.            The preprocessor symbol __convex__c1__ is defined. 
  3064.  
  3065.  -mc2 
  3066.            Generate output for C2.  Uses instructions not available on C1. 
  3067.            Scheduling and other optimizations are chosen for max performance on 
  3068.            C2. The preprocessor symbol __convex_c2__ is defined. 
  3069.  
  3070.  -mc32 
  3071.            Generate output for C32xx.  Uses instructions not available on C1. 
  3072.            Scheduling and other optimizations are chosen for max performance on 
  3073.            C32. The preprocessor symbol __convex_c32__ is defined. 
  3074.  
  3075.  -mc34 
  3076.            Generate output for C34xx.  Uses instructions not available on C1. 
  3077.            Scheduling and other optimizations are chosen for max performance on 
  3078.            C34. The preprocessor symbol __convex_c34__ is defined. 
  3079.  
  3080.  -mc38 
  3081.            Generate output for C38xx.  Uses instructions not available on C1. 
  3082.            Scheduling and other optimizations are chosen for max performance on 
  3083.            C38. The preprocessor symbol __convex_c38__ is defined. 
  3084.  
  3085.  -margcount 
  3086.            Generate code which puts an argument count in the word preceding 
  3087.            each argument list.  This is compatible with regular CC, and a few 
  3088.            programs may need the argument count word.  GDB and other 
  3089.            source-level debuggers do not need it; this info is in the symbol 
  3090.            table. 
  3091.  
  3092.  -mnoargcount 
  3093.            Omit the argument count word.  This is the default. 
  3094.  
  3095.  -mvolatile-cache 
  3096.            Allow volatile references to be cached.  This is the default. 
  3097.  
  3098.  -mvolatile-nocache 
  3099.            Volatile references bypass the data cache, going all the way to 
  3100.            memory. This is only needed for multi-processor code that does not 
  3101.            use standard synchronization instructions.  Making non-volatile 
  3102.            references to volatile locations will not necessarily work. 
  3103.  
  3104.  -mlong32 
  3105.            Type long is 32 bits, the same as type int.  This is the default. 
  3106.  
  3107.  -mlong64 
  3108.            Type long is 64 bits, the same as type long long.  This option is 
  3109.            useless, because no library support exists for it. 
  3110.  
  3111.  
  3112. ΓòÉΓòÉΓòÉ 4.14.5. AMD29K Options ΓòÉΓòÉΓòÉ
  3113.  
  3114.  These '-m' options are defined for the AMD Am29000: 
  3115.  
  3116.  -mdw 
  3117.            Generate code that assumes the DW bit is set, i.e., that byte and 
  3118.            halfword operations are directly supported by the hardware.  This is 
  3119.            the default. 
  3120.  
  3121.  -mndw 
  3122.            Generate code that assumes the DW bit is not set. 
  3123.  
  3124.  -mbw 
  3125.            Generate code that assumes the system supports byte and halfword 
  3126.            write operations.  This is the default. 
  3127.  
  3128.  -mnbw 
  3129.            Generate code that assumes the systems does not support byte and 
  3130.            halfword write operations.  '-mnbw' implies '-mndw'. 
  3131.  
  3132.  -msmall 
  3133.            Use a small memory model that assumes that all function addresses 
  3134.            are either within a single 256 KB segment or at an absolute address 
  3135.            of less than 256k.  This allows the call instruction to be used 
  3136.            instead of a const, consth, calli sequence. 
  3137.  
  3138.  -mnormal 
  3139.            Use the normal memory model: Generate call instructions only when 
  3140.            calling functions in the same file and calli instructions otherwise. 
  3141.            This works if each file occupies less than 256 KB but allows the 
  3142.            entire executable to be larger than 256 KB.  This is the default. 
  3143.  
  3144.  -mlarge 
  3145.            Always use calli instructions.  Specify this option if you expect a 
  3146.            single file to compile into more than 256 KB of code. 
  3147.  
  3148.  -m29050 
  3149.            Generate code for the Am29050. 
  3150.  
  3151.  -m29000 
  3152.            Generate code for the Am29000.  This is the default. 
  3153.  
  3154.  -mkernel-registers 
  3155.            Generate references to registers gr64-gr95 instead of to registers 
  3156.            gr96-gr127.  This option can be used when compiling kernel code that 
  3157.            wants a set of global registers disjoint from that used by user-mode 
  3158.            code. 
  3159.  
  3160.            Note that when this option is used, register names in '-f' flags 
  3161.            must use the normal, user-mode, names. 
  3162.  
  3163.  -muser-registers 
  3164.            Use the normal set of global registers, gr96-gr127.  This is the 
  3165.            default. 
  3166.  
  3167.  -mstack-check 
  3168.  
  3169.  -mno-stack-check 
  3170.            Insert (or do not insert) a call to __msp_check after each stack 
  3171.            adjustment.  This is often used for kernel code. 
  3172.  
  3173.  -mstorem-bug 
  3174.  
  3175.  -mno-storem-bug 
  3176.            '-mstorem-bug' handles 29k processors which cannot handle the 
  3177.            separation of a mtsrim insn and a storem instruction (most 29000 
  3178.            chips to date, but not the 29050). 
  3179.  
  3180.  -mno-reuse-arg-regs 
  3181.  
  3182.  -mreuse-arg-regs 
  3183.            '-mno-reuse-arg-regs' tells the compiler to only use incoming 
  3184.            argument registers for copying out arguments.  This helps detect 
  3185.            calling a function with fewer arguments than it was declared with. 
  3186.  
  3187.  -mno-impure-text 
  3188.  
  3189.  -mimpure-text 
  3190.            '-mimpure-text', used in addition to '-shared', tells the compiler 
  3191.            to not pass '-assert pure-text' to the linker when linking a shared 
  3192.            object. 
  3193.  
  3194.  -msoft-float 
  3195.            Generate output containing library calls for floating point. 
  3196.            Warning: the requisite libraries are not part of GNU CC. Normally 
  3197.            the facilities of the machine's usual C compiler are used, but this 
  3198.            can't be done directly in cross-compilation.  You must make your own 
  3199.            arrangements to provide suitable library functions for 
  3200.            cross-compilation. 
  3201.  
  3202.  
  3203. ΓòÉΓòÉΓòÉ 4.14.6. ARM Options ΓòÉΓòÉΓòÉ
  3204.  
  3205.  These '-m' options are defined for Advanced RISC Machines (ARM) architectures: 
  3206.  
  3207.  -mapcs-frame 
  3208.            Generate a stack frame that is compliant with the ARM Procedure Call 
  3209.            Standard for all functions, even if this is not strictly necessary 
  3210.            for correct execution of the code. 
  3211.  
  3212.  -mapcs-26 
  3213.            Generate code for a processor running with a 26-bit program counter, 
  3214.            and conforming to the function calling standards for the APCS 26-bit 
  3215.            option.  This option replaces the '-m2' and '-m3' options of 
  3216.            previous releases of the compiler. 
  3217.  
  3218.  -mapcs-32 
  3219.            Generate code for a processor running with a 32-bit program counter, 
  3220.            and conforming to the function calling standards for the APCS 32-bit 
  3221.            option.  This option replaces the '-m6' option of previous releases 
  3222.            of the compiler. 
  3223.  
  3224.  -mhard-float 
  3225.            Generate output containing floating point instructions.  This is the 
  3226.            default. 
  3227.  
  3228.  -msoft-float 
  3229.            Generate output containing library calls for floating point. 
  3230.            Warning: the requisite libraries are not available for all ARM 
  3231.            targets.  Normally the facilities of the machine's usual C compiler 
  3232.            are used, but this cannot be done directly in cross-compilation. 
  3233.            You must make your own arrangements to provide suitable library 
  3234.            functions for cross-compilation. 
  3235.  
  3236.            '-msoft-float' changes the calling convention in the output file; 
  3237.            therefore, it is only useful if you compile all of a program with 
  3238.            this option.  In particular, you need to compile 'libgcc.a', the 
  3239.            library that comes with GNU CC, with '-msoft-float' in order for 
  3240.            this to work. 
  3241.  
  3242.  -mlittle-endian 
  3243.            Generate code for a processor running in little-endian mode.  This 
  3244.            is the default for all standard configurations. 
  3245.  
  3246.  -mbig-endian 
  3247.            Generate code for a processor running in big-endian mode; the 
  3248.            default is to compile code for a little-endian processor. 
  3249.  
  3250.  -mwords-little-endian 
  3251.            This option only applies when generating code for big-endian 
  3252.            processors. Generate code for a little-endian word order but a 
  3253.            big-endian byte order.  That is, a byte order of the form 
  3254.            '32107654'.  Note: this option should only be used if you require 
  3255.            compatibility with code for big-endian ARM processors generated by 
  3256.            versions of the compiler prior to 2.8. 
  3257.  
  3258.  -mshort-load-bytes 
  3259.            Do not try to load half-words (eg 'short's) by loading a word from 
  3260.            an unaligned address.  For some targets the MMU is configured to 
  3261.            trap unaligned loads; use this option to generate code that is safe 
  3262.            in these environments. 
  3263.  
  3264.  -mno-short-load-bytes 
  3265.            Use unaligned word loads to load half-words (eg 'short's).  This 
  3266.            option produces more efficient code, but the MMU is sometimes 
  3267.            configured to trap these instructions. 
  3268.  
  3269.  -mbsd 
  3270.            This option only applies to RISC iX.  Emulate the native BSD-mode 
  3271.            compiler.  This is the default if '-ansi' is not specified. 
  3272.  
  3273.  -mxopen 
  3274.            This option only applies to RISC iX.  Emulate the native X/Open-mode 
  3275.            compiler. 
  3276.  
  3277.  -mno-symrename 
  3278.            This option only applies to RISC iX.  Do not run the assembler 
  3279.            post-processor, 'symrename', after code has been assembled. Normally 
  3280.            it is necessary to modify some of the standard symbols in 
  3281.            preparation for linking with the RISC iX C library; this option 
  3282.            suppresses this pass.  The post-processor is never run when the 
  3283.            compiler is built for cross-compilation. 
  3284.  
  3285.  
  3286. ΓòÉΓòÉΓòÉ 4.14.7. MN10300 Options ΓòÉΓòÉΓòÉ
  3287.  
  3288.  These '-m' options are defined for Matsushita MN10300 architectures: 
  3289.  
  3290.  -mmult-bug 
  3291.            Generate code to avoid bugs in the multiply instructions for the 
  3292.            MN10300 processors.  This is the default. 
  3293.  
  3294.  -mno-mult-bug 
  3295.            Do not generate code to avoid bugs in the multiply instructions for 
  3296.            the MN10300 processors. 
  3297.  
  3298.  
  3299. ΓòÉΓòÉΓòÉ 4.14.8. M32R/D Options ΓòÉΓòÉΓòÉ
  3300.  
  3301.  These '-m' options are defined for Mitsubishi M32R/D architectures: 
  3302.  
  3303.  -mcode-model=small 
  3304.            Assume all objects live in the lower 16MB of memory (so that their 
  3305.            addresses can be loaded with the ld24 instruction), and assume all 
  3306.            subroutines are reachable with the bl instruction. This is the 
  3307.            default. 
  3308.  
  3309.            The addressability of a particular object can be set with the model 
  3310.            attribute. 
  3311.  
  3312.  -mcode-model=medium 
  3313.            Assume objects may be anywhere in the 32 bit address space (the 
  3314.            compiler will generate seth/add3 instructions to load their 
  3315.            addresses), and assume all subroutines are reachable with the bl 
  3316.            instruction. 
  3317.  
  3318.  -mcode-model=large 
  3319.            Assume objects may be anywhere in the 32 bit address space (the 
  3320.            compiler will generate seth/add3 instructions to load their 
  3321.            addresses), and assume subroutines may not be reachable with the bl 
  3322.            instruction (the compiler will generate the much slower seth/add3/jl 
  3323.            instruction sequence). 
  3324.  
  3325.  -msdata=none 
  3326.            Disable use of the small data area.  Variables will be put into one 
  3327.            of '.data', 'bss', or '.rodata' (unless the section attribute has 
  3328.            been specified). This is the default. 
  3329.  
  3330.            The small data area consists of sections '.sdata' and '.sbss'. 
  3331.            Objects may be explicitly put in the small data area with the 
  3332.            section attribute using one of these sections. 
  3333.  
  3334.  -msdata=sdata 
  3335.            Put small global and static data in the small data area, but do not 
  3336.            generate special code to reference them. 
  3337.  
  3338.  -msdata=use 
  3339.            Put small global and static data in the small data area, and 
  3340.            generate special instructions to reference them. 
  3341.  
  3342.  -G num 
  3343.            Put global and static objects less than or equal to num bytes into 
  3344.            the small data or bss sections instead of the normal data or bss 
  3345.            sections.  The default value of num is 8. The '-msdata' option must 
  3346.            be set to one of 'sdata' or 'use' for this option to have any 
  3347.            effect. 
  3348.  
  3349.            All modules should be compiled with the same '-G num' value. 
  3350.            Compiling with different values of num may or may not work; if it 
  3351.            doesn't the linker will give an error message - incorrect code will 
  3352.            not be generated. 
  3353.  
  3354.  -mlongcall 
  3355.            Normally the compiler produces single-instruction, 26 bit, direct 
  3356.            calls. In order to access functions that may lie anywhere in the 32 
  3357.            bit address space we need to call through a function pointer. 
  3358.            Because indirect calls are more expensive we would like to make 
  3359.            direct calls wherever possible. With '-mlongcall' the compiler uses 
  3360.            a conservative heuristic to decide whether to make a direct (26) 
  3361.            call or an indirect (32 bit) call: it generates a direct call if the 
  3362.            target function is non public; or if its definition has already been 
  3363.            seen; or if it is declared with the attribute "shortcall" (See 
  3364.            Function Attributes). Otherwise it generates an indirect call. An 
  3365.            underlying assumption is that individual translation units span less 
  3366.            than 32MB so that it is always safe to make direct calls to 
  3367.            functions in the same module. 
  3368.  
  3369.            Here is an example: 
  3370.  
  3371.                       static void f ();
  3372.                       void g () { /* do something */ }
  3373.                       extern void h ();
  3374.                       void test ()
  3375.                       {
  3376.                        f ();
  3377.                        g ();
  3378.                        h ();
  3379.                       }
  3380.  
  3381.  If this example is compiled with -mlongcall, the function 'test' will contain 
  3382.  direct calls to 'f' (non-public) and 'g' (definition seen before it is called) 
  3383.  and an indirect call to 'h'. 
  3384.  
  3385.  
  3386. ΓòÉΓòÉΓòÉ 4.14.9. M88K Options ΓòÉΓòÉΓòÉ
  3387.  
  3388.  These '-m' options are defined for Motorola 88k architectures: 
  3389.  
  3390.  -m88000 
  3391.            Generate code that works well on both the m88100 and the m88110. 
  3392.  
  3393.  -m88100 
  3394.            Generate code that works best for the m88100, but that also runs on 
  3395.            the m88110. 
  3396.  
  3397.  -m88110 
  3398.            Generate code that works best for the m88110, and may not run on the 
  3399.            m88100. 
  3400.  
  3401.  -mbig-pic 
  3402.            Obsolete option to be removed from the next revision. Use '-fPIC'. 
  3403.  
  3404.  -midentify-revision 
  3405.            Include an ident directive in the assembler output recording the 
  3406.            source file name, compiler name and version, timestamp, and 
  3407.            compilation flags used. 
  3408.  
  3409.  -mno-underscores 
  3410.            In assembler output, emit symbol names without adding an underscore 
  3411.            character at the beginning of each name.  The default is to use an 
  3412.            underscore as prefix on each name. 
  3413.  
  3414.  -mocs-debug-info 
  3415.  
  3416.  -mno-ocs-debug-info 
  3417.            Include (or omit) additional debugging information (about registers 
  3418.            used in each stack frame) as specified in the 88open Object 
  3419.            Compatibility Standard, ``OCS''.  This extra information allows 
  3420.            debugging of code that has had the frame pointer eliminated.  The 
  3421.            default for DG/UX, SVr4, and Delta 88 SVr3.2 is to include this 
  3422.            information; other 88k configurations omit this information by 
  3423.            default. 
  3424.  
  3425.  -mocs-frame-position 
  3426.            When emitting COFF debugging information for automatic variables and 
  3427.            parameters stored on the stack, use the offset from the canonical 
  3428.            frame address, which is the stack pointer (register 31) on entry to 
  3429.            the function.  The DG/UX, SVr4, Delta88 SVr3.2, and BCS 
  3430.            configurations use '-mocs-frame-position'; other 88k configurations 
  3431.            have the default '-mno-ocs-frame-position'. 
  3432.  
  3433.  -mno-ocs-frame-position 
  3434.            When emitting COFF debugging information for automatic variables and 
  3435.            parameters stored on the stack, use the offset from the frame 
  3436.            pointer register (register 30).  When this option is in effect, the 
  3437.            frame pointer is not eliminated when debugging information is 
  3438.            selected by the -g switch. 
  3439.  
  3440.  -moptimize-arg-area 
  3441.  
  3442.  -mno-optimize-arg-area 
  3443.            Control how function arguments are stored in stack frames. 
  3444.            '-moptimize-arg-area' saves space by optimizing them, but this 
  3445.            conflicts with the 88open specifications.  The opposite alternative, 
  3446.            '-mno-optimize-arg-area', agrees with 88open standards.  By default 
  3447.            GNU CC does not optimize the argument area. 
  3448.  
  3449.  -mshort-data-num 
  3450.            num Generate smaller data references by making them relative to r0, 
  3451.            which allows loading a value using a single instruction (rather than 
  3452.            the usual two).  You control which data references are affected by 
  3453.            specifying num with this option.  For example, if you specify 
  3454.            '-mshort-data-512', then the data references affected are those 
  3455.            involving displacements of less than 512 bytes. '-mshort-data-num' 
  3456.            is not effective for num greater than 64k. 
  3457.  
  3458.  -mserialize-volatile 
  3459.  
  3460.  -mno-serialize-volatile 
  3461.            Do, or don't, generate code to guarantee sequential consistency of 
  3462.            volatile memory references.  By default, consistency is guaranteed. 
  3463.  
  3464.            The order of memory references made by the MC88110 processor does 
  3465.            not always match the order of the instructions requesting those 
  3466.            references.  In particular, a load instruction may execute before a 
  3467.            preceding store instruction.  Such reordering violates sequential 
  3468.            consistency of volatile memory references, when there are multiple 
  3469.            processors.  When consistency must be guaranteed, GNU C generates 
  3470.            special instructions, as needed, to force execution in the proper 
  3471.            order. 
  3472.  
  3473.            The MC88100 processor does not reorder memory references and so 
  3474.            always provides sequential consistency.  However, by default, GNU C 
  3475.            generates the special instructions to guarantee consistency even 
  3476.            when you use '-m88100', so that the code may be run on an MC88110 
  3477.            processor.  If you intend to run your code only on the MC88100 
  3478.            processor, you may use '-mno-serialize-volatile'. 
  3479.  
  3480.            The extra code generated to guarantee consistency may affect the 
  3481.            performance of your application.  If you know that you can safely 
  3482.            forgo this guarantee, you may use '-mno-serialize-volatile'. 
  3483.  
  3484.  -msvr4 
  3485.  
  3486.  -msvr3 
  3487.            Turn on ('-msvr4') or off ('-msvr3') compiler extensions related to 
  3488.            System V release 4 (SVr4).  This controls the following: 
  3489.  
  3490.               .Which variant of the assembler syntax to emit. 
  3491.  
  3492.               .'-msvr4' makes the C preprocessor recognize '#pragma weak' that 
  3493.                 is used on System V release 4. 
  3494.  
  3495.               .'-msvr4' makes GNU CC issue additional declaration directives 
  3496.                 used in SVr4. 
  3497.  
  3498.              '-msvr4' is the default for the m88k-motorola-sysv4 and 
  3499.              m88k-dg-dgux m88k configurations. '-msvr3' is the default for all 
  3500.              other m88k configurations. 
  3501.  
  3502.  -mversion-03.00 
  3503.            This option is obsolete, and is ignored. 
  3504.  
  3505.  -mno-check-zero-division 
  3506.  
  3507.  -mcheck-zero-division 
  3508.            Do, or don't, generate code to guarantee that integer division by 
  3509.            zero will be detected.  By default, detection is guaranteed. 
  3510.  
  3511.            Some models of the MC88100 processor fail to trap upon integer 
  3512.            division by zero under certain conditions.  By default, when 
  3513.            compiling code that might be run on such a processor, GNU C 
  3514.            generates code that explicitly checks for zero-valued divisors and 
  3515.            traps with exception number 503 when one is detected.  Use of 
  3516.            mno-check-zero-division suppresses such checking for code generated 
  3517.            to run on an MC88100 processor. 
  3518.  
  3519.            GNU C assumes that the MC88110 processor correctly detects all 
  3520.            instances of integer division by zero.  When '-m88110' is specified, 
  3521.            both '-mcheck-zero-division' and '-mno-check-zero-division' are 
  3522.            ignored, and no explicit checks for zero-valued divisors are 
  3523.            generated. 
  3524.  
  3525.  -muse-div-instruction 
  3526.            Use the div instruction for signed integer division on the MC88100 
  3527.            processor.  By default, the div instruction is not used. 
  3528.  
  3529.            On the MC88100 processor the signed integer division instruction 
  3530.            div) traps to the operating system on a negative operand.  The 
  3531.            operating system transparently completes the operation, but at a 
  3532.            large cost in execution time.  By default, when compiling code that 
  3533.            might be run on an MC88100 processor, GNU C emulates signed integer 
  3534.            division using the unsigned integer division instruction divu), 
  3535.            thereby avoiding the large penalty of a trap to the operating 
  3536.            system.  Such emulation has its own, smaller, execution cost in both 
  3537.            time and space.  To the extent that your code's important signed 
  3538.            integer division operations are performed on two nonnegative 
  3539.            operands, it may be desirable to use the div instruction directly. 
  3540.  
  3541.            On the MC88110 processor the div instruction (also known as the divs 
  3542.            instruction) processes negative operands without trapping to the 
  3543.            operating system.  When '-m88110' is specified, 
  3544.            '-muse-div-instruction' is ignored, and the div instruction is used 
  3545.            for signed integer division. 
  3546.  
  3547.            Note that the result of dividing INT_MIN by -1 is undefined.  In 
  3548.            particular, the behavior of such a division with and without 
  3549.            '-muse-div-instruction'  may differ. 
  3550.  
  3551.  -mtrap-large-shift 
  3552.  
  3553.  -mhandle-large-shift 
  3554.            Include code to detect bit-shifts of more than 31 bits; 
  3555.            respectively, trap such shifts or emit code to handle them properly. 
  3556.            By default GNU CC makes no special provision for large bit shifts. 
  3557.  
  3558.  -mwarn-passed-structs 
  3559.            Warn when a function passes a struct as an argument or result. 
  3560.            Structure-passing conventions have changed during the evolution of 
  3561.            the C language, and are often the source of portability problems. 
  3562.            By default, GNU CC issues no such warning. 
  3563.  
  3564.  
  3565. ΓòÉΓòÉΓòÉ 4.14.10. IBM RS/6000 and PowerPC Options ΓòÉΓòÉΓòÉ
  3566.  
  3567.  These '-m' options are defined for the IBM RS/6000 and PowerPC: 
  3568.  
  3569.  -mpower 
  3570.  
  3571.  -mno-power 
  3572.  
  3573.  -mpower2 
  3574.  
  3575.  -mno-power2 
  3576.  
  3577.  -mpowerpc 
  3578.  
  3579.  -mno-powerpc 
  3580.  
  3581.  -mpowerpc-gpopt 
  3582.  
  3583.  -mno-powerpc-gpopt 
  3584.  
  3585.  -mpowerpc-gfxopt 
  3586.  
  3587.  -mno-powerpc-gfxopt 
  3588.            GNU CC supports two related instruction set architectures for the 
  3589.            RS/6000 and PowerPC.  The POWER instruction set are those 
  3590.            instructions supported by the 'rios' chip set used in the original 
  3591.            RS/6000 systems and the PowerPC instruction set is the architecture 
  3592.            of the Motorola MPC5xx, MPC6xx, MPC8xx microprocessors, and the IBM 
  3593.            4xx microprocessors. 
  3594.  
  3595.            Neither architecture is a subset of the other.  However there is a 
  3596.            large common subset of instructions supported by both.  An MQ 
  3597.            register is included in processors supporting the POWER 
  3598.            architecture. 
  3599.  
  3600.            You use these options to specify which instructions are available on 
  3601.            the processor you are using.  The default value of these options is 
  3602.            determined when configuring GNU CC.  Specifying the '-mcpu=cpu_type' 
  3603.            overrides the specification of these options.  We recommend you use 
  3604.            the '-mcpu=cpu_type' option rather than the options listed above. 
  3605.  
  3606.            The '-mpower' option allows GNU CC to generate instructions that are 
  3607.            found only in the POWER architecture and to use the MQ register. 
  3608.            Specifying '-mpower2' implies '-power' and also allows GNU CC to 
  3609.            generate instructions that are present in the POWER2 architecture 
  3610.            but not the original POWER architecture. 
  3611.  
  3612.            The '-mpowerpc' option allows GNU CC to generate instructions that 
  3613.            are found only in the 32-bit subset of the PowerPC architecture. 
  3614.            Specifying '-mpowerpc-gpopt' implies '-mpowerpc' and also allows GNU 
  3615.            CC to use the optional PowerPC architecture instructions in the 
  3616.            General Purpose group, including floating-point square root. 
  3617.            Specifying '-mpowerpc-gfxopt' implies '-mpowerpc' and also allows 
  3618.            GNU CC to use the optional PowerPC architecture instructions in the 
  3619.            Graphics group, including floating-point select. 
  3620.  
  3621.            If you specify both '-mno-power' and '-mno-powerpc', GNU CC will use 
  3622.            only the instructions in the common subset of both architectures 
  3623.            plus some special AIX common-mode calls, and will not use the MQ 
  3624.            register.  Specifying both '-mpower' and '-mpowerpc' permits GNU CC 
  3625.            to use any instruction from either architecture and to allow use of 
  3626.            the MQ register; specify this for the Motorola MPC601. 
  3627.  
  3628.  -mnew-mnemonics 
  3629.  
  3630.  -mold-mnemonics 
  3631.            Select which mnemonics to use in the generated assembler code. 
  3632.            '-mnew-mnemonics' requests output that uses the assembler mnemonics 
  3633.            defined for the PowerPC architecture, while '-mold-mnemonics' 
  3634.            requests the assembler mnemonics defined for the POWER architecture. 
  3635.            Instructions defined in only one architecture have only one 
  3636.            mnemonic; GNU CC uses that mnemonic irrespective of which of these 
  3637.            options is specified. 
  3638.  
  3639.            PowerPC assemblers support both the old and new mnemonics, as will 
  3640.            later POWER assemblers.  Current POWER assemblers only support the 
  3641.            old mnemonics.  Specify '-mnew-mnemonics' if you have an assembler 
  3642.            that supports them, otherwise specify '-mold-mnemonics'. 
  3643.  
  3644.            The default value of these options depends on how GNU CC was 
  3645.            configured. Specifying '-mcpu=cpu_type' sometimes overrides the 
  3646.            value of these option.  Unless you are building a cross-compiler, 
  3647.            you should normally not specify either '-mnew-mnemonics' or 
  3648.            '-mold-mnemonics', but should instead accept the default. 
  3649.  
  3650.  -mcpu=cpu_type 
  3651.            Set architecture type, register usage, choice of mnemonics, and 
  3652.            instruction scheduling parameters for machine type cpu_type. 
  3653.            Supported values for cpu_type are 'rs6000', 'rios1', 'rios2', 'rsc', 
  3654.            '601', '602', '603', '603e', '604', '604e', '620', 'power', 
  3655.            'power2', 'powerpc', '403', '505', '801', '821', '823', and '860' 
  3656.            and 'common'. '-mcpu=power', '-mcpu=power2', and '-mcpu=powerpc' 
  3657.            specify generic POWER, POWER2 and pure PowerPC (i.e., not MPC601) 
  3658.            architecture machine types, with an appropriate, generic processor 
  3659.            model assumed for scheduling purposes. 
  3660.  
  3661.            Specifying any of the following options: '-mcpu=rios1', 
  3662.            '-mcpu=rios2', '-mcpu=rsc', '-mcpu=power', or '-mcpu=power2' enables 
  3663.            the '-mpower' option and disables the '-mpowerpc' option; 
  3664.            '-mcpu=601' enables both the '-mpower' and '-mpowerpc' options. All 
  3665.            of '-mcpu=602', '-mcpu=603', '-mcpu=603e', '-mcpu=604', '-mcpu=620', 
  3666.            enable the '-mpowerpc' option and disable the '-mpower' option. 
  3667.            Exactly similarly, all of '-mcpu=403', '-mcpu=505', '-mcpu=821', 
  3668.            '-mcpu=860' and '-mcpu=powerpc' enable the '-mpowerpc' option and 
  3669.            disable the '-mpower' option. '-mcpu=common' disables both the 
  3670.            '-mpower' and '-mpowerpc' options. AIX versions 4 or greater selects 
  3671.            '-mcpu=common' by default, so that code will operate on all members 
  3672.            of the RS/6000 and PowerPC families.  In that case, GNU CC will use 
  3673.            only the instructions in the common subset of both architectures 
  3674.            plus some special AIX common-mode calls, and will not use the MQ 
  3675.            register.  GNU CC assumes a generic processor model for scheduling 
  3676.            purposes. 
  3677.  
  3678.            Specifying any of the options '-mcpu=rios1', '-mcpu=rios2', 
  3679.            '-mcpu=rsc', '-mcpu=power', or '-mcpu=power2' also disables the 
  3680.            'new-mnemonics' option.  Specifying '-mcpu=601', '-mcpu=602', 
  3681.            '-mcpu=603', '-mcpu=603e', '-mcpu=604', '620', '403', or 
  3682.            '-mcpu=powerpc' also enables the 'new-mnemonics' option. 
  3683.  
  3684.            Specifying '-mcpu=403', '-mcpu=821', or '-mcpu=860' also enables the 
  3685.            '-msoft-float' option. 
  3686.  
  3687.  -mtune=cpu_type 
  3688.            Set the instruction scheduling parameters for machine type cpu_type, 
  3689.            but do not set the architecture type, register usage, choice of 
  3690.            mnemonics like '-mcpu='cpu_type would.  The same values for cpu_type 
  3691.            are used for '-mtune='cpu_type as for '-mcpu='cpu_type.  The 
  3692.            '-mtune='cpu_type option overrides the '-mcpu='cpu_type option in 
  3693.            terms of instruction scheduling parameters. 
  3694.  
  3695.  -mfull-toc 
  3696.  
  3697.  -mno-fp-in-toc 
  3698.  
  3699.  -mno-sum-in-toc 
  3700.  
  3701.  -mminimal-toc 
  3702.            Modify generation of the TOC (Table Of Contents), which is created 
  3703.            for every executable file.  The '-mfull-toc' option is selected by 
  3704.            default.  In that case, GNU CC will allocate at least one TOC entry 
  3705.            for each unique non-automatic variable reference in your program. 
  3706.            GNU CC will also place floating-point constants in the TOC. 
  3707.            However, only 16,384 entries are available in the TOC. 
  3708.  
  3709.            If you receive a linker error message that saying you have 
  3710.            overflowed the available TOC space, you can reduce the amount of TOC 
  3711.            space used with the '-mno-fp-in-toc' and '-mno-sum-in-toc' options. 
  3712.            '-mno-fp-in-toc' prevents GNU CC from putting floating-point 
  3713.            constants in the TOC and '-mno-sum-in-toc' forces GNU CC to generate 
  3714.            code to calculate the sum of an address and a constant at run-time 
  3715.            instead of putting that sum into the TOC.  You may specify one or 
  3716.            both of these options.  Each causes GNU CC to produce very slightly 
  3717.            slower and larger code at the expense of conserving TOC space. 
  3718.  
  3719.            If you still run out of space in the TOC even when you specify both 
  3720.            of these options, specify '-mminimal-toc' instead.  This option 
  3721.            causes GNU CC to make only one TOC entry for every file.  When you 
  3722.            specify this option, GNU CC will produce code that is slower and 
  3723.            larger but which uses extremely little TOC space.  You may wish to 
  3724.            use this option only on files that contain less frequently executed 
  3725.            code. 
  3726.  
  3727.  -mxl-call 
  3728.  
  3729.  -mno-xl-call 
  3730.            On AIX, pass floating-point arguments to prototyped functions beyond 
  3731.            the register save area (RSA) on the stack in addition to argument 
  3732.            FPRs.  The AIX calling convention was extended but not initially 
  3733.            documented to handle an obscure K&R C case of calling a function 
  3734.            that takes the address of its arguments with fewer arguments than 
  3735.            declared.  AIX XL compilers assume that floating point arguments 
  3736.            which do not fit in the RSA are on the stack when they compile a 
  3737.            subroutine without optimization.  Because always storing 
  3738.            floating-point arguments on the stack is inefficient and rarely 
  3739.            needed, this option is not enabled by default and only is necessary 
  3740.            when calling subroutines compiled by AIX XL compilers without 
  3741.            optimization. 
  3742.  
  3743.  -mthreads 
  3744.            Support AIX Threads.  Link an application written to use pthreads 
  3745.            with special libraries and startup code to enable the application to 
  3746.            run. 
  3747.  
  3748.  -mpe 
  3749.            Support IBM RS/6000 SP Parallel Environment (PE).  Link an 
  3750.            application written to use message passing with special startup code 
  3751.            to enable the application to run.  The system must have PE installed 
  3752.            in the standard location ('/usr/lpp/ppe.poe/'), or the 'specs' file 
  3753.            must be overridden with the '-specs=' option to specify the 
  3754.            appropriate directory location.  The Parallel Environment does not 
  3755.            support threads, so the '-mpe' option and the '-mthreads' option are 
  3756.            incompatible. 
  3757.  
  3758.  -msoft-float 
  3759.  
  3760.  -mhard-float 
  3761.            Generate code that does not use (uses) the floating-point register 
  3762.            set. Software floating point emulation is provided if you use the 
  3763.            '-msoft-float' option, and pass the option to GNU CC when linking. 
  3764.  
  3765.  -mmultiple 
  3766.  
  3767.  -mno-multiple 
  3768.            Generate code that uses (does not use) the load multiple word 
  3769.            instructions and the store multiple word instructions.  These 
  3770.            instructions are generated by default on POWER systems, and not 
  3771.            generated on PowerPC systems.  Do not use '-mmultiple' on little 
  3772.            endian PowerPC systems, since those instructions do not work when 
  3773.            the processor is in little endian mode. 
  3774.  
  3775.  -mstring 
  3776.  
  3777.  -mno-string 
  3778.            Generate code that uses (does not use) the load string instructions 
  3779.            and the store string word instructions to save multiple registers 
  3780.            and do small block moves.  These instructions are generated by 
  3781.            default on POWER systems, and not generated on PowerPC systems.  Do 
  3782.            not use '-mstring' on little endian PowerPC systems, since those 
  3783.            instructions do not work when the processor is in little endian 
  3784.            mode. 
  3785.  
  3786.  -mupdate 
  3787.  
  3788.  -mno-update 
  3789.            Generate code that uses (does not use) the load or store 
  3790.            instructions that update the base register to the address of the 
  3791.            calculated memory location.  These instructions are generated by 
  3792.            default.  If you use '-mno-update', there is a small window between 
  3793.            the time that the stack pointer is updated and the address of the 
  3794.            previous frame is stored, which means code that walks the stack 
  3795.            frame across interrupts or signals may get corrupted data. 
  3796.  
  3797.  -mfused-madd 
  3798.  
  3799.  -mno-fused-madd 
  3800.            Generate code that uses (does not use) the floating point multiply 
  3801.            and accumulate instructions.  These instructions are generated by 
  3802.            default if hardware floating is used. 
  3803.  
  3804.  -mno-bit-align 
  3805.  
  3806.  -mbit-align 
  3807.            On System V.4 and embedded PowerPC systems do not (do) force 
  3808.            structures and unions that contain bit fields to be aligned to the 
  3809.            base type of the bit field. 
  3810.  
  3811.            For example, by default a structure containing nothing but 8 
  3812.            unsigned bitfields of length 1 would be aligned to a 4 byte boundary 
  3813.            and have a size of 4 bytes.  By using '-mno-bit-align', the 
  3814.            structure would be aligned to a 1 byte boundary and be one byte in 
  3815.            size. 
  3816.  
  3817.  -mno-strict-align 
  3818.  
  3819.  -mstrict-align 
  3820.            On System V.4 and embedded PowerPC systems do not (do) assume that 
  3821.            unaligned memory references will be handled by the system. 
  3822.  
  3823.  -mrelocatable 
  3824.  
  3825.  -mno-relocatable 
  3826.            On embedded PowerPC systems generate code that allows (does not 
  3827.            allow) the program to be relocated to a different address at 
  3828.            runtime.  If you use '-mrelocatable' on any module, all objects 
  3829.            linked together must be compiled with '-mrelocatable' or 
  3830.            '-mrelocatable-lib'. 
  3831.  
  3832.  -mrelocatable-lib 
  3833.  
  3834.  -mno-relocatable-lib 
  3835.            On embedded PowerPC systems generate code that allows (does not 
  3836.            allow) the program to be relocated to a different address at 
  3837.            runtime.  Modules compiled with '-mrelocatable-lib' can be linked 
  3838.            with either modules compiled without '-mrelocatable' and 
  3839.            '-mrelocatable-lib' or with modules compiled with the 
  3840.            '-mrelocatable' options. 
  3841.  
  3842.  -mno-toc 
  3843.  
  3844.  -mtoc 
  3845.            On System V.4 and embedded PowerPC systems do not (do) assume that 
  3846.            register 2 contains a pointer to a global area pointing to the 
  3847.            addresses used in the program. 
  3848.  
  3849.  -mno-traceback 
  3850.  
  3851.  -mtraceback 
  3852.            On embedded PowerPC systems do not (do) generate a traceback tag 
  3853.            before the start of the function.  This tag can be used by the 
  3854.            debugger to identify where the start of a function is. 
  3855.  
  3856.  -mlittle 
  3857.  
  3858.  -mlittle-endian 
  3859.            On System V.4 and embedded PowerPC systems compile code for the 
  3860.            processor in little endian mode.  The '-mlittle-endian' option is 
  3861.            the same as '-mlittle'. 
  3862.  
  3863.  -mbig 
  3864.  
  3865.  -mbig-endian 
  3866.            On System V.4 and embedded PowerPC systems compile code for the 
  3867.            processor in big endian mode.  The '-mbig-endian' option is the same 
  3868.            as '-mbig'. 
  3869.  
  3870.  -mcall-sysv 
  3871.            On System V.4 and embedded PowerPC systems compile code using 
  3872.            calling conventions that adheres to the March 1995 draft of the 
  3873.            System V Application Binary Interface, PowerPC processor supplement. 
  3874.            This is the default unless you configured GCC using 
  3875.            'powerpc-*-eabiaix'. 
  3876.  
  3877.  -mcall-sysv-eabi 
  3878.            Specify both '-mcall-sysv' and '-meabi' options. 
  3879.  
  3880.  -mcall-sysv-noeabi 
  3881.            Specify both '-mcall-sysv' and '-mno-eabi' options. 
  3882.  
  3883.  -mcall-aix 
  3884.            On System V.4 and embedded PowerPC systems compile code using 
  3885.            calling conventions that are similar to those used on AIX.  This is 
  3886.            the default if you configured GCC using 'powerpc-*-eabiaix'. 
  3887.  
  3888.  -mcall-solaris 
  3889.            On System V.4 and embedded PowerPC systems compile code for the 
  3890.            Solaris operating system. 
  3891.  
  3892.  -mcall-linux 
  3893.            On System V.4 and embedded PowerPC systems compile code for the 
  3894.            Linux-based GNU system. 
  3895.  
  3896.  -mprototype 
  3897.  
  3898.  -mno-prototype 
  3899.            On System V.4 and embedded PowerPC systems assume that all calls to 
  3900.            variable argument functions are properly prototyped.  Otherwise, the 
  3901.            compiler must insert an instruction before every non prototyped call 
  3902.            to set or clear bit 6 of the condition code register (CR) to 
  3903.            indicate whether floating point values were passed in the floating 
  3904.            point registers in case the function takes a variable arguments. 
  3905.            With '-mprototype', only calls to prototyped variable argument 
  3906.            functions will set or clear the bit. 
  3907.  
  3908.  -msim 
  3909.            On embedded PowerPC systems, assume that the startup module is 
  3910.            called 'sim-crt0.o' and that the standard C libraries are 'libsim.a' 
  3911.            and 'libc.a'.  This is the default for 'powerpc-*-eabisim'. 
  3912.            configurations. 
  3913.  
  3914.  -mmvme 
  3915.            On embedded PowerPC systems, assume that the startup module is 
  3916.            called 'crt0.o' and the standard C libraries are 'libmvme.a' and 
  3917.            'libc.a'. 
  3918.  
  3919.  -mads 
  3920.            On embedded PowerPC systems, assume that the startup module is 
  3921.            called 'crt0.o' and the standard C libraries are 'libads.a' and 
  3922.            'libc.a'. 
  3923.  
  3924.  -myellowknife 
  3925.            On embedded PowerPC systems, assume that the startup module is 
  3926.            called 'crt0.o' and the standard C libraries are 'libyk.a' and 
  3927.            'libc.a'. 
  3928.  
  3929.  -memb 
  3930.            On embedded PowerPC systems, set the PPC_EMB bit in the ELF flags 
  3931.            header to indicate that 'eabi' extended relocations are used. 
  3932.  
  3933.  -meabi 
  3934.  
  3935.  -mno-eabi 
  3936.            On System V.4 and embedded PowerPC systems do (do not) adhere to the 
  3937.            Embedded Applications Binary Interface (eabi) which is a set of 
  3938.            modifications to the System V.4 specifications.  Selecting -meabi 
  3939.            means that the stack is aligned to an 8 byte boundary, a function 
  3940.            __eabi is called to from main to set up the eabi environment, and 
  3941.            the '-msdata' option can use both r2 and r13 to point to two 
  3942.            separate small data areas.  Selecting -mno-eabi means that the stack 
  3943.            is aligned to a 16 byte boundary, do not call an initialization 
  3944.            function from main, and the '-msdata' option will only use r13 to 
  3945.            point to a single small data area.  The '-meabi' option is on by 
  3946.            default if you configured GCC using one of the 'powerpc*-*-eabi*' 
  3947.            options. 
  3948.  
  3949.  -msdata=eabi 
  3950.            On System V.4 and embedded PowerPC systems, put small initialized 
  3951.            const global and static data in the '.sdata2' section, which is 
  3952.            pointed to by register r2.  Put small initialized non-const global 
  3953.            and static data in the '.sdata' section, which is pointed to by 
  3954.            register r13.  Put small uninitialized global and static data in the 
  3955.            '.sbss' section, which is adjacent to the '.sdata' section.  The 
  3956.            '-msdata=eabi' option is incompatible with the '-mrelocatable' 
  3957.            option.  The '-msdata=eabi' option also sets the '-memb' option. 
  3958.  
  3959.  -msdata=sysv 
  3960.            On System V.4 and embedded PowerPC systems, put small global and 
  3961.            static data in the '.sdata' section, which is pointed to by register 
  3962.            r13.  Put small uninitialized global and static data in the '.sbss' 
  3963.            section, which is adjacent to the '.sdata' section. The 
  3964.            '-msdata=sysv' option is incompatible with the '-mrelocatable' 
  3965.            option. 
  3966.  
  3967.  -msdata=default 
  3968.  
  3969.  -msdata 
  3970.            On System V.4 and embedded PowerPC systems, if '-meabi' is used, 
  3971.            compile code the same as '-msdata=eabi', otherwise compile code the 
  3972.            same as '-msdata=sysv'. 
  3973.  
  3974.  -msdata-data 
  3975.            On System V.4 and embedded PowerPC systems, put small global and 
  3976.            static data in the '.sdata' section.  Put small uninitialized global 
  3977.            and static data in the '.sbss' section.  Do not use register r13 to 
  3978.            address small data however.  This is the default behavior unless 
  3979.            other '-msdata' options are used. 
  3980.  
  3981.  -msdata=none 
  3982.  
  3983.  -mno-sdata 
  3984.            On embedded PowerPC systems, put all initialized global and static 
  3985.            data in the '.data' section, and all uninitialized data in the 
  3986.            '.bss' section. 
  3987.  
  3988.  -G num 
  3989.            On embedded PowerPC systems, put global and static items less than 
  3990.            or equal to num bytes into the small data or bss sections instead of 
  3991.            the normal data or bss section.  By default, num is 8.  The '-G num' 
  3992.            switch is also passed to the linker. All modules should be compiled 
  3993.            with the same '-G num' value. 
  3994.  
  3995.  -mregnames 
  3996.  
  3997.  -mno-regnames 
  3998.            On System V.4 and embedded PowerPC systems do (do not) emit register 
  3999.            names in the assembly language output using symbolic forms. 
  4000.  
  4001.  
  4002. ΓòÉΓòÉΓòÉ 4.14.11. IBM RT Options ΓòÉΓòÉΓòÉ
  4003.  
  4004.  These '-m' options are defined for the IBM RT PC: 
  4005.  
  4006.  -min-line-mul 
  4007.            Use an in-line code sequence for integer multiplies.  This is the 
  4008.            default. 
  4009.  
  4010.  -mcall-lib-mul 
  4011.            Call lmul$$ for integer multiples. 
  4012.  
  4013.  -mfull-fp-blocks 
  4014.            Generate full-size floating point data blocks, including the minimum 
  4015.            amount of scratch space recommended by IBM.  This is the default. 
  4016.  
  4017.  -mminimum-fp-blocks 
  4018.            Do not include extra scratch space in floating point data blocks. 
  4019.            This results in smaller code, but slower execution, since scratch 
  4020.            space must be allocated dynamically. 
  4021.  
  4022.  -mfp-arg-in-fpregs 
  4023.            Use a calling sequence incompatible with the IBM calling convention 
  4024.            in which floating point arguments are passed in floating point 
  4025.            registers. Note that varargs.h and stdargs.h will not work with 
  4026.            floating point operands if this option is specified. 
  4027.  
  4028.  -mfp-arg-in-gregs 
  4029.            Use the normal calling convention for floating point arguments. 
  4030.            This is the default. 
  4031.  
  4032.  -mhc-struct-return 
  4033.            Return structures of more than one word in memory, rather than in a 
  4034.            register.  This provides compatibility with the MetaWare HighC (hc) 
  4035.            compiler.  Use the option '-fpcc-struct-return' for compatibility 
  4036.            with the Portable C Compiler (pcc). 
  4037.  
  4038.  -mnohc-struct-return 
  4039.            Return some structures of more than one word in registers, when 
  4040.            convenient.  This is the default.  For compatibility with the 
  4041.            IBM-supplied compilers, use the option '-fpcc-struct-return' or the 
  4042.            option '-mhc-struct-return'. 
  4043.  
  4044.  
  4045. ΓòÉΓòÉΓòÉ 4.14.12. MIPS Options ΓòÉΓòÉΓòÉ
  4046.  
  4047.  These '-m' options are defined for the MIPS family of computers: 
  4048.  
  4049.  -mcpu=cpu type 
  4050.            Assume the defaults for the machine type cpu type when scheduling 
  4051.            instructions.  The choices for cpu type are 'r2000', 'r3000', 
  4052.            'r4000', 'r4400', 'r4600', and 'r6000'.  While picking a specific 
  4053.            cpu type will schedule things appropriately for that particular 
  4054.            chip, the compiler will not generate any code that does not meet 
  4055.            level 1 of the MIPS ISA (instruction set architecture) without the 
  4056.            '-mips2' or '-mips3' switches being used. 
  4057.  
  4058.  -mips1 
  4059.            Issue instructions from level 1 of the MIPS ISA.  This is the 
  4060.            default. 'r3000' is the default cpu type at this ISA level. 
  4061.  
  4062.  -mips2 
  4063.            Issue instructions from level 2 of the MIPS ISA (branch likely, 
  4064.            square root instructions).  'r6000' is the default cpu type at this 
  4065.            ISA level. 
  4066.  
  4067.  -mips3 
  4068.            Issue instructions from level 3 of the MIPS ISA (64 bit 
  4069.            instructions). 'r4000' is the default cpu type at this ISA level. 
  4070.            This option does not change the sizes of any of the C data types. 
  4071.  
  4072.  -mfp32 
  4073.            Assume that 32 32-bit floating point registers are available.  This 
  4074.            is the default. 
  4075.  
  4076.  -mfp64 
  4077.            Assume that 32 64-bit floating point registers are available.  This 
  4078.            is the default when the '-mips3' option is used. 
  4079.  
  4080.  -mgp32 
  4081.            Assume that 32 32-bit general purpose registers are available.  This 
  4082.            is the default. 
  4083.  
  4084.  -mgp64 
  4085.            Assume that 32 64-bit general purpose registers are available.  This 
  4086.            is the default when the '-mips3' option is used. 
  4087.  
  4088.  -mint64 
  4089.            Types long, int, and pointer are 64 bits.  This works only if 
  4090.            '-mips3' is also specified. 
  4091.  
  4092.  -mlong64 
  4093.            Types long and pointer are 64 bits, and type int is 32 bits. This 
  4094.            works only if '-mips3' is also specified. 
  4095.  
  4096.  -mmips-as 
  4097.            Generate code for the MIPS assembler, and invoke 'mips-tfile' to add 
  4098.            normal debug information.  This is the default for all platforms 
  4099.            except for the OSF/1 reference platform, using the OSF/rose object 
  4100.            format.  If the either of the '-gstabs' or '-gstabs+' switches are 
  4101.            used, the 'mips-tfile' program will encapsulate the stabs within 
  4102.            MIPS ECOFF. 
  4103.  
  4104.  -mgas 
  4105.            Generate code for the GNU assembler.  This is the default on the 
  4106.            OSF/1 reference platform, using the OSF/rose object format.  Also, 
  4107.            this is the default if the configure option '--with-gnu-as' is used. 
  4108.  
  4109.  -msplit-addresses 
  4110.  
  4111.  -mno-split-addresses 
  4112.            Generate code to load the high and low parts of address constants 
  4113.            separately. This allows gcc to optimize away redundant loads of the 
  4114.            high order bits of addresses.  This optimization requires GNU as and 
  4115.            GNU ld. This optimization is enabled by default for some embedded 
  4116.            targets where GNU as and GNU ld are standard. 
  4117.  
  4118.  -mrnames 
  4119.  
  4120.  -mno-rnames 
  4121.            The '-mrnames' switch says to output code using the MIPS software 
  4122.            names for the registers, instead of the hardware names (ie, a0 
  4123.            instead of $4).  The only known assembler that supports this option 
  4124.            is the Algorithmics assembler. 
  4125.  
  4126.  -mgpopt 
  4127.  
  4128.  -mno-gpopt 
  4129.            The '-mgpopt' switch says to write all of the data declarations 
  4130.            before the instructions in the text section, this allows the MIPS 
  4131.            assembler to generate one word memory references instead of using 
  4132.            two words for short global or static data items.  This is on by 
  4133.            default if optimization is selected. 
  4134.  
  4135.  -mstats 
  4136.  
  4137.  -mno-stats 
  4138.            For each non-inline function processed, the '-mstats' switch causes 
  4139.            the compiler to emit one line to the standard error file to print 
  4140.            statistics about the program (number of registers saved, stack size, 
  4141.            etc.). 
  4142.  
  4143.  -mmemcpy 
  4144.  
  4145.  -mno-memcpy 
  4146.            The '-mmemcpy' switch makes all block moves call the appropriate 
  4147.            string function ('memcpy' or 'bcopy') instead of possibly generating 
  4148.            inline code. 
  4149.  
  4150.  -mmips-tfile 
  4151.  
  4152.  -mno-mips-tfile 
  4153.            The '-mno-mips-tfile' switch causes the compiler not postprocess the 
  4154.            object file with the 'mips-tfile' program, after the MIPS assembler 
  4155.            has generated it to add debug support.  If 'mips-tfile' is not run, 
  4156.            then no local variables will be available to the debugger.  In 
  4157.            addition, 'stage2' and 'stage3' objects will have the temporary file 
  4158.            names passed to the assembler embedded in the object file, which 
  4159.            means the objects will not compare the same.  The '-mno-mips-tfile' 
  4160.            switch should only be used when there are bugs in the 'mips-tfile' 
  4161.            program that prevents compilation. 
  4162.  
  4163.  -msoft-float 
  4164.            Generate output containing library calls for floating point. 
  4165.            Warning: the requisite libraries are not part of GNU CC. Normally 
  4166.            the facilities of the machine's usual C compiler are used, but this 
  4167.            can't be done directly in cross-compilation.  You must make your own 
  4168.            arrangements to provide suitable library functions for 
  4169.            cross-compilation. 
  4170.  
  4171.  -mhard-float 
  4172.            Generate output containing floating point instructions.  This is the 
  4173.            default if you use the unmodified sources. 
  4174.  
  4175.  -mabicalls 
  4176.  
  4177.  -mno-abicalls 
  4178.            Emit (or do not emit) the pseudo operations '.abicalls', '.cpload', 
  4179.            and '.cprestore' that some System V.4 ports use for position 
  4180.            independent code. 
  4181.  
  4182.  -mlong-calls 
  4183.  
  4184.  -mno-long-calls 
  4185.            Do all calls with the 'JALR' instruction, which requires loading up 
  4186.            a function's address into a register before the call. You need to 
  4187.            use this switch, if you call outside of the current 512 megabyte 
  4188.            segment to functions that are not through pointers. 
  4189.  
  4190.  -mhalf-pic 
  4191.  
  4192.  -mno-half-pic 
  4193.            Put pointers to extern references into the data section and load 
  4194.            them up, rather than put the references in the text section. 
  4195.  
  4196.  -membedded-pic 
  4197.  
  4198.  -mno-embedded-pic 
  4199.            Generate PIC code suitable for some embedded systems.  All calls are 
  4200.            made using PC relative address, and all data is addressed using the 
  4201.            $gp register. This requires GNU as and GNU ld which do most of the 
  4202.            work. 
  4203.  
  4204.  -membedded-data 
  4205.  
  4206.  -mno-embedded-data 
  4207.            Allocate variables to the read-only data section first if possible, 
  4208.            then next in the small data section if possible, otherwise in data. 
  4209.            This gives slightly slower code than the default, but reduces the 
  4210.            amount of RAM required when executing, and thus may be preferred for 
  4211.            some embedded systems. 
  4212.  
  4213.  -msingle-float 
  4214.  
  4215.  -mdouble-float 
  4216.            The '-msingle-float' switch tells gcc to assume that the floating 
  4217.            point coprocessor only supports single precision operations, as on 
  4218.            the 'r4650' chip.  The '-mdouble-float' switch permits gcc to use 
  4219.            double precision operations.  This is the default. 
  4220.  
  4221.  -mmad 
  4222.  
  4223.  -mno-mad 
  4224.            Permit use of the 'mad', 'madu' and 'mul' instructions, as on the 
  4225.            'r4650' chip. 
  4226.  
  4227.  -m4650 
  4228.            Turns on '-msingle-float', '-mmad', and, at least for now, 
  4229.            '-mcpu=r4650'. 
  4230.  
  4231.  -EL 
  4232.            Compile code for the processor in little endian mode. The requisite 
  4233.            libraries are assumed to exist. 
  4234.  
  4235.  -EB 
  4236.            Compile code for the processor in big endian mode. The requisite 
  4237.            libraries are assumed to exist. 
  4238.  
  4239.  - G num 
  4240.            Put global and static items less than or equal to num bytes into the 
  4241.            small data or bss sections instead of the normal data or bss 
  4242.            section.  This allows the assembler to emit one word memory 
  4243.            reference instructions based on the global pointer (gp or $28), 
  4244.            instead of the normal two words used.  By default, num is 8 when the 
  4245.            MIPS assembler is used, and 0 when the GNU assembler is used.  The 
  4246.            '-G num' switch is also passed to the assembler and linker. All 
  4247.            modules should be compiled with the same '-G num' value. 
  4248.  
  4249.  -nocpp 
  4250.            Tell the MIPS assembler to not run it's preprocessor over user 
  4251.            assembler files (with a '.s' suffix) when assembling them. 
  4252.  
  4253.  
  4254. ΓòÉΓòÉΓòÉ 4.14.13. Intel 386 Options ΓòÉΓòÉΓòÉ
  4255.  
  4256.  These '-m' options are defined for the i386 family of computers: 
  4257.  
  4258.  -mcpu=cpu type 
  4259.            Assume the defaults for the machine type cpu type when scheduling 
  4260.            instructions.  The choices for cpu type are: 'i386', 'i486', 'i586' 
  4261.            ('pentium'), 'pentium', 'i686' ('pentiumpro') and 'pentiumpro'. 
  4262.            While picking a specific cpu type will schedule things appropriately 
  4263.            for that particular chip, the compiler will not generate any code 
  4264.            that does not run on the i386 without the '-march=cpu type' option 
  4265.            being used. 
  4266.  
  4267.  -march=cpu type 
  4268.            Generate instructions for the machine type cpu type.  The choices 
  4269.            for cpu type are: 'i386', 'i486', 'pentium', and 'pentiumpro'. 
  4270.            Specifying '-march=cpu type' implies '-mcpu=cpu type'. 
  4271.  
  4272.  -m386 
  4273.  
  4274.  -m486 
  4275.  
  4276.  -mpentium 
  4277.  
  4278.  -mpentiumpro 
  4279.            Synonyms for -mcpu=i386, -mcpu=i486, -mcpu=pentium, and 
  4280.            -mcpu=pentiumpro respectively. 
  4281.  
  4282.  -mieee-fp 
  4283.  
  4284.  -mno-ieee-fp 
  4285.            Control whether or not the compiler uses IEEE floating point 
  4286.            comparisons.  These handle correctly the case where the result of a 
  4287.            comparison is unordered. 
  4288.  
  4289.  -msoft-float 
  4290.            Generate output containing library calls for floating point. 
  4291.            Warning: the requisite libraries are not part of GNU CC. Normally 
  4292.            the facilities of the machine's usual C compiler are used, but this 
  4293.            can't be done directly in cross-compilation.  You must make your own 
  4294.            arrangements to provide suitable library functions for 
  4295.            cross-compilation. 
  4296.  
  4297.            On machines where a function returns floating point results in the 
  4298.            80387 register stack, some floating point opcodes may be emitted 
  4299.            even if '-msoft-float' is used. 
  4300.  
  4301.  -mno-fp-ret-in-387 
  4302.            Do not use the FPU registers for return values of functions. 
  4303.  
  4304.            The usual calling convention has functions return values of types 
  4305.            float and double in an FPU register, even if there is no FPU.  The 
  4306.            idea is that the operating system should emulate an FPU. 
  4307.  
  4308.            The option '-mno-fp-ret-in-387' causes such values to be returned in 
  4309.            ordinary CPU registers instead. 
  4310.  
  4311.  -mno-fancy-math-387 
  4312.            Some 387 emulators do not support the sin, cos and sqrt instructions 
  4313.            for the 387.  Specify this option to avoid generating those 
  4314.            instructions. This option is the default on FreeBSD. As of revision 
  4315.            2.6.1, these instructions are not generated unless you also use the 
  4316.            '-ffast-math' switch. 
  4317.  
  4318.  -malign-double 
  4319.  
  4320.  -mno-align-double 
  4321.            Control whether GNU CC aligns double, long double, and long long 
  4322.            variables on a two word boundary or a one word boundary.  Aligning 
  4323.            double variables on a two word boundary will produce code that runs 
  4324.            somewhat faster on a 'Pentium' at the expense of more memory. 
  4325.  
  4326.            Warning: if you use the '-malign-double' switch, structures 
  4327.            containing the above types will be aligned differently than the 
  4328.            published application binary interface specifications for the 386. 
  4329.  
  4330.  -msvr3-shlib 
  4331.  
  4332.  -mno-svr3-shlib 
  4333.            Control whether GNU CC places uninitialized locals into bss or data. 
  4334.            '-msvr3-shlib' places these locals into bss. These options are 
  4335.            meaningful only on System V Release 3. 
  4336.  
  4337.  -mno-wide-multiply 
  4338.  
  4339.  -mwide-multiply 
  4340.            Control whether GNU CC uses the mul and imul that produce 64 bit 
  4341.            results in eax:edx from 32 bit operands to do long long multiplies 
  4342.            and 32-bit division by constants. 
  4343.  
  4344.  -mrtd 
  4345.            Use a different function-calling convention, in which functions that 
  4346.            take a fixed number of arguments return with the ret num 
  4347.            instruction, which pops their arguments while returning.  This saves 
  4348.            one instruction in the caller since there is no need to pop the 
  4349.            arguments there. 
  4350.  
  4351.            You can specify that an individual function is called with this 
  4352.            calling sequence with the function attribute 'stdcall'.  You can 
  4353.            also override the '-mrtd' option by using the function attribute 
  4354.            'cdecl'. See Function Attributes 
  4355.  
  4356.            Warning: this calling convention is incompatible with the one 
  4357.            normally used on Unix, so you cannot use it if you need to call 
  4358.            libraries compiled with the Unix compiler. 
  4359.  
  4360.            Also, you must provide function prototypes for all functions that 
  4361.            take variable numbers of arguments (including printf); otherwise 
  4362.            incorrect code will be generated for calls to those functions. 
  4363.  
  4364.            In addition, seriously incorrect code will result if you call a 
  4365.            function with too many arguments.  (Normally, extra arguments are 
  4366.            harmlessly ignored.) 
  4367.  
  4368.  -mreg-alloc=regs 
  4369.            Control the default allocation order of integer registers.  The 
  4370.            string regs is a series of letters specifying a register.  The 
  4371.            supported letters are: a allocate EAX; b allocate EBX; c allocate 
  4372.            ECX; d allocate EDX; S allocate ESI; D allocate EDI; B allocate EBP. 
  4373.  
  4374.  -mregparm=num 
  4375.            Control how many registers are used to pass integer arguments.  By 
  4376.            default, no registers are used to pass arguments, and at most 3 
  4377.            registers can be used.  You can control this behavior for a specific 
  4378.            function by using the function attribute 'regparm'.  See Function 
  4379.            Attributes 
  4380.  
  4381.            Warning: if you use this switch, and num is nonzero, then you must 
  4382.            build all modules with the same value, including any libraries. 
  4383.            This includes the system libraries and startup modules. 
  4384.  
  4385.  -malign-loops=num 
  4386.            Align loops to a 2 raised to a num byte boundary.  If 
  4387.            '-malign-loops' is not specified, the default is 2. 
  4388.  
  4389.  -malign-jumps=num 
  4390.            Align instructions that are only jumped to to a 2 raised to a num 
  4391.            byte boundary.  If '-malign-jumps' is not specified, the default is 
  4392.            2 if optimizing for a 386, and 4 if optimizing for a 486. 
  4393.  
  4394.  -malign-functions=num 
  4395.            Align the start of functions to a 2 raised to num byte boundary. If 
  4396.            '-malign-functions' is not specified, the default is 2 if optimizing 
  4397.            for a 386, and 4 if optimizing for a 486. 
  4398.  
  4399.  
  4400. ΓòÉΓòÉΓòÉ 4.14.14. HPPA Options ΓòÉΓòÉΓòÉ
  4401.  
  4402.  These '-m' options are defined for the HPPA family of computers: 
  4403.  
  4404.  -mpa-risc-1-0 
  4405.            Generate code for a PA 1.0 processor. 
  4406.  
  4407.  -mpa-risc-1-1 
  4408.            Generate code for a PA 1.1 processor. 
  4409.  
  4410.  -mbig-switch 
  4411.            Generate code suitable for big switch tables.  Use this option only 
  4412.            if the assembler/linker complain about out of range branches within 
  4413.            a switch table. 
  4414.  
  4415.  -mjump-in-delay 
  4416.            Fill delay slots of function calls with unconditional jump 
  4417.            instructions by modifying the return pointer for the function call 
  4418.            to be the target of the conditional jump. 
  4419.  
  4420.  -mdisable-fpregs 
  4421.            Prevent floating point registers from being used in any manner. 
  4422.            This is necessary for compiling kernels which perform lazy context 
  4423.            switching of floating point registers.  If you use this option and 
  4424.            attempt to perform floating point operations, the compiler will 
  4425.            abort. 
  4426.  
  4427.  -mdisable-indexing 
  4428.            Prevent the compiler from using indexing address modes.  This avoids 
  4429.            some rather obscure problems when compiling MIG generated code under 
  4430.            MACH. 
  4431.  
  4432.  -mno-space-regs 
  4433.            Generate code that assumes the target has no space registers.  This 
  4434.            allows GCC to generate faster indirect calls and use unscaled index 
  4435.            address modes. 
  4436.  
  4437.            Such code is suitable for level 0 PA systems and kernels. 
  4438.  
  4439.  -mfast-indirect-calls 
  4440.            Generate code that assumes calls never cross space boundaries.  This 
  4441.            allows GCC to emit code which performs faster indirect calls. 
  4442.  
  4443.            This option will not work in the presense of shared libraries or 
  4444.            nested functions. 
  4445.  
  4446.  -mspace 
  4447.            Optimize for space rather than execution time.  Currently this only 
  4448.            enables out of line function prologues and epilogues.  This option 
  4449.            is incompatible with PIC code generation and profiling. 
  4450.  
  4451.  -mlong-load-store 
  4452.            Generate 3-instruction load and store sequences as sometimes 
  4453.            required by the HP-UX 10 linker.  This is equivalent to the '+k' 
  4454.            option to the HP compilers. 
  4455.  
  4456.  -mportable-runtime 
  4457.            Use the portable calling conventions proposed by HP for ELF systems. 
  4458.  
  4459.  -mgas 
  4460.            Enable the use of assembler directives only GAS understands. 
  4461.  
  4462.  -mschedule=cpu type 
  4463.            Schedule code according to the constraints for the machine type cpu 
  4464.            type.  The choices for cpu type are '700' for 7n0 machines, '7100' 
  4465.            for 7n5 machines, and '7100' for 7n2 machines.  '7100' is the 
  4466.            default for cpu type. 
  4467.  
  4468.            Note the '7100LC' scheduling information is incomplete and using 
  4469.            '7100LC' often leads to bad schedules.  For now it's probably best 
  4470.            to use '7100' instead of '7100LC' for the 7n2 machines. 
  4471.  
  4472.  -mlinker-opt 
  4473.            Enable the optimization pass in the HPUX linker.  Note this makes 
  4474.            symbolic debugging impossible.  It also triggers a bug in the HPUX 8 
  4475.            and HPUX 9 linkers in which they give bogus error messages when 
  4476.            linking some programs. 
  4477.  
  4478.  -msoft-float 
  4479.            Generate output containing library calls for floating point. 
  4480.            Warning: the requisite libraries are not available for all HPPA 
  4481.            targets.  Normally the facilities of the machine's usual C compiler 
  4482.            are used, but this cannot be done directly in cross-compilation. 
  4483.            You must make your own arrangements to provide suitable library 
  4484.            functions for cross-compilation.  The embedded target 
  4485.            'hppa1.1-*-pro' does provide software floating point support. 
  4486.  
  4487.            '-msoft-float' changes the calling convention in the output file; 
  4488.            therefore, it is only useful if you compile all of a program with 
  4489.            this option.  In particular, you need to compile 'libgcc.a', the 
  4490.            library that comes with GNU CC, with '-msoft-float' in order for 
  4491.            this to work. 
  4492.  
  4493.  
  4494. ΓòÉΓòÉΓòÉ 4.14.15. Intel 960 Options ΓòÉΓòÉΓòÉ
  4495.  
  4496.  These '-m' options are defined for the Intel 960 implementations: 
  4497.  
  4498.  -mcpu type 
  4499.            Assume the defaults for the machine type cpu type for some of the 
  4500.            other options, including instruction scheduling, floating point 
  4501.            support, and addressing modes.  The choices for cpu type are 'ka', 
  4502.            'kb', 'mc', 'ca', 'cf', 'sa', and 'sb'. The default is 'kb'. 
  4503.  
  4504.  -mnumerics 
  4505.  
  4506.  -msoft-float 
  4507.            The '-mnumerics' option indicates that the processor does support 
  4508.            floating-point instructions.  The '-msoft-float' option indicates 
  4509.            that floating-point support should not be assumed. 
  4510.  
  4511.  -mleaf-procedures 
  4512.  
  4513.  -mno-leaf-procedures 
  4514.            Do (or do not) attempt to alter leaf procedures to be callable with 
  4515.            the bal instruction as well as call.  This will result in more 
  4516.            efficient code for explicit calls when the bal instruction can be 
  4517.            substituted by the assembler or linker, but less efficient code in 
  4518.            other cases, such as calls via function pointers, or using a linker 
  4519.            that doesn't support this optimization. 
  4520.  
  4521.  -mtail-call 
  4522.  
  4523.  -mno-tail-call 
  4524.            Do (or do not) make additional attempts (beyond those of the 
  4525.            machine-independent portions of the compiler) to optimize 
  4526.            tail-recursive calls into branches.  You may not want to do this 
  4527.            because the detection of cases where this is not valid is not 
  4528.            totally complete.  The default is '-mno-tail-call'. 
  4529.  
  4530.  -mcomplex-addr 
  4531.  
  4532.  -mno-complex-addr 
  4533.            Assume (or do not assume) that the use of a complex addressing mode 
  4534.            is a win on this implementation of the i960.  Complex addressing 
  4535.            modes may not be worthwhile on the K-series, but they definitely are 
  4536.            on the C-series. The default is currently '-mcomplex-addr' for all 
  4537.            processors except the CB and CC. 
  4538.  
  4539.  -mcode-align 
  4540.  
  4541.  -mno-code-align 
  4542.            Align code to 8-byte boundaries for faster fetching (or don't 
  4543.            bother). Currently turned on by default for C-series implementations 
  4544.            only. 
  4545.  
  4546.  -mic-compat 
  4547.  
  4548.  -mic2.0-compat 
  4549.  
  4550.  -mic3.0-compat 
  4551.            Enable compatibility with iC960 v2.0 or v3.0. 
  4552.  
  4553.  -masm-compat 
  4554.  
  4555.  -mintel-asm 
  4556.            Enable compatibility with the iC960 assembler. 
  4557.  
  4558.  -mstrict-align 
  4559.  
  4560.  -mno-strict-align 
  4561.            Do not permit (do permit) unaligned accesses. 
  4562.  
  4563.  -mold-align 
  4564.            Enable structure-alignment compatibility with Intel's gcc release 
  4565.            version 1.3 (based on gcc 1.37).  This option implies 
  4566.            '-mstrict-align'. 
  4567.  
  4568.  
  4569. ΓòÉΓòÉΓòÉ 4.14.16. DEC Alpha Options ΓòÉΓòÉΓòÉ
  4570.  
  4571.  These '-m' options are defined for the DEC Alpha implementations: 
  4572.  
  4573.  -mno-soft-float 
  4574.  
  4575.  -msoft-float 
  4576.            Use (do not use) the hardware floating-point instructions for 
  4577.            floating-point operations.  When -msoft-float is specified, 
  4578.            functions in 'libgcc1.c' will be used to perform floating-point 
  4579.            operations.  Unless they are replaced by routines that emulate the 
  4580.            floating-point operations, or compiled in such a way as to call such 
  4581.            emulations routines, these routines will issue floating-point 
  4582.            operations.  If you are compiling for an Alpha without 
  4583.            floating-point operations, you must ensure that the library is built 
  4584.            so as not to call them. 
  4585.  
  4586.            Note that Alpha implementations without floating-point operations 
  4587.            are required to have floating-point registers. 
  4588.  
  4589.  -mfp-reg 
  4590.  
  4591.  -mno-fp-regs 
  4592.            Generate code that uses (does not use) the floating-point register 
  4593.            set. -mno-fp-regs implies -msoft-float.  If the floating-point 
  4594.            register set is not used, floating point operands are passed in 
  4595.            integer registers as if they were integers and floating-point 
  4596.            results are passed in $0 instead of $f0.  This is a non-standard 
  4597.            calling sequence, so any function with a floating-point argument or 
  4598.            return value called by code compiled with -mno-fp-regs must also be 
  4599.            compiled with that option. 
  4600.  
  4601.            A typical use of this option is building a kernel that does not use, 
  4602.            and hence need not save and restore, any floating-point registers. 
  4603.  
  4604.  -mieee 
  4605.            The Alpha architecture implements floating-point hardware optimized 
  4606.            for maximum performance.  It is mostly compliant with the IEEE 
  4607.            floating point standard.  However, for full compliance, software 
  4608.            assistance is required.  This option generates code fully IEEE 
  4609.            compliant code except that the inexact flag is not maintained (see 
  4610.            below). If this option is turned on, the CPP macro _IEEE_FP is 
  4611.            defined during compilation.  The option is a shorthand for: 
  4612.            '-D_IEEE_FP -mfp-trap-mode=su -mtrap-precision=i -mieee-conformant'. 
  4613.            The resulting code is less efficient but is able to correctly 
  4614.            support denormalized numbers and exceptional IEEE values such as 
  4615.            not-a-number and plus/minus infinity.  Other Alpha compilers call 
  4616.            this option -ieee_with_no_inexact. 
  4617.  
  4618.  -mieee-with-inexact 
  4619.            This is like '-mieee' except the generated code also maintains the 
  4620.            IEEE inexact flag.  Turning on this option causes the generated code 
  4621.            to implement fully-compliant IEEE math.  The option is a shorthand 
  4622.            for '-D_IEEE_FP -D_IEEE_FP_INEXACT' plus the three following: 
  4623.            '-mieee-conformant', '-mfp-trap-mode=sui', and '-mtrap-precision=i'. 
  4624.            On some Alpha implementations the resulting code may execute 
  4625.            significantly slower than the code generated by default.  Since 
  4626.            there is very little code that depends on the inexact flag, you 
  4627.            should normally not specify this option.  Other Alpha compilers call 
  4628.            this option '-ieee_with_inexact'. 
  4629.  
  4630.  -mfp-trap-mode=trap mode 
  4631.            This option controls what floating-point related traps are enabled. 
  4632.            Other Alpha compilers call this option '-fptm 'trap mode. The trap 
  4633.            mode can be set to one of four values: 
  4634.  
  4635.              'n' 
  4636.                          This is the default (normal) setting.  The only traps 
  4637.                          that are enabled are the ones that cannot be disabled 
  4638.                          in software (e.g., division by zero trap). 
  4639.  
  4640.              'u' 
  4641.                          In addition to the traps enabled by 'n', underflow 
  4642.                          traps are enabled as well. 
  4643.  
  4644.              'su' 
  4645.                          Like 'su', but the instructions are marked to be safe 
  4646.                          for software completion (see Alpha architecture manual 
  4647.                          for details). 
  4648.  
  4649.              'sui' 
  4650.                          Like 'su', but inexact traps are enabled as well. 
  4651.  
  4652.  -mfp-rounding-mode=rounding mode 
  4653.            Selects the IEEE rounding mode.  Other Alpha compilers call this 
  4654.            option '-fprm 'rounding mode.  The rounding mode can be one of: 
  4655.  
  4656.              'n' 
  4657.                          Normal IEEE rounding mode.  Floating point numbers are 
  4658.                          rounded towards the nearest machine number or towards 
  4659.                          the even machine number in case of a tie. 
  4660.  
  4661.              'm' 
  4662.                          Round towards minus infinity. 
  4663.  
  4664.              'c' 
  4665.                          Chopped rounding mode.  Floating point numbers are 
  4666.                          rounded towards zero. 
  4667.  
  4668.              'd' 
  4669.                          Dynamic rounding mode.  A field in the floating point 
  4670.                          control register (fpcr, see Alpha architecture 
  4671.                          reference manual) controls the rounding mode in 
  4672.                          effect.  The C library initializes this register for 
  4673.                          rounding towards plus infinity.  Thus, unless your 
  4674.                          program modifies the fpcr, 'd' corresponds to round 
  4675.                          towards plus infinity. 
  4676.  
  4677.  -mtrap-precision=trap precision 
  4678.            In the Alpha architecture, floating point traps are imprecise.  This 
  4679.            means without software assistance it is impossible to recover from a 
  4680.            floating trap and program execution normally needs to be terminated. 
  4681.            GNU CC can generate code that can assist operating system trap 
  4682.            handlers in determining the exact location that caused a floating 
  4683.            point trap. Depending on the requirements of an application, 
  4684.            different levels of precisions can be selected: 
  4685.  
  4686.              'p' 
  4687.                          Program precision.  This option is the default and 
  4688.                          means a trap handler can only identify which program 
  4689.                          caused a floating point exception. 
  4690.  
  4691.              'f' 
  4692.                          Function precision.  The trap handler can determine 
  4693.                          the function that caused a floating point exception. 
  4694.  
  4695.              'i' 
  4696.                          Instruction precision.  The trap handler can determine 
  4697.                          the exact instruction that caused a floating point 
  4698.                          exception. 
  4699.  
  4700.              Other Alpha compilers provide the equivalent options called 
  4701.              '-scope_safe' and '-resumption_safe'. 
  4702.  
  4703.  -mieee-conformant 
  4704.            This option marks the generated code as IEEE conformant.  You must 
  4705.            not use this option unless you also specify '-mtrap-precision=i' and 
  4706.            either '-mfp-trap-mode=su' or '-mfp-trap-mode=sui'.  Its only effect 
  4707.            is to emit the line '.eflag 48' in the function prologue of the 
  4708.            generated assembly file.  Under DEC Unix, this has the effect that 
  4709.            IEEE-conformant math library routines will be linked in. 
  4710.  
  4711.  -mbuild-constants 
  4712.            Normally GNU CC examines a 32- or 64-bit integer constant to see if 
  4713.            it can construct it from smaller constants in two or three 
  4714.            instructions.  If it cannot, it will output the constant as a 
  4715.            literal and generate code to load it from the data segment at 
  4716.            runtime. 
  4717.  
  4718.            Use this option to require GNU CC to construct all integer constants 
  4719.            using code, even if it takes more instructions (the maximum is six). 
  4720.  
  4721.            You would typically use this option to build a shared library 
  4722.            dynamic loader.  Itself a shared library, it must relocate itself in 
  4723.            memory before it can find the variables and constants in its own 
  4724.            data segment. 
  4725.  
  4726.  -malpha-as 
  4727.  
  4728.  -mgas 
  4729.            Select whether to generate code to be assembled by the 
  4730.            vendor-supplied assembler ('-malpha-as') or by the GNU assembler 
  4731.            '-mgas'. 
  4732.  
  4733.  -mbwx 
  4734.  
  4735.  -mno-bwx 
  4736.  
  4737.  -mcix 
  4738.  
  4739.  -mno-cix 
  4740.  
  4741.  -mmax 
  4742.  
  4743.  -mno-max 
  4744.            Indicate whether GNU CC should generate code to use the optional 
  4745.            BWX, CIX, and MAX instruction sets.  The default is to use the 
  4746.            instruction sets supported by the CPU type specified via '-mcpu=' 
  4747.            option or that of the CPU on which GNU CC was built if none was 
  4748.            specified. 
  4749.  
  4750.  -mcpu=cpu_type 
  4751.            Set the instruction set, register set, and instruction scheduling 
  4752.            parameters for machine type cpu_type.  You can specify either the 
  4753.            'EV' style name or the corresponding chip number.  GNU CC supports 
  4754.            scheduling parameters for the EV4 and EV5 family of processors and 
  4755.            will choose the default values for the instruction set from the 
  4756.            processor you specify.  If you do not specify a processor type, GNU 
  4757.            CC will default to the processor on which the compiler was built. 
  4758.  
  4759.            Supported values for cpu_type are 
  4760.  
  4761.              'ev4' 
  4762.  
  4763.              '21064' 
  4764.                          Schedules as an EV4 and has no instruction set 
  4765.                          extensions. 
  4766.  
  4767.              'ev5' 
  4768.  
  4769.              '21164' 
  4770.                          Schedules as an EV5 and has no instruction set 
  4771.                          extensions. 
  4772.  
  4773.              'ev56' 
  4774.  
  4775.              '21164a' 
  4776.                          Schedules as an EV5 and supports the BWX extension. 
  4777.  
  4778.              'pca56' 
  4779.  
  4780.              '21164PC' 
  4781.                          Schedules as an EV5 and supports the BWX and MAX 
  4782.                          extensions. 
  4783.  
  4784.              'ev6' 
  4785.  
  4786.              '21264' 
  4787.                          Schedules as an EV5 (until Digital releases the 
  4788.                          scheduling parameters for the EV6) and supports the 
  4789.                          BWX, CIX, and MAX extensions. 
  4790.  
  4791.  
  4792. ΓòÉΓòÉΓòÉ 4.14.17. Clipper Options ΓòÉΓòÉΓòÉ
  4793.  
  4794.  These '-m' options are defined for the Clipper implementations: 
  4795.  
  4796.  -mc300 
  4797.            Produce code for a C300 Clipper processor. This is the default. 
  4798.  
  4799.  -mc400 
  4800.            Produce code for a C400 Clipper processor i.e. use floating point 
  4801.            registers f8┬╖┬╖f15. 
  4802.  
  4803.  
  4804. ΓòÉΓòÉΓòÉ 4.14.18. H8/300 Options ΓòÉΓòÉΓòÉ
  4805.  
  4806.  These '-m' options are defined for the H8/300 implementations: 
  4807.  
  4808.  -mrelax 
  4809.            Shorten some address references at link time, when possible; uses 
  4810.            the linker option '-relax'.  See Section ld and the H8/300 of Using 
  4811.            ld, for a fuller description. 
  4812.  
  4813.  -mh 
  4814.            Generate code for the H8/300H. 
  4815.  
  4816.  -ms 
  4817.            Generate code for the H8/S. 
  4818.  
  4819.  -mint32 
  4820.            Make int data 32 bits by default. 
  4821.  
  4822.  -malign-300 
  4823.            On the h8/300h, use the same alignment rules as for the h8/300. The 
  4824.            default for the h8/300h is to align longs and floats on 4 byte 
  4825.            boundaries. '-malign-300' causes them to be aligned on 2 byte 
  4826.            boundaries. This option has no effect on the h8/300. 
  4827.  
  4828.  
  4829. ΓòÉΓòÉΓòÉ 4.14.19. SH Options ΓòÉΓòÉΓòÉ
  4830.  
  4831.  These '-m' options are defined for the SH implementations: 
  4832.  
  4833.  -m1 
  4834.            Generate code for the SH1. 
  4835.  
  4836.  -m2 
  4837.            Generate code for the SH2. 
  4838.  
  4839.  -m3 
  4840.            Generate code for the SH3. 
  4841.  
  4842.  -m3e 
  4843.            Generate code for the SH3e. 
  4844.  
  4845.  -mb 
  4846.            Compile code for the processor in big endian mode. 
  4847.  
  4848.  -ml 
  4849.            Compile code for the processor in little endian mode. 
  4850.  
  4851.  -mrelax 
  4852.            Shorten some address references at link time, when possible; uses 
  4853.            the linker option '-relax'. 
  4854.  
  4855.  
  4856. ΓòÉΓòÉΓòÉ 4.14.20. Options for System V ΓòÉΓòÉΓòÉ
  4857.  
  4858.  These additional options are available on System V Release 4 for compatibility 
  4859.  with other compilers on those systems: 
  4860.  
  4861.  -G 
  4862.            Create a shared object. It is recommended that '-symbolic' or 
  4863.            '-shared' be used instead. 
  4864.  
  4865.  -Qy 
  4866.            Identify the versions of each tool used by the compiler, in a .ident 
  4867.            assembler directive in the output. 
  4868.  
  4869.  -Qn 
  4870.            Refrain from adding .ident directives to the output file (this is 
  4871.            the default). 
  4872.  
  4873.  -YP,dirs 
  4874.            Search the directories dirs, and no others, for libraries specified 
  4875.            with '-l'. 
  4876.  
  4877.  -Ym,dir 
  4878.            Look in the directory dir to find the M4 preprocessor. The assembler 
  4879.            uses this option. 
  4880.  
  4881.  
  4882. ΓòÉΓòÉΓòÉ 4.14.21. V850 Options ΓòÉΓòÉΓòÉ
  4883.  
  4884.  These '-m' options are defined for V850 implementations: 
  4885.  
  4886.  -mlong-calls 
  4887.  
  4888.  -mno-long-calls 
  4889.            Treat all calls as being far away (near).  If calls are assumed to 
  4890.            be far away, the compiler will always load the functions address up 
  4891.            into a register, and call indirect through the pointer. 
  4892.  
  4893.  -mno-ep 
  4894.  
  4895.  -mep 
  4896.            Do not optimize (do optimize) basic blocks that use the same index 
  4897.            pointer 4 or more times to copy pointer into the ep register, and 
  4898.            use the shorter sld and sst instructions.  The '-mep' option is on 
  4899.            by default if you optimize. 
  4900.  
  4901.  -mno-prolog-function 
  4902.  
  4903.  -mprolog-function 
  4904.            Do not use (do use) external functions to save and restore registers 
  4905.            at the prolog and epilog of a function.  The external functions are 
  4906.            slower, but use less code space if more than one function saves the 
  4907.            same number of registers.  The '-mprolog-function' option is on by 
  4908.            default if you optimize. 
  4909.  
  4910.  -mspace 
  4911.            Try to make the code as small as possible.  At present, this just 
  4912.            turns on the '-mep' and '-mprolog-function' options. 
  4913.  
  4914.  -mtda=n 
  4915.            Put static or global variables whose size is n bytes or less into 
  4916.            the tiny data area that register ep points to.  The tiny data area 
  4917.            can hold up to 256 bytes in total (128 bytes for byte references). 
  4918.  
  4919.  -msda=n 
  4920.            Put static or global variables whose size is n bytes or less into 
  4921.            the small data area that register gp points to.  The small data area 
  4922.            can hold up to 64 kilobytes. 
  4923.  
  4924.  -mzda=n 
  4925.            Put static or global variables whose size is n bytes or less into 
  4926.            the first 32 kilobytes of memory. 
  4927.  
  4928.  -mv850 
  4929.            Specify that the target processor is the V850. 
  4930.  
  4931.  -mbig-switch 
  4932.            Generate code suitable for big switch tables.  Use this option only 
  4933.            if the assembler/linker complain about out of range branches within 
  4934.            a switch table. 
  4935.  
  4936.  
  4937. ΓòÉΓòÉΓòÉ 4.15. Options for Code Generation Conventions ΓòÉΓòÉΓòÉ
  4938.  
  4939.  These machine-independent options control the interface conventions used in 
  4940.  code generation. 
  4941.  
  4942.  Most of them have both positive and negative forms; the negative form of 
  4943.  '-ffoo' would be '-fno-foo'.  In the table below, only one of the forms is 
  4944.  listed---the one which is not the default.  You can figure out the other form 
  4945.  by either removing 'no-' or adding it. 
  4946.  
  4947.  -fexceptions 
  4948.            Enable exception handling, and generate extra code needed to 
  4949.            propagate exceptions.  If you do not specify this option, GNU CC 
  4950.            enables it by default for languages like C++ that normally require 
  4951.            exception handling, and disabled for languages like C that do not 
  4952.            normally require it. However, when compiling C code that needs to 
  4953.            interoperate properly with exception handlers written in C++, you 
  4954.            may need to enable this option. You may also wish to disable this 
  4955.            option is you are compiling older C++ programs that don't use 
  4956.            exception handling. 
  4957.  
  4958.  -funwind-tables 
  4959.            Similar to -fexceptions, except that it will just generate any 
  4960.            needed static data, but will not affect the generated code in any 
  4961.            other way. You will normally not enable this option; instead, a 
  4962.            language processor that needs this handling would enable it on your 
  4963.            behalf. 
  4964.  
  4965.  -fpcc-struct-return 
  4966.            Return ``short'' struct and union values in memory like longer ones, 
  4967.            rather than in registers.  This convention is less efficient, but it 
  4968.            has the advantage of allowing intercallability between GNU 
  4969.            CC-compiled files and files compiled with other compilers. 
  4970.  
  4971.            The precise convention for returning structures in memory depends on 
  4972.            the target configuration macros. 
  4973.  
  4974.            Short structures and unions are those whose size and alignment match 
  4975.            that of some integer type. 
  4976.  
  4977.  -freg-struct-return 
  4978.            Use the convention that struct and union values are returned in 
  4979.            registers when possible.  This is more efficient for small 
  4980.            structures than '-fpcc-struct-return'. 
  4981.  
  4982.            If you specify neither '-fpcc-struct-return' nor its contrary 
  4983.            '-freg-struct-return', GNU CC defaults to whichever convention is 
  4984.            standard for the target.  If there is no standard convention, GNU CC 
  4985.            defaults to '-fpcc-struct-return', except on targets where GNU CC is 
  4986.            the principal compiler.  In those cases, we can choose the standard, 
  4987.            and we chose the more efficient register return alternative. 
  4988.  
  4989.  -fshort-enums 
  4990.            Allocate to an enum type only as many bytes as it needs for the 
  4991.            declared range of possible values.  Specifically, the enum type will 
  4992.            be equivalent to the smallest integer type which has enough room. 
  4993.  
  4994.  -fshort-double 
  4995.            Use the same size for double as for float. 
  4996.  
  4997.  -fshared-data 
  4998.            Requests that the data and non-const variables of this compilation 
  4999.            be shared data rather than private data.  The distinction makes 
  5000.            sense only on certain operating systems, where shared data is shared 
  5001.            between processes running the same program, while private data 
  5002.            exists in one copy per process. 
  5003.  
  5004.  -fno-common 
  5005.            Allocate even uninitialized global variables in the bss section of 
  5006.            the object file, rather than generating them as common blocks.  This 
  5007.            has the effect that if the same variable is declared ( without 
  5008.            extern) in two different compilations, you will get an error when 
  5009.            you link them. The only reason this might be useful is if you wish 
  5010.            to verify that the program will work on other systems which always 
  5011.            work this way. 
  5012.  
  5013.  -fno-ident 
  5014.            Ignore the '#ident' directive. 
  5015.  
  5016.  -fno-gnu-linker 
  5017.            Do not output global initializations (such as C++ constructors and 
  5018.            destructors) in the form used by the GNU linker (on systems where 
  5019.            the GNU linker is the standard method of handling them).  Use this 
  5020.            option when you want to use a non-GNU linker, which also requires 
  5021.            using the collect2 program to make sure the system linker includes 
  5022.            constructors and destructors.  (collect2 is included in the GNU CC 
  5023.            distribution.)  For systems which must use collect2, the compiler 
  5024.            driver gcc is configured to do this automatically. 
  5025.  
  5026.  -finhibit-size-directive 
  5027.            Don't output a .size assembler directive, or anything else that 
  5028.            would cause trouble if the function is split in the middle, and the 
  5029.            two halves are placed at locations far apart in memory.  This option 
  5030.            is used when compiling 'crtstuff.c'; you should not need to use it 
  5031.            for anything else. 
  5032.  
  5033.  -fverbose-asm 
  5034.            Put extra commentary information in the generated assembly code to 
  5035.            make it more readable.  This option is generally only of use to 
  5036.            those who actually need to read the generated assembly code (perhaps 
  5037.            while debugging the compiler itself). 
  5038.  
  5039.            '-fno-verbose-asm', the default, causes the extra information to be 
  5040.            omitted and is useful when comparing two assembler files. 
  5041.  
  5042.  -fvolatile 
  5043.            Consider all memory references through pointers to be volatile. 
  5044.  
  5045.  -fvolatile-global 
  5046.            Consider all memory references to extern and global data items to be 
  5047.            volatile. 
  5048.  
  5049.  -fpic 
  5050.            Generate position-independent code (PIC) suitable for use in a 
  5051.            shared library, if supported for the target machine.  Such code 
  5052.            accesses all constant addresses through a global offset table (GOT). 
  5053.            The dynamic loader resolves the GOT entries when the program starts 
  5054.            (the dynamic loader is not part of GNU CC; it is part of the 
  5055.            operating system).  If the GOT size for the linked executable 
  5056.            exceeds a machine-specific maximum size, you get an error message 
  5057.            from the linker indicating that '-fpic' does not work; in that case, 
  5058.            recompile with '-fPIC' instead.  (These maximums are 16k on the 
  5059.            m88k, 8k on the Sparc, and 32k on the m68k and RS/6000.  The 386 has 
  5060.            no such limit.) 
  5061.  
  5062.            Position-independent code requires special support, and therefore 
  5063.            works only on certain machines.  For the 386, GNU CC supports PIC 
  5064.            for System V but not for the Sun 386i.  Code generated for the IBM 
  5065.            RS/6000 is always position-independent. 
  5066.  
  5067.  -fPIC 
  5068.            If supported for the target machine, emit position-independent code, 
  5069.            suitable for dynamic linking and avoiding any limit on the size of 
  5070.            the global offset table.  This option makes a difference on the 
  5071.            m68k, m88k, and the Sparc. 
  5072.  
  5073.            Position-independent code requires special support, and therefore 
  5074.            works only on certain machines. 
  5075.  
  5076.  -ffixed-reg 
  5077.            Treat the register named reg as a fixed register; generated code 
  5078.            should never refer to it ( except perhaps as a stack pointer, frame 
  5079.            pointer or in some other fixed role). 
  5080.  
  5081.            reg must be the name of a register.  The register names accepted are 
  5082.            machine-specific and are defined in the REGISTER_NAMES macro in the 
  5083.            machine description macro file. 
  5084.  
  5085.            This flag does not have a negative form, because it specifies a 
  5086.            three-way choice. 
  5087.  
  5088.  -fcall-used-reg 
  5089.            Treat the register named reg as an allocable register that is 
  5090.            clobbered by function calls.  It may be allocated for temporaries or 
  5091.            variables that do not live across a call.  Functions compiled this 
  5092.            way will not save and restore the register reg. 
  5093.  
  5094.            Use of this flag for a register that has a fixed pervasive role in 
  5095.            the machine's execution model, such as the stack pointer or frame 
  5096.            pointer, will produce disastrous results. 
  5097.  
  5098.            This flag does not have a negative form, because it specifies a 
  5099.            three-way choice. 
  5100.  
  5101.  -fcall-saved-reg 
  5102.            Treat the register named reg as an allocable register saved by 
  5103.            functions.  It may be allocated even for temporaries or variables 
  5104.            that live across a call.  Functions compiled this way will save and 
  5105.            restore the register reg if they use it. 
  5106.  
  5107.            Use of this flag for a register that has a fixed pervasive role in 
  5108.            the machine's execution model, such as the stack pointer or frame 
  5109.            pointer, will produce disastrous results. 
  5110.  
  5111.            A different sort of disaster will result from the use of this flag 
  5112.            for a register in which function values may be returned. 
  5113.  
  5114.            This flag does not have a negative form, because it specifies a 
  5115.            three-way choice. 
  5116.  
  5117.  -fpack-struct 
  5118.            Pack all structure members together without holes.  Usually you 
  5119.            would not want to use this option, since it makes the code 
  5120.            suboptimal, and the offsets of structure members won't agree with 
  5121.            system libraries. 
  5122.  
  5123.  -fcheck-memory-usage 
  5124.            Generate extra code to check each memory access.  GNU CC will 
  5125.            generate code that is suitable for a detector of bad memory accesses 
  5126.            such as 'Checker'.  If you specify this option, you can not use the 
  5127.            asm or __asm__ keywords. 
  5128.  
  5129.            You must also specify this option when you compile functions you 
  5130.            call that have side effects.  If you do not, you may get erroneous 
  5131.            messages from the detector.  Normally,  you should compile all your 
  5132.            code with this option. If you use functions from a library that have 
  5133.            side-effects (such as read), you may not be able to recompile the 
  5134.            library and specify this option.  In that case, you can enable the 
  5135.            '-fprefix-function-name' option, which requests GNU CC to 
  5136.            encapsulate your code and make other functions look as if they were 
  5137.            compiled with '-fcheck-memory-usage'.  This is done by calling 
  5138.            ``stubs'', which are provided by the detector.  If you cannot find 
  5139.            or build stubs for every function you call, you may have to specify 
  5140.            '-fcheck-memory-usage' without '-fprefix-function-name'. 
  5141.  
  5142.  -fprefix-function-name 
  5143.            Request GNU CC to add a prefix to the symbols generated for function 
  5144.            names. GNU CC adds a prefix to the names of functions defined as 
  5145.            well as functions called.  Code compiled with this option and code 
  5146.            compiled without the option can't be linked together, unless or 
  5147.            stubs are used. 
  5148.  
  5149.            If you compile the following code with '-fprefix-function-name' 
  5150.  
  5151.                       extern void bar (int);
  5152.                       void
  5153.                       foo (int a)
  5154.                       {
  5155.                        return bar (a + 5);
  5156.                       }
  5157.  
  5158.  GNU CC will compile the code as if it was written: 
  5159.  
  5160.                       extern void prefix_bar (int);
  5161.                       void
  5162.                       prefix_foo (int a)
  5163.                       {
  5164.                        return prefix_bar (a + 5);
  5165.                       }
  5166.  This option is designed to be used with '-fcheck-memory-usage'. 
  5167.  
  5168.  -fstack-check 
  5169.            Generate code to verify that you do not go beyond the boundary of 
  5170.            the stack.  You should specify this flag if you are running in an 
  5171.            environment with multiple threads, but only rarely need to specify 
  5172.            it in a single-threaded environment since stack overflow is 
  5173.            automatically detected on nearly all systems if there is only one 
  5174.            stack. 
  5175.  
  5176.  +e0 
  5177.  
  5178.  +e1 
  5179.            Control whether virtual function definitions in classes are used to 
  5180.            generate code, or only to define interfaces for their callers.  (C++ 
  5181.            only). 
  5182.  
  5183.            These options are provided for compatibility with cfront 1.x usage; 
  5184.            the recommended alternative GNU C++ usage is in flux.  See 
  5185.            Declarations and Definitions in One Header. 
  5186.  
  5187.            With '+e0', virtual function definitions in classes are declared 
  5188.            extern; the declaration is used only as an interface specification, 
  5189.            not to generate code for the virtual functions (in this 
  5190.            compilation). 
  5191.  
  5192.            With '+e1', G++ actually generates the code implementing virtual 
  5193.            functions defined in the code, and makes them publicly visible. 
  5194.  
  5195.  
  5196. ΓòÉΓòÉΓòÉ 4.16. Environment Variables Affecting GNU CC ΓòÉΓòÉΓòÉ
  5197.  
  5198.  This section describes several environment variables that affect how GNU CC 
  5199.  operates.  They work by specifying directories or prefixes to use when 
  5200.  searching for various kinds of files. 
  5201.  
  5202.  Note that you can also specify places to search using options such as '-B', 
  5203.  '-I' and '-L' (see Directory Options).  These take precedence over places 
  5204.  specified using environment variables, which in turn take precedence over 
  5205.  those specified by the configuration of GNU CC. 
  5206.  
  5207.  TMPDIR 
  5208.            If TMPDIR is set, it specifies the directory to use for temporary 
  5209.            files.  GNU CC uses temporary files to hold the output of one stage 
  5210.            of compilation which is to be used as input to the next stage: for 
  5211.            example, the output of the preprocessor, which is the input to the 
  5212.            compiler proper. 
  5213.  
  5214.  GCC_EXEC_PREFIX 
  5215.            If GCC_EXEC_PREFIX is set, it specifies a prefix to use in the names 
  5216.            of the subprograms executed by the compiler.  No slash is added when 
  5217.            this prefix is combined with the name of a subprogram, but you can 
  5218.            specify a prefix that ends with a slash if you wish. 
  5219.  
  5220.            If GNU CC cannot find the subprogram using the specified prefix, it 
  5221.            tries looking in the usual places for the subprogram. 
  5222.  
  5223.            The default value of GCC_EXEC_PREFIX is 'prefix/lib/gcc-lib/' where 
  5224.            prefix is the value of prefix when you ran the 'configure' script. 
  5225.  
  5226.            Other prefixes specified with '-B' take precedence over this prefix. 
  5227.  
  5228.            This prefix is also used for finding files such as 'crt0.o' that are 
  5229.            used for linking. 
  5230.  
  5231.            In addition, the prefix is used in an unusual way in finding the 
  5232.            directories to search for header files.  For each of the standard 
  5233.            directories whose name normally begins with '/usr/local/lib/gcc-lib' 
  5234.            (more precisely, with the value of GCC_INCLUDE_DIR), GNU CC tries 
  5235.            replacing that beginning with the specified prefix to produce an 
  5236.            alternate directory name.  Thus, with '-Bfoo/', GNU CC will search 
  5237.            'foo/bar' where it would normally search '/usr/local/lib/bar'. These 
  5238.            alternate directories are searched first; the standard directories 
  5239.            come next. 
  5240.  
  5241.  COMPILER_PATH 
  5242.            The value of COMPILER_PATH is a colon-separated list of directories, 
  5243.            much like PATH.  GNU CC tries the directories thus specified when 
  5244.            searching for subprograms, if it can't find the subprograms using 
  5245.            GCC_EXEC_PREFIX. 
  5246.  
  5247.  LIBRARY_PATH 
  5248.            The value of LIBRARY_PATH is a colon-separated list of directories, 
  5249.            much like PATH.  When configured as a native compiler, GNU CC tries 
  5250.            the directories thus specified when searching for special linker 
  5251.            files, if it can't find them using GCC_EXEC_PREFIX.  Linking using 
  5252.            GNU CC also uses these directories when searching for ordinary 
  5253.            libraries for the '-l' option (but directories specified with '-L' 
  5254.            come first). 
  5255.  
  5256.  C_INCLUDE_PATH 
  5257.  
  5258.  CPLUS_INCLUDE_PATH 
  5259.  
  5260.  OBJC_INCLUDE_PATH 
  5261.            These environment variables pertain to particular languages.  Each 
  5262.            variable's value is a colon-separated list of directories, much like 
  5263.            PATH.  When GNU CC searches for header files, it tries the 
  5264.            directories listed in the variable for the language you are using, 
  5265.            after the directories specified with '-I' but before the standard 
  5266.            header file directories. 
  5267.  
  5268.  DEPENDENCIES_OUTPUT 
  5269.            If this variable is set, its value specifies how to output 
  5270.            dependencies for Make based on the header files processed by the 
  5271.            compiler.  This output looks much like the output from the '-M' 
  5272.            option (see Preprocessor Options), but it goes to a separate file, 
  5273.            and is in addition to the usual results of compilation. 
  5274.  
  5275.            The value of DEPENDENCIES_OUTPUT can be just a file name, in which 
  5276.            case the Make rules are written to that file, guessing the target 
  5277.            name from the source file name.  Or the value can have the form 
  5278.            'file target', in which case the rules are written to file file 
  5279.            using target as the target name. 
  5280.  
  5281.  
  5282. ΓòÉΓòÉΓòÉ 4.17. Running Protoize ΓòÉΓòÉΓòÉ
  5283.  
  5284.  The program protoize is an optional part of GNU C.  You can use it to add 
  5285.  prototypes to a program, thus converting the program to ANSI C in one respect. 
  5286.  The companion program unprotoize does the reverse: it removes argument types 
  5287.  from any prototypes that are found. 
  5288.  
  5289.  When you run these programs, you must specify a set of source files as command 
  5290.  line arguments.  The conversion programs start out by compiling these files to 
  5291.  see what functions they define.  The information gathered about a file foo is 
  5292.  saved in a file named 'foo.X'. 
  5293.  
  5294.  After scanning comes actual conversion.  The specified files are all eligible 
  5295.  to be converted; any files they include (whether sources or just headers) are 
  5296.  eligible as well. 
  5297.  
  5298.  But not all the eligible files are converted.  By default, protoize and 
  5299.  unprotoize convert only source and header files in the current directory.  You 
  5300.  can specify additional directories whose files should be converted with the 
  5301.  '-d directory' option.  You can also specify particular files to exclude with 
  5302.  the '-x file' option.  A file is converted if it is eligible, its directory 
  5303.  name matches one of the specified directory names, and its name within the 
  5304.  directory has not been excluded. 
  5305.  
  5306.  Basic conversion with protoize consists of rewriting most function definitions 
  5307.  and function declarations to specify the types of the arguments.  The only 
  5308.  ones not rewritten are those for varargs functions. 
  5309.  
  5310.  protoize optionally inserts prototype declarations at the beginning of the 
  5311.  source file, to make them available for any calls that precede the function's 
  5312.  definition.  Or it can insert prototype declarations with block scope in the 
  5313.  blocks where undeclared functions are called. 
  5314.  
  5315.  Basic conversion with unprotoize consists of rewriting most function 
  5316.  declarations to remove any argument types, and rewriting function definitions 
  5317.  to the old-style pre-ANSI form. 
  5318.  
  5319.  Both conversion programs print a warning for any function declaration or 
  5320.  definition that they can't convert.  You can suppress these warnings with 
  5321.  '-q'. 
  5322.  
  5323.  The output from protoize or unprotoize replaces the original source file.  The 
  5324.  original file is renamed to a name ending with '.save'.  If the '.save' file 
  5325.  already exists, then the source file is simply discarded. 
  5326.  
  5327.  protoize and unprotoize both depend on GNU CC itself to scan the program and 
  5328.  collect information about the functions it uses. So neither of these programs 
  5329.  will work until GNU CC is installed. 
  5330.  
  5331.  Here is a table of the options you can use with protoize and unprotoize.  Each 
  5332.  option works with both programs unless otherwise stated. 
  5333.  
  5334.  -B directory 
  5335.            Look for the file 'SYSCALLS.c.X' in directory, instead of the usual 
  5336.            directory (normally '/usr/local/lib').  This file contains prototype 
  5337.            information about standard system functions.  This option applies 
  5338.            only to protoize. 
  5339.  
  5340.  -c compilation-options 
  5341.            Use  compilation-options as the options when running gcc to produce 
  5342.            the '.X' files.  The special option '-aux-info' is always passed in 
  5343.            addition, to tell gcc to write a '.X' file. 
  5344.  
  5345.            Note that the compilation options must be given as a single argument 
  5346.            to protoize or unprotoize.  If you want to specify several gcc 
  5347.            options, you must quote the entire set of compilation options to 
  5348.            make them a single word in the shell. 
  5349.  
  5350.            There are certain gcc arguments that you cannot use, because they 
  5351.            would produce the wrong kind of output.  These include '-g', '-O', 
  5352.            '-c', '-S', and '-o' If you include these in the 
  5353.            compilation-options, they are ignored. 
  5354.  
  5355.  -C 
  5356.            Rename files to end in '.C' instead of '.c'. This is convenient if 
  5357.            you are converting a C program to C++. This option applies only to 
  5358.            protoize. 
  5359.  
  5360.  -g 
  5361.            Add explicit global declarations.  This means inserting explicit 
  5362.            declarations at the beginning of each source file for each function 
  5363.            that is called in the file and was not declared.  These declarations 
  5364.            precede the first function definition that contains a call to an 
  5365.            undeclared function.  This option applies only to protoize. 
  5366.  
  5367.  -i string 
  5368.            Indent old-style parameter declarations with the string string. This 
  5369.            option applies only to protoize. 
  5370.  
  5371.            unprotoize converts prototyped function definitions to old-style 
  5372.            function definitions, where the arguments are declared between the 
  5373.            argument list and the initial '{'.  By default, unprotoize uses five 
  5374.            spaces as the indentation.  If you want to indent with just one 
  5375.            space instead, use '-i " "'. 
  5376.  
  5377.  -k 
  5378.            Keep the '.X' files.  Normally, they are deleted after conversion is 
  5379.            finished. 
  5380.  
  5381.  -l 
  5382.            Add explicit local declarations.  protoize with '-l' inserts a 
  5383.            prototype declaration for each function in each block which calls 
  5384.            the function without any declaration.  This option applies only to 
  5385.            protoize. 
  5386.  
  5387.  -n 
  5388.            Make no real changes.  This mode just prints information about the 
  5389.            conversions that would have been done without '-n'. 
  5390.  
  5391.  -N 
  5392.            Make no '.save' files.  The original files are simply deleted. Use 
  5393.            this option with caution. 
  5394.  
  5395.  -p program 
  5396.            Use the program program as the compiler.  Normally, the name 'gcc' 
  5397.            is used. 
  5398.  
  5399.  -q 
  5400.            Work quietly.  Most warnings are suppressed. 
  5401.  
  5402.  -v 
  5403.            Print the version number, just like '-v' for gcc. 
  5404.  
  5405.  If you need special compiler options to compile one of your program's source 
  5406.  files, then you should generate that file's '.X' file specially, by running 
  5407.  gcc on that source file with the appropriate options and the option 
  5408.  '-aux-info'.  Then run protoize on the entire set of files.  protoize will use 
  5409.  the existing '.X' file because it is newer than the source file. For example: 
  5410.  
  5411.                       gcc -Dfoo=bar file1.c -aux-info
  5412.                       protoize *.c
  5413.  
  5414.  You need to include the special files along with the rest in the protoize 
  5415.  command, even though their '.X' files already exist, because otherwise they 
  5416.  won't get converted. 
  5417.  
  5418.  See Protoize Caveats, for more information on how to use protoize 
  5419.  successfully. 
  5420.  
  5421.  
  5422. ΓòÉΓòÉΓòÉ 5. Installing GNU CC ΓòÉΓòÉΓòÉ
  5423.  
  5424.  Configurations                Configurations Supported by GNU CC. 
  5425.  Other Dir                     Compiling in a separate directory (not where the 
  5426.                                source is). 
  5427.  Cross-Compiler                Building and installing a cross-compiler. 
  5428.  Sun Install                   See below for installation on the Sun. 
  5429.  VMS Install                   See below for installation on VMS. 
  5430.  Collect2                      How collect2 works; how it finds ld. 
  5431.  Header Dirs                   Understanding the standard header file 
  5432.                                directories. 
  5433.  Here is the procedure for installing GNU CC on a Unix system.  See VMS 
  5434.  Install, for VMS systems.  In this section we assume you compile in the same 
  5435.  directory that contains the source files; see Other Dir, to find out how to 
  5436.  compile in a separate directory on Unix systems. 
  5437.  
  5438.  You cannot install GNU C by itself on MSDOS; it will not compile under any 
  5439.  MSDOS compiler except itself.  You need to get the complete compilation 
  5440.  package DJGPP, which includes binaries as well as sources, and includes all 
  5441.  the necessary compilation tools and libraries. 
  5442.  
  5443.    1. If you have built GNU CC previously in the same directory for a different 
  5444.       target machine, do 'make distclean' to delete all files that might be 
  5445.       invalid.  One of the files this deletes is 'Makefile'; if 'make 
  5446.       distclean' complains that 'Makefile' does not exist, it probably means 
  5447.       that the directory is already suitably clean. 
  5448.  
  5449.    2. On a System V release 4 system, make sure '/usr/bin' precedes '/usr/ucb' 
  5450.       in PATH.  The cc command in '/usr/ucb' uses libraries which have bugs. 
  5451.  
  5452.    3. Specify the host, build and target machine configurations.  You do this 
  5453.       by running the file 'configure'. 
  5454.  
  5455.       The build machine is the system which you are using, the host machine is 
  5456.       the system where you want to run the resulting compiler (normally the 
  5457.       build machine), and the target machine is the system for which you want 
  5458.       the compiler to generate code. 
  5459.  
  5460.       If you are building a compiler to produce code for the machine it runs on 
  5461.       (a native compiler), you normally do not need to specify any operands to 
  5462.       'configure'; it will try to guess the type of machine you are on and use 
  5463.       that as the build, host and target machines.  So you don't need to 
  5464.       specify a configuration when building a native compiler unless 
  5465.       'configure' cannot figure out what your configuration is or guesses 
  5466.       wrong. 
  5467.  
  5468.       In those cases, specify the build machine's configuration name with the 
  5469.       '--host' option; the host and target will default to be the same as the 
  5470.       host machine.  (If you are building a cross-compiler, see 
  5471.       Cross-Compiler.) 
  5472.  
  5473.       Here is an example: 
  5474.  
  5475.                       ┬╖/configure --build=sparc-sun-sunos4.1
  5476.  
  5477.  A configuration name may be canonical or it may be more or less abbreviated. 
  5478.  
  5479.  A canonical configuration name has three parts, separated by dashes. It looks 
  5480.  like this: 'cpu-company-system'. (The three parts may themselves contain 
  5481.  dashes; 'configure' can figure out which dashes serve which purpose.)  For 
  5482.  example, 'm68k-sun-sunos4.1' specifies a Sun 3. 
  5483.  
  5484.  You can also replace parts of the configuration by nicknames or aliases. For 
  5485.  example, 'sun3' stands for 'm68k-sun', so 'sun3-sunos4.1' is another way to 
  5486.  specify a Sun 3.  You can also use simply 'sun3-sunos', since the version of 
  5487.  SunOS is assumed by default to be version 4. 
  5488.  
  5489.  You can specify a version number after any of the system types, and some of 
  5490.  the CPU types.  In most cases, the version is irrelevant, and will be ignored. 
  5491.  So you might as well specify the version if you know it. 
  5492.  
  5493.  See Configurations, for a list of supported configuration names and notes on 
  5494.  many of the configurations.  You should check the notes in that section before 
  5495.  proceeding any further with the installation of GNU CC. 
  5496.  
  5497.  There are four additional options you can specify independently to describe 
  5498.  variant hardware and software configurations.  These are '--with-gnu-as', 
  5499.  '--with-gnu-ld', '--with-stabs' and '--nfp'. 
  5500.  
  5501.       '--with-gnu-as' 
  5502.                      If you will use GNU CC with the GNU assembler (GAS), you 
  5503.                      should declare this by using the '--with-gnu-as' option 
  5504.                      when you run 'configure'. 
  5505.  
  5506.                      Using this option does not install GAS.  It only modifies 
  5507.                      the output of GNU CC to work with GAS.  Building and 
  5508.                      installing GAS is up to you. 
  5509.  
  5510.                      Conversely, if you do not wish to use GAS and do not 
  5511.                      specify '--with-gnu-as' when building GNU CC, it is up to 
  5512.                      you to make sure that GAS is not installed.  GNU CC 
  5513.                      searches for a program named as in various directories; if 
  5514.                      the program it finds is GAS, then it runs GAS.  If you are 
  5515.                      not sure where GNU CC finds the assembler it is using, try 
  5516.                      specifying '-v' when you run it. 
  5517.  
  5518.                      The systems where it makes a difference whether you use 
  5519.                      GAS are 
  5520.                      'hppa1.0-any-any', 'hppa1.1-any-any', 'i386-any-sysv', 
  5521.                      'i386-any-isc', 
  5522.                      'i860-any-bsd', 'm68k-bull-sysv', 
  5523.                      'm68k-hp-hpux', 'm68k-sony-bsd', 
  5524.                      'm68k-altos-sysv', 'm68000-hp-hpux', 
  5525.                      'm68000-att-sysv', 'any-lynx-lynxos', and 'mips-any'). On 
  5526.                      any other system, '--with-gnu-as' has no effect. 
  5527.  
  5528.                      On the systems listed above (except for the HP-PA, for ISC 
  5529.                      on the 386, and for 'mips-sgi-irix5.*'), if you use GAS, 
  5530.                      you should also use the GNU linker (and specify 
  5531.                      '--with-gnu-ld'). 
  5532.  
  5533.       '--with-gnu-ld' 
  5534.                      Specify the option '--with-gnu-ld' if you plan to use the 
  5535.                      GNU linker with GNU CC. 
  5536.  
  5537.                      This option does not cause the GNU linker to be installed; 
  5538.                      it just modifies the behavior of GNU CC to work with the 
  5539.                      GNU linker. Specifically, it inhibits the installation of 
  5540.                      collect2, a program which otherwise serves as a front-end 
  5541.                      for the system's linker on most configurations. 
  5542.  
  5543.       '--with-stabs' 
  5544.                      On MIPS based systems and on Alphas, you must specify 
  5545.                      whether you want GNU CC to create the normal ECOFF 
  5546.                      debugging format, or to use BSD-style stabs passed through 
  5547.                      the ECOFF symbol table.  The normal ECOFF debug format 
  5548.                      cannot fully handle languages other than C.  BSD stabs 
  5549.                      format can handle other languages, but it only works with 
  5550.                      the GNU debugger GDB. 
  5551.  
  5552.                      Normally, GNU CC uses the ECOFF debugging format by 
  5553.                      default; if you prefer BSD stabs, specify '--with-stabs' 
  5554.                      when you configure GNU CC. 
  5555.  
  5556.                      No matter which default you choose when you configure GNU 
  5557.                      CC, the user can use the '-gcoff' and '-gstabs+' options 
  5558.                      to specify explicitly the debug format for a particular 
  5559.                      compilation. 
  5560.  
  5561.                      '--with-stabs' is meaningful on the ISC system on the 386, 
  5562.                      also, if '--with-gas' is used.  It selects use of stabs 
  5563.                      debugging information embedded in COFF output.  This kind 
  5564.                      of debugging information supports C++ well; ordinary COFF 
  5565.                      debugging information does not. 
  5566.  
  5567.                      '--with-stabs' is also meaningful on 386 systems running 
  5568.                      SVR4.  It selects use of stabs debugging information 
  5569.                      embedded in ELF output.  The C++ compiler currently 
  5570.                      (2.6.0) does not support the DWARF debugging information 
  5571.                      normally used on 386 SVR4 platforms; stabs provide a 
  5572.                      workable alternative.  This requires gas and gdb, as the 
  5573.                      normal SVR4 tools can not generate or interpret stabs. 
  5574.  
  5575.       '--nfp' 
  5576.                      On certain systems, you must specify whether the machine 
  5577.                      has a floating point unit.  These systems include 
  5578.                      'm68k-sun-sunosn' and 'm68k-isi-bsd'.  On any other 
  5579.                      system, '--nfp' currently has no effect, though perhaps 
  5580.                      there are other systems where it could usefully make a 
  5581.                      difference. 
  5582.  
  5583.       '--enable-threads=type' 
  5584.                      Certain systems, notably Linux-based GNU systems, can't be 
  5585.                      relied on to supply a threads facility for the Objective C 
  5586.                      runtime and so will default to single-threaded runtime. 
  5587.                      They may, however, have a library threads implementation 
  5588.                      available, in which case threads can be enabled with this 
  5589.                      option by supplying a suitable type, probably 'posix'. 
  5590.                      The possibilities for type are 'single', 'posix', 'win32', 
  5591.                      'solaris', 'irix' and 'mach'. 
  5592.  
  5593.     The 'configure' script searches subdirectories of the source directory for 
  5594.     other compilers that are to be integrated into GNU CC. The GNU compiler for 
  5595.     C++, called G++ is in a subdirectory named 'cp'.  'configure' inserts rules 
  5596.     into 'Makefile' to build all of those compilers. 
  5597.  
  5598.     Here we spell out what files will be set up by configure.  Normally you 
  5599.     need not be concerned with these files. 
  5600.  
  5601.           A file named 'config.h' is created that contains a '#include' of the 
  5602.            top-level config file for the machine you will run the compiler on 
  5603.            (see Section The Configuration File of Using and Porting GCC).  This 
  5604.            file is responsible for defining information about the host machine. 
  5605.            It includes 'tm.h'. The top-level config file is located in the 
  5606.            subdirectory 'config'. Its name is always 'xm-something.h'; usually 
  5607.            'xm-machine.h', but there are some exceptions. 
  5608.  
  5609.            If your system does not support symbolic links, you might want to 
  5610.            set up 'config.h' to contain a '#include' command which refers to 
  5611.            the appropriate file. 
  5612.  
  5613.           A file named 'tconfig.h' is created which includes the top-level 
  5614.            config file for your target machine.  This is used for compiling 
  5615.            certain programs to run on that machine. 
  5616.  
  5617.           A file named 'tm.h' is created which includes the 
  5618.            machine-description macro file for your target machine.  It should 
  5619.            be in the subdirectory 'config' and its name is often 'machine.h'. 
  5620.  
  5621.           The command file 'configure' also constructs the file 'Makefile' by 
  5622.            adding some text to the template file 'Makefile.in'.  The additional 
  5623.            text comes from files in the 'config' directory, named 't-target' 
  5624.            and 'x-host'.  If these files do not exist, it means nothing needs 
  5625.            to be added for a given target or host. 
  5626.  
  5627.    4. The standard directory for installing GNU CC is '/usr/local/lib'. If you 
  5628.       want to install its files somewhere else, specify '--prefix=dir' when you 
  5629.       run 'configure'.  Here dir is a directory name to use instead of 
  5630.       '/usr/local' for all purposes with one exception: the directory 
  5631.       '/usr/local/include' is searched for header files no matter where you 
  5632.       install the compiler.  To override this name, use the --local-prefix 
  5633.       option below. 
  5634.  
  5635.    5. Specify '--local-prefix=dir' if you want the compiler to search directory 
  5636.       'dir/include' for locally installed header files instead of 
  5637.       '/usr/local/include'. 
  5638.  
  5639.       You should specify '--local-prefix' only if your site has a different 
  5640.       convention (not '/usr/local') for where to put site-specific files. 
  5641.  
  5642.       The default value for '--local-prefix' is '/usr/local' regardless of the 
  5643.       value of '--prefix'.  Specifying '--prefix' has no effect on which 
  5644.       directory GNU CC searches for local header files. This may seem 
  5645.       counterintuitive, but actually it is logical. 
  5646.  
  5647.       The purpose of '--prefix' is to specify where to install GNU CC.  The 
  5648.       local header files in '/usr/local/include'---if you put any in that 
  5649.       directory---are not part of GNU CC.  They are part of other 
  5650.       programs---perhaps many others.  (GNU CC installs its own header files in 
  5651.       another directory which is based on the '--prefix' value.) 
  5652.  
  5653.       Do not specify '/usr' as the '--local-prefix'!  The directory you use for 
  5654.       '--local-prefix' must not contain any of the system's standard header 
  5655.       files.  If it did contain them, certain programs would be miscompiled 
  5656.       (including GNU Emacs, on certain targets), because this would override 
  5657.       and nullify the header file corrections made by the fixincludes script. 
  5658.  
  5659.       Indications are that people who use this option use it based on mistaken 
  5660.       ideas of what it is for.  People use it as if it specified where to 
  5661.       install part of GNU CC.  Perhaps they make this assumption because 
  5662.       installing GNU CC creates the directory. 
  5663.  
  5664.    6. Make sure the Bison parser generator is installed.  (This is unnecessary 
  5665.       if the Bison output files 'c-parse.c' and 'cexp.c' are more recent than 
  5666.       'c-parse.y' and 'cexp.y' and you do not plan to change the '.y' files.) 
  5667.  
  5668.       Bison versions older than Sept 8, 1988 will produce incorrect output for 
  5669.       'c-parse.c'. 
  5670.  
  5671.    7. If you have chosen a configuration for GNU CC which requires other GNU 
  5672.       tools (such as GAS or the GNU linker) instead of the standard system 
  5673.       tools, install the required tools in the build directory under the names 
  5674.       'as', 'ld' or whatever is appropriate.  This will enable the compiler to 
  5675.       find the proper tools for compilation of the program 'enquire'. 
  5676.  
  5677.       Alternatively, you can do subsequent compilation using a value of the 
  5678.       PATH environment variable such that the necessary GNU tools come before 
  5679.       the standard system tools. 
  5680.  
  5681.    8. Build the compiler.  Just type 'make LANGUAGES=c' in the compiler 
  5682.       directory. 
  5683.  
  5684.       'LANGUAGES=c' specifies that only the C compiler should be compiled.  The 
  5685.       makefile normally builds compilers for all the supported languages; 
  5686.       currently, C, C++ and Objective C.  However, C is the only language that 
  5687.       is sure to work when you build with other non-GNU C compilers.  In 
  5688.       addition, building anything but C at this stage is a waste of time. 
  5689.  
  5690.       In general, you can specify the languages to build by typing the argument 
  5691.       'LANGUAGES="list"', where list is one or more words from the list 'c', 
  5692.       'c++', and 'objective-c'.  If you have any additional GNU compilers as 
  5693.       subdirectories of the GNU CC source directory, you may also specify their 
  5694.       names in this list. 
  5695.  
  5696.       Ignore any warnings you may see about ``statement not reached'' in 
  5697.       'insn-emit.c'; they are normal.  Also, warnings about ``unknown escape 
  5698.       sequence'' are normal in 'genopinit.c' and perhaps some other files. 
  5699.       Likewise, you should ignore warnings about ``constant is so large that it 
  5700.       is unsigned'' in 'insn-emit.c' and 'insn-recog.c' and a warning about a 
  5701.       comparison always being zero in 'enquire.o'.  Any other compilation 
  5702.       errors may represent bugs in the port to your machine or operating 
  5703.       system, and should be investigated and reported (see Bugs). 
  5704.  
  5705.       Some commercial compilers fail to compile GNU CC because they have bugs 
  5706.       or limitations.  For example, the Microsoft compiler is said to run out 
  5707.       of macro space.  Some Ultrix compilers run out of expression space; then 
  5708.       you need to break up the statement where the problem happens. 
  5709.  
  5710.    9. If you are building a cross-compiler, stop here.  See Cross-Compiler. 
  5711.  
  5712.   10. Move the first-stage object files and executables into a subdirectory 
  5713.       with this command: 
  5714.  
  5715.                             make stage1
  5716.  
  5717.     The files are moved into a subdirectory named 'stage1'. Once installation 
  5718.     is complete, you may wish to delete these files with rm -r stage1. 
  5719.  
  5720.   11. If you have chosen a configuration for GNU CC which requires other GNU 
  5721.       tools (such as GAS or the GNU linker) instead of the standard system 
  5722.       tools, install the required tools in the 'stage1' subdirectory under the 
  5723.       names 'as', 'ld' or whatever is appropriate.  This will enable the stage 
  5724.       1 compiler to find the proper tools in the following stage. 
  5725.  
  5726.       Alternatively, you can do subsequent compilation using a value of the 
  5727.       PATH environment variable such that the necessary GNU tools come before 
  5728.       the standard system tools. 
  5729.  
  5730.   12. Recompile the compiler with itself, with this command: 
  5731.  
  5732.                             make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2"
  5733.  
  5734.     This is called making the stage 2 compiler. 
  5735.  
  5736.     The command shown above builds compilers for all the supported languages. 
  5737.     If you don't want them all, you can specify the languages to build by 
  5738.     typing the argument 'LANGUAGES="list"'.  list should contain one or more 
  5739.     words from the list 'c', 'c++', 'objective-c', and 'proto'.  Separate the 
  5740.     words with spaces. 'proto' stands for the programs protoize and unprotoize; 
  5741.     they are not a separate language, but you use LANGUAGES to enable or 
  5742.     disable their installation. 
  5743.  
  5744.     If you are going to build the stage 3 compiler, then you might want to 
  5745.     build only the C language in stage 2. 
  5746.  
  5747.     Once you have built the stage 2 compiler, if you are short of disk space, 
  5748.     you can delete the subdirectory 'stage1'. 
  5749.  
  5750.     On a 68000 or 68020 system lacking floating point hardware, unless you have 
  5751.     selected a 'tm.h' file that expects by default that there is no such 
  5752.     hardware, do this instead: 
  5753.  
  5754.                             make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2 -msoft-float"
  5755.  
  5756.   13. If you wish to test the compiler by compiling it with itself one more 
  5757.       time, install any other necessary GNU tools (such as GAS or the GNU 
  5758.       linker) in the 'stage2' subdirectory as you did in the 'stage1' 
  5759.       subdirectory, then do this: 
  5760.  
  5761.                             make stage2
  5762.                             make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2"
  5763.  
  5764.     This is called making the stage 3 compiler.  Aside from the '-B' option, 
  5765.     the compiler options should be the same as when you made the stage 2 
  5766.     compiler.  But the LANGUAGES option need not be the same.  The command 
  5767.     shown above builds compilers for all the supported languages; if you don't 
  5768.     want them all, you can specify the languages to build by typing the 
  5769.     argument 'LANGUAGES="list"', as described above. 
  5770.  
  5771.     If you do not have to install any additional GNU tools, you may use the 
  5772.     command 
  5773.  
  5774.                             make bootstrap LANGUAGES=language-list BOOT_CFLAGS=option-list
  5775.  
  5776.     instead of making 'stage1', 'stage2', and performing the two compiler 
  5777.     builds. 
  5778.  
  5779.   14. Then compare the latest object files with the stage 2 object files---they 
  5780.       ought to be identical, aside from time stamps (if any). 
  5781.  
  5782.       On some systems, meaningful comparison of object files is impossible; 
  5783.       they always appear ``different.''  This is currently true on Solaris and 
  5784.       some systems that use ELF object file format.  On some versions of Irix 
  5785.       on SGI machines and DEC Unix (OSF/1) on Alpha systems, you will not be 
  5786.       able to compare the files without specifying '-save-temps'; see the 
  5787.       description of individual systems above to see if you get comparison 
  5788.       failures.  You may have similar problems on other systems. 
  5789.  
  5790.       Use this command to compare the files: 
  5791.  
  5792.                             make compare
  5793.  
  5794.     This will mention any object files that differ between stage 2 and stage 3. 
  5795.     Any difference, no matter how innocuous, indicates that the stage 2 
  5796.     compiler has compiled GNU CC incorrectly, and is therefore a potentially 
  5797.     serious bug which you should investigate and report (see Bugs). 
  5798.  
  5799.     If your system does not put time stamps in the object files, then this is a 
  5800.     faster way to compare them (using the Bourne shell): 
  5801.  
  5802.                             for file in *.o; do
  5803.                             cmp $file stage2/$file
  5804.                             done
  5805.  
  5806.     If you have built the compiler with the '-mno-mips-tfile' option on MIPS 
  5807.     machines, you will not be able to compare the files. 
  5808.  
  5809.   15. Install the compiler driver, the compiler's passes and run-time support 
  5810.       with 'make install'.  Use the same value for CC, CFLAGS and LANGUAGES 
  5811.       that you used when compiling the files that are being installed.  One 
  5812.       reason this is necessary is that some versions of Make have bugs and 
  5813.       recompile files gratuitously when you do this step.  If you use the same 
  5814.       variable values, those files will be recompiled properly. 
  5815.  
  5816.       For example, if you have built the stage 2 compiler, you can use the 
  5817.       following command: 
  5818.  
  5819.                             make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="list"
  5820.  
  5821.     This copies the files 'cc1', 'cpp' and 'libgcc.a' to files 'cc1', 'cpp' and 
  5822.     'libgcc.a' in the directory '/usr/local/lib/gcc-lib/target/version', which 
  5823.     is where the compiler driver program looks for them.  Here target is the 
  5824.     canonicalized form of target machine type specified when you ran 
  5825.     'configure', and version is the version number of GNU CC. This naming 
  5826.     scheme permits various versions and/or cross-compilers to coexist.  It also 
  5827.     copies the executables for compilers for other languages (e.g., 'cc1plus' 
  5828.     for C++) to the same directory. 
  5829.  
  5830.     This also copies the driver program 'xgcc' into '/usr/local/bin/gcc', so 
  5831.     that it appears in typical execution search paths.  It also copies 'gcc.1' 
  5832.     into '/usr/local/man/man1' and info pages into '/usr/local/info'. 
  5833.  
  5834.     On some systems, this command causes recompilation of some files.  This is 
  5835.     usually due to bugs in make.  You should either ignore this problem, or use 
  5836.     GNU Make. 
  5837.  
  5838.     Warning: there is a bug in alloca in the Sun library.  To avoid this bug, 
  5839.     be sure to install the executables of GNU CC that were compiled by GNU CC. 
  5840.     (That is, the executables from stage 2 or 3, not stage 1.)  They use alloca 
  5841.     as a built-in function and never the one in the library. 
  5842.  
  5843.     (It is usually better to install GNU CC executables from stage 2 or 3, 
  5844.     since they usually run faster than the ones compiled with some other 
  5845.     compiler.) 
  5846.  
  5847.   16. If you're going to use C++, it's likely that you need to also install a 
  5848.       C++ runtime library.  Just as GNU C does not distribute a C runtime 
  5849.       library, it also does not include a C++ runtime library.  All I/O 
  5850.       functionality, special class libraries, etc., are provided by the C++ 
  5851.       runtime library. 
  5852.  
  5853.       The standard C++ runtime library for GNU CC is called 'libstdc++'. An 
  5854.       obsolescent library 'libg++' may also be available, but it's necessary 
  5855.       only for older software that hasn't been converted yet; if you don't know 
  5856.       whether you need 'libg++' then you probably don't need it. 
  5857.  
  5858.       Here's one way to build and install 'libstdc++' for GNU CC: 
  5859.  
  5860.           Build and install GNU CC, so that invoking 'gcc' obtains the GNU CC 
  5861.            that was just built. 
  5862.  
  5863.           Obtain a copy of a compatible 'libstdc++' distribution.  For 
  5864.            example, the 'libstdc++-2.8.0.tar.gz' distribution should be 
  5865.            compatible with GCC 2.8.0.  GCC distributors normally distribute 
  5866.            'libstdc++' as well. 
  5867.  
  5868.           Set the 'CXX' environment variable to 'gcc' while running the 
  5869.            'libstdc++' distribution's 'configure' command.  Use the same 
  5870.            'configure' options that you used when you invoked GCC's 'configure' 
  5871.            command. 
  5872.  
  5873.           Invoke 'make' to build the C++ runtime. 
  5874.  
  5875.           Invoke 'make install' to install the C++ runtime. 
  5876.  
  5877.     To summarize, after building and installing GNU CC, invoke the following 
  5878.     shell commands in the topmost directory of the C++ library distribution. 
  5879.     For configure-options, use the same options that you used to configure GNU 
  5880.     CC. 
  5881.  
  5882.                             $ CXX=gcc ./configure configure-options
  5883.                             $ make
  5884.                             $ make install
  5885.  
  5886.   17. GNU CC includes a runtime library for Objective-C because it is an 
  5887.       integral part of the language.  You can find the files associated with 
  5888.       the library in the subdirectory 'objc'.  The GNU Objective-C Runtime 
  5889.       Library requires header files for the target's C library in order to be 
  5890.       compiled,and also requires the header files for the target's thread 
  5891.       library if you want thread support.  See Cross-Compilers and Header 
  5892.       Files: Cross-Compilers and Header Files, for discussion about header 
  5893.       files issues for cross-compilation. 
  5894.  
  5895.       When you run 'configure', it picks the appropriate Objective-C thread 
  5896.       implementation file for the target platform.  In some situations, you may 
  5897.       wish to choose a different back-end as some platforms support multiple 
  5898.       thread implementations or you may wish to disable thread support 
  5899.       completely.  You do this by specifying a value for the OBJC_THREAD_FILE 
  5900.       makefile variable on the command line when you run make, for example: 
  5901.  
  5902.                             make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" OBJC_THREAD_FILE=thr-single
  5903.  
  5904.     Below is a list of the currently available back-ends. 
  5905.  
  5906.           thr-single 
  5907.            Disable thread support, should work for all platforms. 
  5908.  
  5909.           thr-decosf1 
  5910.            DEC OSF/1 thread support. 
  5911.  
  5912.           thr-irix 
  5913.            SGI IRIX thread support. 
  5914.  
  5915.           thr-mach 
  5916.            Generic MACH thread support, known to work on NEXTSTEP. 
  5917.  
  5918.           thr-os2 
  5919.            IBM OS/2 thread support. 
  5920.  
  5921.           thr-posix 
  5922.            Generix POSIX thread support. 
  5923.  
  5924.           thr-pthreads 
  5925.            PCThreads on Linux-based GNU systems. 
  5926.  
  5927.           thr-solaris 
  5928.            SUN Solaris thread support. 
  5929.  
  5930.           thr-win32 
  5931.            Microsoft Win32 API thread support. 
  5932.  
  5933.  
  5934. ΓòÉΓòÉΓòÉ 5.1. Configurations Supported by GNU CC ΓòÉΓòÉΓòÉ
  5935.  
  5936.  Here are the possible CPU types: 
  5937.  
  5938.            1750a, a29k, alpha, arm, cn, clipper, dsp16xx, elxsi, h8300, 
  5939.            hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m32r, m68000, 
  5940.            m68k, m88k, mips, mipsel, mips64, mips64el, ns32k, powerpc, 
  5941.            powerpcle, pyramid, romp, rs6000, sh, sparc, sparclite, sparc64, 
  5942.            vax, we32k. 
  5943.  
  5944.  Here are the recognized company names.  As you can see, customary 
  5945.  abbreviations are used rather than the longer official names. 
  5946.  
  5947.            acorn, alliant, altos, apollo, apple, att, bull, cbm, convergent, 
  5948.            convex, crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, hp, 
  5949.            ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus, 
  5950.            sequent, sgi, sony, sun, tti, unicom, wrs. 
  5951.  
  5952.  The company name is meaningful only to disambiguate when the rest of the 
  5953.  information supplied is insufficient.  You can omit it, writing just 
  5954.  'cpu-system', if it is not needed.  For example, 'vax-ultrix4.2' is equivalent 
  5955.  to 'vax-dec-ultrix4.2'. 
  5956.  
  5957.  Here is a list of system types: 
  5958.  
  5959.            386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff, 
  5960.            ctix, cxux, dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, 
  5961.            genix, gnu, linux-gnu, hiux, hpux, iris, irix, isc, luna, lynxos, 
  5962.            mach, minix, msdos, mvs, netbsd, newsos, nindy, ns, osf, osfrose, 
  5963.            ptx, riscix, riscos, rtu, sco, sim, solaris, sunos, sym, sysv, udi, 
  5964.            ultrix, unicos, uniplus, unos, vms, vsta, vxworks, winnt, xenix. 
  5965.  You can omit the system type; then 'configure' guesses the operating system 
  5966.  from the CPU and company. 
  5967.  
  5968.  You can add a version number to the system type; this may or may not make a 
  5969.  difference.  For example, you can write 'bsd4.3' or 'bsd4.4' to distinguish 
  5970.  versions of BSD.  In practice, the version number is most needed for 'sysv3' 
  5971.  and 'sysv4', which are often treated differently. 
  5972.  
  5973.  If you specify an impossible combination such as 'i860-dg-vms', then you may 
  5974.  get an error message from 'configure', or it may ignore part of the 
  5975.  information and do the best it can with the rest. 'configure' always prints 
  5976.  the canonical name for the alternative that it used.  GNU CC does not support 
  5977.  all possible alternatives. 
  5978.  
  5979.  Often a particular model of machine has a name.  Many machine names are 
  5980.  recognized as aliases for CPU/company combinations.  Thus, the machine name 
  5981.  'sun3', mentioned above, is an alias for 'm68k-sun'. Sometimes we accept a 
  5982.  company name as a machine name, when the name is popularly used for a 
  5983.  particular machine.  Here is a table of the known machine names: 
  5984.  
  5985.            3300, 3b1, 3bn, 7300, altos3068, altos, apollo68, att-7300, balance, 
  5986.            convex-cn, crds, decstation-3100, decstation, delta, encore, fx2800, 
  5987.            gmicro, hp7nn, hp8nn, hp9k2nn, hp9k3nn, hp9k7nn, hp9k8nn, iris4d, 
  5988.            iris, isi68, m3230, magnum, merlin, miniframe, mmax, news-3600, 
  5989.            news800, news, next, pbd, pc532, pmax, powerpc, powerpcle, ps2, 
  5990.            risc-news, rtpc, sun2, sun386i, sun386, sun3, sun4, symmetry, 
  5991.            tower-32, tower. 
  5992.  Remember that a machine name specifies both the cpu type and the company name. 
  5993.  If you want to install your own homemade configuration files, you can use 
  5994.  'local' as the company name to access them.  If you use configuration 
  5995.  'cpu-local', the configuration name without the cpu prefix is used to form the 
  5996.  configuration file names. 
  5997.  
  5998.  Thus, if you specify 'm68k-local', configuration uses files 'm68k.md', 
  5999.  'local.h', 'm68k.c', 'xm-local.h', 't-local', and 'x-local', all in the 
  6000.  directory 'config/m68k'. 
  6001.  
  6002.  Here is a list of configurations that have special treatment or special things 
  6003.  you must know: 
  6004.  
  6005.  '1750a-*-*' 
  6006.            MIL-STD-1750A processors. 
  6007.  
  6008.            The MIL-STD-1750A cross configuration produces output for as1750, an 
  6009.            assembler/linker available under the GNU Public License for the 
  6010.            1750A. as1750 can be obtained at 
  6011.            ftp://ftp.fta-berlin.de/pub/crossgcc/1750gals/. A similarly licensed 
  6012.            simulator for the 1750A is available from same address. 
  6013.  
  6014.            You should ignore a fatal error during the building of libgcc 
  6015.            (libgcc is not yet implemented for the 1750A.) 
  6016.  
  6017.            The as1750 assembler requires the file 'ms1750.inc', which is found 
  6018.            in the directory 'config/1750a'. 
  6019.  
  6020.            GNU CC produced the same sections as the Fairchild F9450 C Compiler, 
  6021.            namely: 
  6022.  
  6023.              Normal 
  6024.                          The program code section. 
  6025.  
  6026.              Static 
  6027.                          The read/write (RAM) data section. 
  6028.  
  6029.              Konst 
  6030.                          The read-only (ROM) constants section. 
  6031.  
  6032.              Init 
  6033.                          Initialization section (code to copy KREL to SREL). 
  6034.  
  6035.              The smallest addressable unit is 16 bits (BITS_PER_UNIT is 16). 
  6036.              This means that type `char' is represented with a 16-bit word per 
  6037.              character. The 1750A's " Load/Store Upper/Lower Byte" instructions 
  6038.              are not used by GNU CC. 
  6039.  
  6040.  'alpha-*-osf1' 
  6041.            Systems using processors that implement the DEC Alpha architecture 
  6042.            and are running the DEC Unix (OSF/1) operating system, for example 
  6043.            the DEC Alpha AXP systems.CC.) 
  6044.  
  6045.            GNU CC writes a '.verstamp' directive to the assembler output file 
  6046.            unless it is built as a cross-compiler.  It gets the version to use 
  6047.            from the system header file '/usr/include/stamp.h'.  If you install 
  6048.            a new version of DEC Unix, you should rebuild GCC to pick up the new 
  6049.            version stamp. 
  6050.  
  6051.            Note that since the Alpha is a 64-bit architecture, cross-compilers 
  6052.            from 32-bit machines will not generate code as efficient as that 
  6053.            generated when the compiler is running on a 64-bit machine because 
  6054.            many optimizations that depend on being able to represent a word on 
  6055.            the target in an integral value on the host cannot be performed. 
  6056.            Building cross-compilers on the Alpha for 32-bit machines has only 
  6057.            been tested in a few cases and may not work properly. 
  6058.  
  6059.            make compare may fail on old versions of DEC Unix unless you add 
  6060.            '-save-temps' to CFLAGS.  On these systems, the name of the 
  6061.            assembler input file is stored in the object file, and that makes 
  6062.            comparison fail if it differs between the stage1 and stage2 
  6063.            compilations.  The option '-save-temps' forces a fixed name to be 
  6064.            used for the assembler input file, instead of a randomly chosen name 
  6065.            in '/tmp'.  Do not add '-save-temps' unless the comparisons fail 
  6066.            without that option.  If you add '-save-temps', you will have to 
  6067.            manually delete the '.i' and '.s' files after each series of 
  6068.            compilations. 
  6069.  
  6070.            GNU CC now supports both the native (ECOFF) debugging format used by 
  6071.            DBX and GDB and an encapsulated STABS format for use only with GDB. 
  6072.            See the discussion of the '--with-stabs' option of 'configure' above 
  6073.            for more information on these formats and how to select them. 
  6074.  
  6075.            There is a bug in DEC's assembler that produces incorrect line 
  6076.            numbers for ECOFF format when the '.align' directive is used.  To 
  6077.            work around this problem, GNU CC will not emit such alignment 
  6078.            directives while writing ECOFF format debugging information even if 
  6079.            optimization is being performed.  Unfortunately, this has the very 
  6080.            undesirable side-effect that code addresses when '-O' is specified 
  6081.            are different depending on whether or not '-g' is also specified. 
  6082.  
  6083.            To avoid this behavior, specify '-gstabs+' and use GDB instead of 
  6084.            DBX.  DEC is now aware of this problem with the assembler and hopes 
  6085.            to provide a fix shortly. 
  6086.  
  6087.  'arc-*-elf' 
  6088.            Argonaut ARC processor. This configuration is intended for embedded 
  6089.            systems. 
  6090.  
  6091.  'arm-*-aout' 
  6092.            Advanced RISC Machines ARM-family processors.  These are often used 
  6093.            in embedded applications.  There are no standard Unix 
  6094.            configurations. This configuration corresponds to the basic 
  6095.            instruction sequences and will produce 'a.out' format object 
  6096.            modules. 
  6097.  
  6098.            You may need to make a variant of the file 'arm.h' for your 
  6099.            particular configuration. 
  6100.  
  6101.  'arm-*-linuxaout' 
  6102.            Any of the ARM family processors running the Linux-based GNU system 
  6103.            with the 'a.out' binary format (ELF is not yet supported).  You must 
  6104.            use version 2.8.1.0.7 or later of the GNU/Linux binutils, which you 
  6105.            can download from 'sunsite.unc.edu:/pub/Linux/GCC' and other mirror 
  6106.            sites for Linux-based GNU systems. 
  6107.  
  6108.  'arm-*-riscix' 
  6109.            The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD 
  6110.            Unix. If you are running a version of RISC iX prior to 1.2 then you 
  6111.            must specify the version number during configuration.  Note that the 
  6112.            assembler shipped with RISC iX does not support stabs debugging 
  6113.            information; a new version of the assembler, with stabs support 
  6114.            included, is now available from Acorn and via ftp 
  6115.            'ftp.acorn.com:/pub/riscix/as+xterm.tar.Z'.  To enable stabs 
  6116.            debugging, pass '--with-gnu-as' to configure. 
  6117.  
  6118.            You will need to install GNU 'sed' before you can run configure. 
  6119.  
  6120.  'a29k' 
  6121.            AMD Am29k-family processors.  These are normally used in embedded 
  6122.            applications.  There are no standard Unix configurations. This 
  6123.            configuration corresponds to AMD's standard calling sequence and 
  6124.            binary interface and is compatible with other 29k tools. 
  6125.  
  6126.            You may need to make a variant of the file 'a29k.h' for your 
  6127.            particular configuration. 
  6128.  
  6129.  'a29k-*-bsd' 
  6130.            AMD Am29050 used in a system running a variant of BSD Unix. 
  6131.  
  6132.  'decstation-*' 
  6133.            MIPS-based DECstations can support three different personalities: 
  6134.            Ultrix, DEC OSF/1, and OSF/rose.  (Alpha-based DECstation products 
  6135.            have a configuration name beginning with 'alpha-dec'.)  To configure 
  6136.            GCC for these platforms use the following configurations: 
  6137.  
  6138.              'decstation-ultrix' 
  6139.                          Ultrix configuration. 
  6140.  
  6141.              'decstation-osf1' 
  6142.                          Dec's version of OSF/1. 
  6143.  
  6144.              'decstation-osfrose' 
  6145.                          Open Software Foundation reference port of OSF/1 which 
  6146.                          uses the OSF/rose object file format instead of ECOFF. 
  6147.                          Normally, you would not select this configuration. 
  6148.  
  6149.              The MIPS C compiler needs to be told to increase its table size 
  6150.              for switch statements with the '-Wf,-XNg1500' option in order to 
  6151.              compile 'cp/parse.c'.  If you use the '-O2' optimization option, 
  6152.              you also need to use '-Olimit 3000'. Both of these options are 
  6153.              automatically generated in the 'Makefile' that the shell script 
  6154.              'configure' builds. If you override the CC make variable and use 
  6155.              the MIPS compilers, you may need to add '-Wf,-XNg1500 -Olimit 
  6156.              3000'. 
  6157.  
  6158.  'elxsi-elxsi-bsd' 
  6159.            The Elxsi's C compiler has known limitations that prevent it from 
  6160.            compiling GNU C.  Please contact mrs@cygnus.com for more details. 
  6161.  
  6162.  'dsp16xx' 
  6163.            A port to the AT&T DSP1610 family of processors. 
  6164.  
  6165.  'h8300-*-*' 
  6166.            Hitachi H8/300 series of processors. 
  6167.  
  6168.            The calling convention and structure layout has changed in release 
  6169.            2.6. All code must be recompiled.  The calling convention now passes 
  6170.            the first three arguments in function calls in registers. 
  6171.            Structures are no longer a multiple of 2 bytes. 
  6172.  
  6173.  'hppa*-*-*' 
  6174.            There are several variants of the HP-PA processor which run a 
  6175.            variety of operating systems.  GNU CC must be configured to use the 
  6176.            correct processor type and operating system, or GNU CC will not 
  6177.            function correctly. The easiest way to handle this problem is to not 
  6178.            specify a target when configuring GNU CC, the 'configure' script 
  6179.            will try to automatically determine the right processor type and 
  6180.            operating system. 
  6181.  
  6182.            '-g' does not work on HP-UX, since that system uses a peculiar 
  6183.            debugging format which GNU CC does not know about.  However, '-g' 
  6184.            will work if you also use GAS and GDB in conjunction with GCC.  We 
  6185.            highly recommend using GAS for all HP-PA configurations. 
  6186.  
  6187.            You should be using GAS-2.6 (or later) along with GDB-4.16 (or 
  6188.            later).  These can be retrieved from all the traditional GNU ftp 
  6189.            archive sites. 
  6190.  
  6191.            GAS will need to be installed into a directory before /bin, 
  6192.            /usr/bin, and /usr/ccs/bin in your search path.  You should install 
  6193.            GAS before you build GNU CC. 
  6194.  
  6195.            To enable debugging, you must configure GNU CC with the 
  6196.            '--with-gnu-as' option before building. 
  6197.  
  6198.  'i370-*-*' 
  6199.            This port is very preliminary and has many known bugs.  We hope to 
  6200.            have a higher-quality port for this machine soon. 
  6201.  
  6202.  'i386-*-linux-gnuoldld' 
  6203.            Use this configuration to generate 'a.out' binaries on Linux-based 
  6204.            GNU systems if you do not have gas/binutils version 2.5.2 or later 
  6205.            installed. This is an obsolete configuration. 
  6206.  
  6207.  'i386-*-linux-gnuaout' 
  6208.            Use this configuration to generate 'a.out' binaries on Linux-based 
  6209.            GNU systems. This configuration is being superseded. You must use 
  6210.            gas/binutils version 2.5.2 or later. 
  6211.  
  6212.  'i386-*-linux-gnu' 
  6213.            Use this configuration to generate ELF binaries on Linux-based GNU 
  6214.            systems.  You must use gas/binutils version 2.5.2 or later. 
  6215.  
  6216.  'i386-*-sco' 
  6217.            Compilation with RCC is recommended.  Also, it may be a good idea to 
  6218.            link with GNU malloc instead of the malloc that comes with the 
  6219.            system. 
  6220.  
  6221.  'i386-*-sco3.2v4' 
  6222.            Use this configuration for SCO release 3.2 version 4. 
  6223.  
  6224.  'i386-*-sco3.2v5*' 
  6225.            Use this for the SCO OpenServer Release family including 5.0.0, 
  6226.            5.0.2, 5.0.4, Internet FastStart 1.0, and Internet FastStart 1.1. 
  6227.  
  6228.            GNU CC can generate either ELF or COFF binaries.  ELF is the 
  6229.            default. To get COFF output, you must specify '-mcoff' on the 
  6230.            command line.  For 5.0.0 and 5.0.2, you must install TLS597 from 
  6231.            ftp.sco.com/TLS. 5.0.4 and later do not require this patch. 
  6232.  
  6233.            NOTE: You must follow the instructions about invoking 'make 
  6234.            bootstrap' because the native OpenServer compiler builds a 'cc1plus' 
  6235.            that will not correctly parse many valid C++ programs. You must do a 
  6236.            'make bootstrap' if you are building with the native compiler. 
  6237.  
  6238.  'i386-*-isc' 
  6239.            It may be a good idea to link with GNU malloc instead of the malloc 
  6240.            that comes with the system. 
  6241.  
  6242.            In ISC version 4.1, 'sed' core dumps when building 'deduced.h'.  Use 
  6243.            the version of 'sed' from version 4.0. 
  6244.  
  6245.  'i386-*-esix' 
  6246.            It may be good idea to link with GNU malloc instead of the malloc 
  6247.            that comes with the system. 
  6248.  
  6249.  'i386-ibm-aix' 
  6250.            You need to use GAS version 2.1 or later, and LD from GNU binutils 
  6251.            version 2.2 or later. 
  6252.  
  6253.  'i386-sequent-bsd' 
  6254.            Go to the Berkeley universe before compiling. 
  6255.  
  6256.  'i386-sequent-ptx1*' 
  6257.            Sequent DYNIX/ptx 1.x. 
  6258.  
  6259.  'i386-sequent-ptx2*' 
  6260.            Sequent DYNIX/ptx 2.x. 
  6261.  
  6262.  'i386-sun-sunos4' 
  6263.            You may find that you need another version of GNU CC to begin 
  6264.            bootstrapping with, since the current version when built with the 
  6265.            system's own compiler seems to get an infinite loop compiling part 
  6266.            of 'libgcc2.c'.  GNU CC version 2 compiled with GNU CC (any version) 
  6267.            seems not to have this problem. 
  6268.  
  6269.            See Sun Install, for information on installing GNU CC on Sun 
  6270.            systems. 
  6271.  
  6272.  'i[345]86-*-winnt3.5' 
  6273.            This version requires a GAS that has not yet been released.  Until 
  6274.            it is, you can get a prebuilt binary version via anonymous ftp from 
  6275.            'cs.washington.edu:pub/gnat' or 'cs.nyu.edu:pub/gnat'. You must also 
  6276.            use the Microsoft header files from the Windows NT 3.5 SDK. Find 
  6277.            these on the CDROM in the '/mstools/h' directory dated 9/4/94.  You 
  6278.            must use a fixed version of Microsoft linker made especially for NT 
  6279.            3.5, which is also is available on the NT 3.5 SDK CDROM.  If you do 
  6280.            not have this linker, can you also use the linker from Visual C/C++ 
  6281.            1.0 or 2.0. 
  6282.  
  6283.            Installing GNU CC for NT builds a wrapper linker, called 'ld.exe', 
  6284.            which mimics the behaviour of Unix 'ld' in the specification of 
  6285.            libraries ('-L' and '-l').  'ld.exe' looks for both Unix and 
  6286.            Microsoft named libraries.  For example, if you specify '-lfoo', 
  6287.            'ld.exe' will look first for 'libfoo.a' and then for 'foo.lib'. 
  6288.  
  6289.            You may install GNU CC for Windows NT in one of two ways, depending 
  6290.            on whether or not you have a Unix-like shell and various Unix-like 
  6291.            utilities. 
  6292.  
  6293.               .If you do not have a Unix-like shell and few Unix-like 
  6294.                 utilities, you will use a DOS style batch script called 
  6295.                 'configure.bat'.  Invoke it as configure winnt from an MSDOS 
  6296.                 console window or from the program manager dialog box. 
  6297.                 'configure.bat' assumes you have already installed and have in 
  6298.                 your path a Unix-like 'sed' program which is used to create a 
  6299.                 working 'Makefile' from 'Makefile.in'. 
  6300.  
  6301.                 'Makefile' uses the Microsoft Nmake program maintenance utility 
  6302.                 and the Visual C/C++ V8.00 compiler to build GNU CC.  You need 
  6303.                 only have the utilities 'sed' and 'touch' to use this 
  6304.                 installation method, which only automatically builds the 
  6305.                 compiler itself.  You must then examine what 'fixinc.winnt' 
  6306.                 does, edit the header files by hand and build 'libgcc.a' 
  6307.                 manually. 
  6308.  
  6309.               .The second type of installation assumes you are running a 
  6310.                 Unix-like shell, have a complete suite of Unix-like utilities 
  6311.                 in your path, and have a previous version of GNU CC already 
  6312.                 installed, either through building it via the above 
  6313.                 installation method or acquiring a pre-built binary.  In this 
  6314.                 case, use the 'configure' script in the normal fashion. 
  6315.  
  6316.  'i860-intel-osf1' 
  6317.            This is the Paragon. If you have version 1.0 of the operating 
  6318.            system, see Installation Problems, for special things you need to do 
  6319.            to compensate for peculiarities in the system. 
  6320.  
  6321.  '*-lynx-lynxos' 
  6322.            LynxOS 2.2 and earlier comes with GNU CC 1.x already installed as 
  6323.            '/bin/gcc'.  You should compile with this instead of '/bin/cc'. You 
  6324.            can tell GNU CC to use the GNU assembler and linker, by specifying 
  6325.            '--with-gnu-as --with-gnu-ld' when configuring.  These will produce 
  6326.            COFF format object files and executables;  otherwise GNU CC will use 
  6327.            the installed tools, which produce 'a.out' format executables. 
  6328.  
  6329.  'm32r-*-elf' 
  6330.            Mitsubishi M32R processor. This configuration is intended for 
  6331.            embedded systems. 
  6332.  
  6333.  'm68000-hp-bsd' 
  6334.            HP 9000 series 200 running BSD.  Note that the C compiler that comes 
  6335.            with this system cannot compile GNU CC; contact law@cygnus.com to 
  6336.            get binaries of GNU CC for bootstrapping. 
  6337.  
  6338.  'm68k-altos' 
  6339.            Altos 3068.  You must use the GNU assembler, linker and debugger. 
  6340.            Also, you must fix a kernel bug.  Details in the file 
  6341.            'README.ALTOS'. 
  6342.  
  6343.  'm68k-apple-aux' 
  6344.            Apple Macintosh running A/UX. You may configure GCC  to use either 
  6345.            the system assembler and linker or the GNU assembler and linker. 
  6346.            You should use the GNU configuration if you can, especially if you 
  6347.            also want to use GNU C++.  You enabled that configuration with + the 
  6348.            '--with-gnu-as' and '--with-gnu-ld' options to configure. 
  6349.  
  6350.            Note the C compiler that comes with this system cannot compile GNU 
  6351.            CC.  You can fine binaries of GNU CC for bootstrapping on 
  6352.            jagubox.gsfc.nasa.gov. You will also a patched version of '/bin/ld' 
  6353.            there that raises some of the arbitrary limits found in the 
  6354.            original. 
  6355.  
  6356.  'm68k-att-sysv' 
  6357.            AT&T 3b1, a.k.a. 7300 PC.  Special procedures are needed to compile 
  6358.            GNU CC with this machine's standard C compiler, due to bugs in that 
  6359.            compiler.  You can bootstrap it more easily with previous versions 
  6360.            of GNU CC if you have them. 
  6361.  
  6362.            Installing GNU CC on the 3b1 is difficult if you do not already have 
  6363.            GNU CC running, due to bugs in the installed C compiler.  However, 
  6364.            the following procedure might work.  We are unable to test it. 
  6365.  
  6366.               .Comment out the '#include "config.h"' line near the start of 
  6367.                 'cccp.c' and do 'make cpp'.  This makes a preliminary version 
  6368.                 of GNU cpp. 
  6369.  
  6370.               .Save the old '/lib/cpp' and copy the preliminary GNU cpp to 
  6371.                 that file name. 
  6372.  
  6373.               .Undo your change in 'cccp.c', or reinstall the original 
  6374.                 version, and do 'make cpp' again. 
  6375.  
  6376.               .Copy this final version of GNU cpp into '/lib/cpp'. 
  6377.  
  6378.               .Replace every occurrence of obstack_free in the file 'tree.c' 
  6379.                 with _obstack_free. 
  6380.  
  6381.               .Run make to get the first-stage GNU CC. 
  6382.  
  6383.               .Reinstall the original version of '/lib/cpp'. 
  6384.  
  6385.               .Now you can compile GNU CC with itself and install it in the 
  6386.                 normal fashion. 
  6387.  
  6388.  'm68k-bull-sysv' 
  6389.            Bull DPX/2 series 200 and 300 with BOS-2.00.45 up to BOS-2.01. GNU 
  6390.            CC works either with native assembler or GNU assembler. You can use 
  6391.            GNU assembler with native coff generation by providing 
  6392.            '--with-gnu-as' to the configure script or use GNU assembler with 
  6393.            dbx-in-coff encapsulation by providing '--with-gnu-as --stabs'. For 
  6394.            any problem with native assembler or for availability of the DPX/2 
  6395.            port of GAS, contact F.Pierresteguy@frcl.bull.fr. 
  6396.  
  6397.  'm68k-crds-unox' 
  6398.            Use 'configure unos' for building on Unos. 
  6399.  
  6400.            The Unos assembler is named casm instead of as.  For some strange 
  6401.            reason linking '/bin/as' to '/bin/casm' changes the behavior, and 
  6402.            does not work.  So, when installing GNU CC, you should install the 
  6403.            following script as 'as' in the subdirectory where the passes of GCC 
  6404.            are installed: 
  6405.  
  6406.                                               #!/bin/sh
  6407.                                               casm $*
  6408.  
  6409.              The default Unos library is named 'libunos.a' instead of 'libc.a'. 
  6410.              To allow GNU CC to function, either change all references to '-lc' 
  6411.              in 'gcc.c' to '-lunos' or link '/lib/libc.a' to '/lib/libunos.a'. 
  6412.  
  6413.              When compiling GNU CC with the standard compiler, to overcome bugs 
  6414.              in the support of alloca, do not use '-O' when making stage 2. 
  6415.              Then use the stage 2 compiler with '-O' to make the stage 3 
  6416.              compiler.  This compiler will have the same characteristics as the 
  6417.              usual stage 2 compiler on other systems.  Use it to make a stage 4 
  6418.              compiler and compare that with stage 3 to verify proper 
  6419.              compilation. 
  6420.  
  6421.              (Perhaps simply defining ALLOCA in 'x-crds' as described in the 
  6422.              comments there will make the above paragraph superfluous.  Please 
  6423.              inform us of whether this works.) 
  6424.  
  6425.              Unos uses memory segmentation instead of demand paging, so you 
  6426.              will need a lot of memory.  5 Mb is barely enough if no other 
  6427.              tasks are running. If linking 'cc1' fails, try putting the object 
  6428.              files into a library and linking from that library. 
  6429.  
  6430.  'm68k-hp-hpux' 
  6431.            HP 9000 series 300 or 400 running HP-UX.  HP-UX version 8.0 has a 
  6432.            bug in the assembler that prevents compilation of GNU CC.  To fix 
  6433.            it, get patch PHCO_4484 from HP. 
  6434.  
  6435.            In addition, if you wish to use gas '--with-gnu-as' you must use gas 
  6436.            version 2.1 or later, and you must use the GNU linker version 2.1 or 
  6437.            later.  Earlier versions of gas relied upon a program which 
  6438.            converted the gas output into the native HP/UX format, but that 
  6439.            program has not been kept up to date.  gdb does not understand that 
  6440.            native HP/UX format, so you must use gas if you wish to use gdb. 
  6441.  
  6442.  'm68k-sun' 
  6443.            Sun 3.  We do not provide a configuration file to use the Sun FPA by 
  6444.            default, because programs that establish signal handlers for 
  6445.            floating point traps inherently cannot work with the FPA. 
  6446.  
  6447.            See Sun Install, for information on installing GNU CC on Sun 
  6448.            systems. 
  6449.  
  6450.  'm88k-*-svr3' 
  6451.            Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference port. 
  6452.            These systems tend to use the Green Hills C, revision 1.8.5, as the 
  6453.            standard C compiler.  There are apparently bugs in this compiler 
  6454.            that result in object files differences between stage 2 and stage 3. 
  6455.            If this happens, make the stage 4 compiler and compare it to the 
  6456.            stage 3 compiler.  If the stage 3 and stage 4 object files are 
  6457.            identical, this suggests you encountered a problem with the standard 
  6458.            C compiler; the stage 3 and 4 compilers may be usable. 
  6459.  
  6460.            It is best, however, to use an older version of GNU CC for 
  6461.            bootstrapping if you have one. 
  6462.  
  6463.  'm88k-*-dgux' 
  6464.            Motorola m88k running DG/UX.  To build 88open BCS native or cross 
  6465.            compilers on DG/UX, specify the configuration name as 
  6466.            'm88k-*-dguxbcs' and build in the 88open BCS software development 
  6467.            environment.  To build ELF native or cross compilers on DG/UX, 
  6468.            specify 'm88k-*-dgux' and build in the DG/UX ELF development 
  6469.            environment. You set the software development environment by issuing 
  6470.            'sde-target' command and specifying either 'm88kbcs' or 
  6471.            'm88kdguxelf' as the operand. 
  6472.  
  6473.            If you do not specify a configuration name, 'configure' guesses the 
  6474.            configuration based on the current software development environment. 
  6475.  
  6476.  'm88k-tektronix-sysv3' 
  6477.            Tektronix XD88 running UTekV 3.2e.  Do not turn on optimization 
  6478.            while building stage1 if you bootstrap with the buggy Green Hills 
  6479.            compiler.  Also, The bundled LAI System V NFS is buggy so if you 
  6480.            build in an NFS mounted directory, start from a fresh reboot, or 
  6481.            avoid NFS all together. Otherwise you may have trouble getting clean 
  6482.            comparisons between stages. 
  6483.  
  6484.  'mips-mips-bsd' 
  6485.            MIPS machines running the MIPS operating system in BSD mode.  It's 
  6486.            possible that some old versions of the system lack the functions 
  6487.            memcpy, memcmp, and memset.  If your system lacks these, you must 
  6488.            remove or undo the definition of TARGET_MEM_FUNCTIONS in 
  6489.            'mips-bsd.h'. 
  6490.  
  6491.            The MIPS C compiler needs to be told to increase its table size for 
  6492.            switch statements with the '-Wf,-XNg1500' option in order to compile 
  6493.            'cp/parse.c'.  If you use the '-O2' optimization option, you also 
  6494.            need to use '-Olimit 3000'. Both of these options are automatically 
  6495.            generated in the 'Makefile' that the shell script 'configure' 
  6496.            builds. If you override the CC make variable and use the MIPS 
  6497.            compilers, you may need to add '-Wf,-XNg1500 -Olimit 3000'. 
  6498.  
  6499.  'mips-mips-riscos*' 
  6500.            The MIPS C compiler needs to be told to increase its table size for 
  6501.            switch statements with the '-Wf,-XNg1500' option in order to compile 
  6502.            'cp/parse.c'.  If you use the '-O2' optimization option, you also 
  6503.            need to use '-Olimit 3000'. Both of these options are automatically 
  6504.            generated in the 'Makefile' that the shell script 'configure' 
  6505.            builds. If you override the CC make variable and use the MIPS 
  6506.            compilers, you may need to add '-Wf,-XNg1500 -Olimit 3000'. 
  6507.  
  6508.            MIPS computers running RISC-OS can support four different 
  6509.            personalities: default, BSD 4.3, System V.3, and System V.4 (older 
  6510.            versions of RISC-OS don't support V.4).  To configure GCC for these 
  6511.            platforms use the following configurations: 
  6512.  
  6513.              'mips-mips-riscosrev' 
  6514.                          Default configuration for RISC-OS, revision rev. 
  6515.  
  6516.              'mips-mips-riscosrevbsd' 
  6517.                          BSD 4.3 configuration for RISC-OS, revision rev. 
  6518.  
  6519.              'mips-mips-riscosrevsysv4' 
  6520.                          System V.4 configuration for RISC-OS, revision rev. 
  6521.  
  6522.              'mips-mips-riscosrevsysv' 
  6523.                          System V.3 configuration for RISC-OS, revision rev. 
  6524.  
  6525.              The revision rev mentioned above is the revision of RISC-OS to 
  6526.              use.  You must reconfigure GCC when going from a RISC-OS revision 
  6527.              4 to RISC-OS revision 5.  This has the effect of avoiding a linker 
  6528.              bug (see Installation Problems, for more details). 
  6529.  
  6530.  'mips-sgi-*' 
  6531.            In order to compile GCC on an SGI running IRIX 4, the "c.hdr.lib" 
  6532.            option must be installed from the CD-ROM supplied from Silicon 
  6533.            Graphics. This is found on the 2nd CD in release 4.0.1. 
  6534.  
  6535.            In order to compile GCC on an SGI running IRIX 5, the 
  6536.            "compiler_dev.hdr" subsystem must be installed from the IDO CD-ROM 
  6537.            supplied by Silicon Graphics. 
  6538.  
  6539.            make compare may fail on version 5 of IRIX unless you add 
  6540.            '-save-temps' to CFLAGS.  On these systems, the name of the 
  6541.            assembler input file is stored in the object file, and that makes 
  6542.            comparison fail if it differs between the stage1 and stage2 
  6543.            compilations.  The option '-save-temps' forces a fixed name to be 
  6544.            used for the assembler input file, instead of a randomly chosen name 
  6545.            in '/tmp'.  Do not add '-save-temps' unless the comparisons fail 
  6546.            without that option.  If you do you '-save-temps', you will have to 
  6547.            manually delete the '.i' and '.s' files after each series of 
  6548.            compilations. 
  6549.  
  6550.            The MIPS C compiler needs to be told to increase its table size for 
  6551.            switch statements with the '-Wf,-XNg1500' option in order to compile 
  6552.            'cp/parse.c'.  If you use the '-O2' optimization option, you also 
  6553.            need to use '-Olimit 3000'. Both of these options are automatically 
  6554.            generated in the 'Makefile' that the shell script 'configure' 
  6555.            builds. If you override the CC make variable and use the MIPS 
  6556.            compilers, you may need to add '-Wf,-XNg1500 -Olimit 3000'. 
  6557.  
  6558.            On Irix version 4.0.5F, and perhaps on some other versions as well, 
  6559.            there is an assembler bug that reorders instructions incorrectly. 
  6560.            To work around it, specify the target configuration 
  6561.            'mips-sgi-irix4loser'.  This configuration inhibits assembler 
  6562.            optimization. 
  6563.  
  6564.            In a compiler configured with target 'mips-sgi-irix4', you can turn 
  6565.            off assembler optimization by using the '-noasmopt' option.  This 
  6566.            compiler option passes the option '-O0' to the assembler, to inhibit 
  6567.            reordering. 
  6568.  
  6569.            The '-noasmopt' option can be useful for testing whether a problem 
  6570.            is due to erroneous assembler reordering.  Even if a problem does 
  6571.            not go away with '-noasmopt', it may still be due to assembler 
  6572.            reordering---perhaps GNU CC itself was miscompiled as a result. 
  6573.  
  6574.            To enable debugging under Irix 5, you must use GNU as 2.5 or later, 
  6575.            and use the '--with-gnu-as' configure option when configuring gcc. 
  6576.            GNU as is distributed as part of the binutils package. 
  6577.  
  6578.  'mips-sony-sysv' 
  6579.            Sony MIPS NEWS.  This works in NEWSOS 5.0.1, but not in 5.0.2 (which 
  6580.            uses ELF instead of COFF).  Support for 5.0.2 will probably be 
  6581.            provided soon by volunteers.  In particular, the linker does not 
  6582.            like the code generated by GCC when shared libraries are linked in. 
  6583.  
  6584.  'ns32k-encore' 
  6585.            Encore ns32000 system.  Encore systems are supported only under BSD. 
  6586.  
  6587.  'ns32k-*-genix' 
  6588.            National Semiconductor ns32000 system.  Genix has bugs in alloca and 
  6589.            malloc; you must get the compiled versions of these from GNU Emacs. 
  6590.  
  6591.  'ns32k-sequent' 
  6592.            Go to the Berkeley universe before compiling. 
  6593.  
  6594.  'ns32k-utek' 
  6595.            UTEK ns32000 system (``merlin'').  The C compiler that comes with 
  6596.            this system cannot compile GNU CC; contact 'tektronix!reed!mason' to 
  6597.            get binaries of GNU CC for bootstrapping. 
  6598.  
  6599.  'romp-*-aos' 
  6600.  
  6601.  'romp-*-mach' 
  6602.            The only operating systems supported for the IBM RT PC are AOS and 
  6603.            MACH.  GNU CC does not support AIX running on the RT.  We recommend 
  6604.            you compile GNU CC with an earlier version of itself; if you compile 
  6605.            GNU CC with hc, the Metaware compiler, it will work, but you will 
  6606.            get mismatches between the stage 2 and stage 3 compilers in various 
  6607.            files. These errors are minor differences in some floating-point 
  6608.            constants and can be safely ignored; the stage 3 compiler is 
  6609.            correct. 
  6610.  
  6611.  'rs6000-*-aix' 
  6612.  
  6613.  'powerpc-*-aix' 
  6614.            Various early versions of each release of the IBM XLC compiler will 
  6615.            not bootstrap GNU CC.  Symptoms include differences between the 
  6616.            stage2 and stage3 object files, and errors when compiling 'libgcc.a' 
  6617.            or 'enquire'.  Known problematic releases include: xlc-1.2.1.8, 
  6618.            xlc-1.3.0.0 (distributed with AIX 3.2.5), and xlc-1.3.0.19.  Both 
  6619.            xlc-1.2.1.28 and xlc-1.3.0.24 (PTF 432238) are known to produce 
  6620.            working versions of GNU CC, but most other recent releases correctly 
  6621.            bootstrap GNU CC. 
  6622.  
  6623.            Release 4.3.0 of AIX and ones prior to AIX 3.2.4 include a version 
  6624.            of the IBM assembler which does not accept debugging directives: 
  6625.            assembler updates are available as PTFs.  Also, if you are using AIX 
  6626.            3.2.5 or greater and the GNU assembler, you must have a version 
  6627.            modified after October 16th, 1995 in order for the GNU C compiler to 
  6628.            build.  See the file 'README.RS6000' for more details on any of 
  6629.            these problems. 
  6630.  
  6631.            GNU CC does not yet support the 64-bit PowerPC instructions. 
  6632.  
  6633.            Objective C does not work on this architecture because it makes 
  6634.            assumptions that are incompatible with the calling conventions. 
  6635.  
  6636.            AIX on the RS/6000 provides support (NLS) for environments outside 
  6637.            of the United States.  Compilers and assemblers use NLS to support 
  6638.            locale-specific representations of various objects including 
  6639.            floating-point numbers ("." vs "," for separating decimal 
  6640.            fractions). There have been problems reported where the library 
  6641.            linked with GNU CC does not produce the same floating-point formats 
  6642.            that the assembler accepts.  If you have this problem, set the LANG 
  6643.            environment variable to "C" or "En_US". 
  6644.  
  6645.            Due to changes in the way that GNU CC invokes the binder (linker) 
  6646.            for AIX 4.1, you may now receive warnings of duplicate symbols from 
  6647.            the link step that were not reported before.  The assembly files 
  6648.            generated by GNU CC for AIX have always included multiple symbol 
  6649.            definitions for certain global variable and function declarations in 
  6650.            the original program.  The warnings should not prevent the linker 
  6651.            from producing a correct library or runnable executable. 
  6652.  
  6653.            By default, AIX 4.1 produces code that can be used on either Power 
  6654.            or PowerPC processors. 
  6655.  
  6656.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6657.            using the configure option '--with-cpu-'cpu_type. 
  6658.  
  6659.  'powerpc-*-elf' 
  6660.  
  6661.  'powerpc-*-sysv4' 
  6662.            PowerPC system in big endian mode, running System V.4. 
  6663.  
  6664.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6665.            using the configure option '--with-cpu-'cpu_type. 
  6666.  
  6667.  'powerpc-*-linux-gnu' 
  6668.            PowerPC system in big endian mode, running the Linux-based GNU 
  6669.            system. 
  6670.  
  6671.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6672.            using the configure option '--with-cpu-'cpu_type. 
  6673.  
  6674.  'powerpc-*-eabiaix' 
  6675.            Embedded PowerPC system in big endian mode with -mcall-aix selected 
  6676.            as the default. 
  6677.  
  6678.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6679.            using the configure option '--with-cpu-'cpu_type. 
  6680.  
  6681.  'powerpc-*-eabisim' 
  6682.            Embedded PowerPC system in big endian mode for use in running under 
  6683.            the PSIM simulator. 
  6684.  
  6685.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6686.            using the configure option '--with-cpu-'cpu_type. 
  6687.  
  6688.  'powerpc-*-eabi' 
  6689.            Embedded PowerPC system in big endian mode. 
  6690.  
  6691.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6692.            using the configure option '--with-cpu-'cpu_type. 
  6693.  
  6694.  'powerpcle-*-elf' 
  6695.  
  6696.  'powerpcle-*-sysv4' 
  6697.            PowerPC system in little endian mode, running System V.4. 
  6698.  
  6699.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6700.            using the configure option '--with-cpu-'cpu_type. 
  6701.  
  6702.  'powerpcle-*-solaris2*' 
  6703.            PowerPC system in little endian mode, running Solaris 2.5.1 or 
  6704.            higher. 
  6705.  
  6706.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6707.            using the configure option '--with-cpu-'cpu_type. Beta versions of 
  6708.            the Sun 4.0 compiler do not seem to be able to build GNU CC 
  6709.            correctly.  There are also problems with the host assembler and 
  6710.            linker that are fixed by using the GNU versions of these tools. 
  6711.  
  6712.  'powerpcle-*-eabisim' 
  6713.            Embedded PowerPC system in little endian mode for use in running 
  6714.            under the PSIM simulator. 
  6715.  
  6716.  'powerpcle-*-eabi' 
  6717.            Embedded PowerPC system in little endian mode. 
  6718.  
  6719.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6720.            using the configure option '--with-cpu-'cpu_type. 
  6721.  
  6722.  'powerpcle-*-winnt' 
  6723.  
  6724.  'powerpcle-*-pe' 
  6725.            PowerPC system in little endian mode running Windows NT. 
  6726.  
  6727.            You can specify a default version for the '-mcpu='cpu_type switch by 
  6728.            using the configure option '--with-cpu-'cpu_type. 
  6729.  
  6730.  'vax-dec-ultrix' 
  6731.            Don't try compiling with Vax C (vcc).  It produces incorrect code in 
  6732.            some cases (for example, when alloca is used). 
  6733.  
  6734.            Meanwhile, compiling 'cp/parse.c' with pcc does not work because of 
  6735.            an internal table size limitation in that compiler.  To avoid this 
  6736.            problem, compile just the GNU C compiler first, and use it to 
  6737.            recompile building all the languages that you want to run. 
  6738.  
  6739.  'sparc-sun-*' 
  6740.            See Sun Install, for information on installing GNU CC on Sun 
  6741.            systems. 
  6742.  
  6743.  'vax-dec-vms' 
  6744.            See VMS Install, for details on how to install GNU CC on VMS. 
  6745.  
  6746.  'we32k-*-*' 
  6747.            These computers are also known as the 3b2, 3b5, 3b20 and other 
  6748.            similar names.  (However, the 3b1 is actually a 68000; see 
  6749.            Configurations.) 
  6750.  
  6751.            Don't use '-g' when compiling with the system's compiler.  The 
  6752.            system's linker seems to be unable to handle such a large program 
  6753.            with debugging information. 
  6754.  
  6755.            The system's compiler runs out of capacity when compiling 'stmt.c' 
  6756.            in GNU CC.  You can work around this by building 'cpp' in GNU CC 
  6757.            first, then use that instead of the system's preprocessor with the 
  6758.            system's C compiler to compile 'stmt.c'.  Here is how: 
  6759.  
  6760.                                               mv /lib/cpp /lib/cpp.att
  6761.                                               cp cpp /lib/cpp.gnu
  6762.                                               echo '/lib/cpp.gnu -traditional ${1+"$@"}' > /lib/cpp
  6763.                                               chmod +x /lib/cpp
  6764.  
  6765.              The system's compiler produces bad code for some of the GNU CC 
  6766.              optimization files.  So you must build the stage 2 compiler 
  6767.              without optimization.  Then build a stage 3 compiler with 
  6768.              optimization. That executable should work.  Here are the necessary 
  6769.              commands: 
  6770.  
  6771.                                               make LANGUAGES=c CC=stage1/xgcc CFLAGS="-Bstage1/ -g"
  6772.                                               make stage2
  6773.                                               make CC=stage2/xgcc CFLAGS="-Bstage2/ -g -O"
  6774.  
  6775.              You may need to raise the ULIMIT setting to build a C++ compiler, 
  6776.              as the file 'cc1plus' is larger than one megabyte. 
  6777.  
  6778.  
  6779. ΓòÉΓòÉΓòÉ 5.2. Compilation in a Separate Directory ΓòÉΓòÉΓòÉ
  6780.  
  6781.  If you wish to build the object files and executables in a directory other 
  6782.  than the one containing the source files, here is what you must do 
  6783.  differently: 
  6784.  
  6785.    1. Make sure you have a version of Make that supports the VPATH feature. 
  6786.       (GNU Make supports it, as do Make versions on most BSD systems.) 
  6787.  
  6788.    2. If you have ever run 'configure' in the source directory, you must undo 
  6789.       the configuration.  Do this by running: 
  6790.  
  6791.                       make distclean
  6792.  
  6793.    3. Go to the directory in which you want to build the compiler before 
  6794.       running 'configure': 
  6795.  
  6796.                       mkdir gcc-sun3
  6797.                       cd gcc-sun3
  6798.  
  6799.  On systems that do not support symbolic links, this directory must be on the 
  6800.  same file system as the source code directory. 
  6801.  
  6802.    4. Specify where to find 'configure' when you run it: 
  6803.  
  6804.                       ┬╖┬╖/gcc/configure ┬╖┬╖┬╖
  6805.  
  6806.  This also tells configure where to find the compiler sources; configure takes 
  6807.  the directory from the file name that was used to invoke it.  But if you want 
  6808.  to be sure, you can specify the source directory with the '--srcdir' option, 
  6809.  like this: 
  6810.  
  6811.                       ┬╖┬╖/gcc/configure --srcdir=┬╖┬╖/gcc other options
  6812.  
  6813.  The directory you specify with '--srcdir' need not be the same as the one that 
  6814.  configure is found in. 
  6815.  
  6816.  Now, you can run make in that directory.  You need not repeat the 
  6817.  configuration steps shown above, when ordinary source files change.  You must, 
  6818.  however, run configure again when the configuration files change, if your 
  6819.  system does not support symbolic links. 
  6820.  
  6821.  
  6822. ΓòÉΓòÉΓòÉ 5.3. Building and Installing a Cross-Compiler ΓòÉΓòÉΓòÉ
  6823.  
  6824.  GNU CC can function as a cross-compiler for many machines, but not all. 
  6825.  
  6826.      Cross-compilers for the Mips as target using the Mips assembler currently 
  6827.       do not work, because the auxiliary programs 'mips-tdump.c' and 
  6828.       'mips-tfile.c' can't be compiled on anything but a Mips.  It does work to 
  6829.       cross compile for a Mips if you use the GNU assembler and linker. 
  6830.  
  6831.      Cross-compilers between machines with different floating point formats 
  6832.       have not all been made to work.  GNU CC now has a floating point emulator 
  6833.       with which these can work, but each target machine description needs to 
  6834.       be updated to take advantage of it. 
  6835.  
  6836.      Cross-compilation between machines of different word sizes is somewhat 
  6837.       problematic and sometimes does not work. 
  6838.  
  6839.  Since GNU CC generates assembler code, you probably need a cross-assembler 
  6840.  that GNU CC can run, in order to produce object files. If you want to link on 
  6841.  other than the target machine, you need a cross-linker as well.  You also need 
  6842.  header files and libraries suitable for the target machine that you can 
  6843.  install on the host machine. 
  6844.  
  6845.  Steps of Cross                Using a cross-compiler involves several steps 
  6846.                                that may be carried out on different machines. 
  6847.  Configure Cross               Configuring a cross-compiler. 
  6848.  Tools and Libraries           Where to put the linker and assembler, and the C 
  6849.                                library. 
  6850.  Cross Headers                 Finding and installing header files for a 
  6851.                                cross-compiler. 
  6852.  Cross Runtime                 Supplying arithmetic runtime routines 
  6853.                                ('libgcc1.a'). 
  6854.  Build Cross                   Actually compiling the cross-compiler. 
  6855.  
  6856.  
  6857. ΓòÉΓòÉΓòÉ 5.3.1. Steps of Cross-Compilation ΓòÉΓòÉΓòÉ
  6858.  
  6859.  To compile and run a program using a cross-compiler involves several steps: 
  6860.  
  6861.      Run the cross-compiler on the host machine to produce assembler files for 
  6862.       the target machine.  This requires header files for the target machine. 
  6863.  
  6864.      Assemble the files produced by the cross-compiler.  You can do this 
  6865.       either with an assembler on the target machine, or with a cross-assembler 
  6866.       on the host machine. 
  6867.  
  6868.      Link those files to make an executable.  You can do this either with a 
  6869.       linker on the target machine, or with a cross-linker on the host machine. 
  6870.       Whichever machine you use, you need libraries and certain startup files 
  6871.       (typically 'crt┬╖┬╖┬╖.o') for the target machine. 
  6872.  
  6873.  It is most convenient to do all of these steps on the same host machine, since 
  6874.  then you can do it all with a single invocation of GNU CC.  This requires a 
  6875.  suitable cross-assembler and cross-linker.  For some targets, the GNU 
  6876.  assembler and linker are available. 
  6877.  
  6878.  
  6879. ΓòÉΓòÉΓòÉ 5.3.2. Configuring a Cross-Compiler ΓòÉΓòÉΓòÉ
  6880.  
  6881.  To build GNU CC as a cross-compiler, you start out by running 'configure'. 
  6882.  Use the '--target=target' to specify the target type.  If 'configure' was 
  6883.  unable to correctly identify the system you are running on, also specify the 
  6884.  '--build=build' option.  For example, here is how to configure for a 
  6885.  cross-compiler that produces code for an HP 68030 system running BSD on a 
  6886.  system that 'configure' can correctly identify: 
  6887.  
  6888.                       ┬╖/configure --target=m68k-hp-bsd4.3
  6889.  
  6890.  
  6891. ΓòÉΓòÉΓòÉ 5.3.3. Tools and Libraries for a Cross-Compiler ΓòÉΓòÉΓòÉ
  6892.  
  6893.  If you have a cross-assembler and cross-linker available, you should install 
  6894.  them now.  Put them in the directory '/usr/local/target/bin'.  Here is a table 
  6895.  of the tools you should put in this directory: 
  6896.  
  6897.  as 
  6898.            This should be the cross-assembler. 
  6899.  
  6900.  ld 
  6901.            This should be the cross-linker. 
  6902.  
  6903.  ar 
  6904.            This should be the cross-archiver: a program which can manipulate 
  6905.            archive files (linker libraries) in the target machine's format. 
  6906.  
  6907.  ranlib 
  6908.            This should be a program to construct a symbol table in an archive 
  6909.            file. 
  6910.  
  6911.  The installation of GNU CC will find these programs in that directory, and 
  6912.  copy or link them to the proper place to for the cross-compiler to find them 
  6913.  when run later. 
  6914.  
  6915.  The easiest way to provide these files is to build the Binutils package and 
  6916.  GAS.  Configure them with the same '--host' and '--target' options that you 
  6917.  use for configuring GNU CC, then build and install them.  They install their 
  6918.  executables automatically into the proper directory.  Alas, they do not 
  6919.  support all the targets that GNU CC supports. 
  6920.  
  6921.  If you want to install libraries to use with the cross-compiler, such as a 
  6922.  standard C library, put them in the directory '/usr/local/target/lib'; 
  6923.  installation of GNU CC copies all the files in that subdirectory into the 
  6924.  proper place for GNU CC to find them and link with them.  Here's an example of 
  6925.  copying some libraries from a target machine: 
  6926.  
  6927.                       ftp target-machine
  6928.                       lcd /usr/local/target/lib
  6929.                       cd /lib
  6930.                       get libc.a
  6931.                       cd /usr/lib
  6932.                       get libg.a
  6933.                       get libm.a
  6934.                       quit
  6935.  
  6936.  The precise set of libraries you'll need, and their locations on the target 
  6937.  machine, vary depending on its operating system. 
  6938.  
  6939.  Many targets require ``start files'' such as 'crt0.o' and 'crtn.o' which are 
  6940.  linked into each executable; these too should be placed in 
  6941.  '/usr/local/target/lib'.  There may be several alternatives for 'crt0.o', for 
  6942.  use with profiling or other compilation options.  Check your target's 
  6943.  definition of STARTFILE_SPEC to find out what start files it uses. Here's an 
  6944.  example of copying these files from a target machine: 
  6945.  
  6946.                       ftp target-machine
  6947.                       lcd /usr/local/target/lib
  6948.                       prompt
  6949.                       cd /lib
  6950.                       mget *crt*.o
  6951.                       cd /usr/lib
  6952.                       mget *crt*.o
  6953.                       quit
  6954.  
  6955.  
  6956. ΓòÉΓòÉΓòÉ 5.3.4. 'libgcc.a' and Cross-Compilers ΓòÉΓòÉΓòÉ
  6957.  
  6958.  Code compiled by GNU CC uses certain runtime support functions implicitly. 
  6959.  Some of these functions can be compiled successfully with GNU CC itself, but a 
  6960.  few cannot be.  These problem functions are in the source file 'libgcc1.c'; 
  6961.  the library made from them is called 'libgcc1.a'. 
  6962.  
  6963.  When you build a native compiler, these functions are compiled with some other 
  6964.  compiler--the one that you use for bootstrapping GNU CC. Presumably it knows 
  6965.  how to open code these operations, or else knows how to call the run-time 
  6966.  emulation facilities that the machine comes with. But this approach doesn't 
  6967.  work for building a cross-compiler.  The compiler that you use for building 
  6968.  knows about the host system, not the target system. 
  6969.  
  6970.  So, when you build a cross-compiler you have to supply a suitable library 
  6971.  'libgcc1.a' that does the job it is expected to do. 
  6972.  
  6973.  To compile 'libgcc1.c' with the cross-compiler itself does not work.  The 
  6974.  functions in this file are supposed to implement arithmetic operations that 
  6975.  GNU CC does not know how to open code for your target machine.  If these 
  6976.  functions are compiled with GNU CC itself, they will compile into infinite 
  6977.  recursion. 
  6978.  
  6979.  On any given target, most of these functions are not needed.  If GNU CC can 
  6980.  open code an arithmetic operation, it will not call these functions to perform 
  6981.  the operation.  It is possible that on your target machine, none of these 
  6982.  functions is needed.  If so, you can supply an empty library as 'libgcc1.a'. 
  6983.  
  6984.  Many targets need library support only for multiplication and division. If you 
  6985.  are linking with a library that contains functions for multiplication and 
  6986.  division, you can tell GNU CC to call them directly by defining the macros 
  6987.  MULSI3_LIBCALL, and the like.  These macros need to be defined in the target 
  6988.  description macro file.  For some targets, they are defined already.  This may 
  6989.  be sufficient to avoid the need for libgcc1.a; if so, you can supply an empty 
  6990.  library. 
  6991.  
  6992.  Some targets do not have floating point instructions; they need other 
  6993.  functions in 'libgcc1.a', which do floating arithmetic. Recent versions of GNU 
  6994.  CC have a file which emulates floating point. With a certain amount of work, 
  6995.  you should be able to construct a floating point emulator that can be used as 
  6996.  'libgcc1.a'.  Perhaps future versions will contain code to do this 
  6997.  automatically and conveniently.  That depends on whether someone wants to 
  6998.  implement it. 
  6999.  
  7000.  Some embedded targets come with all the necessary 'libgcc1.a' routines written 
  7001.  in C or assembler.  These targets build 'libgcc1.a' automatically and you do 
  7002.  not need to do anything special for them.  Other embedded targets do not need 
  7003.  any 'libgcc1.a' routines since all the necessary operations are supported by 
  7004.  the hardware. 
  7005.  
  7006.  If your target system has another C compiler, you can configure GNU CC as a 
  7007.  native compiler on that machine, build just 'libgcc1.a' with 'make libgcc1.a' 
  7008.  on that machine, and use the resulting file with the cross-compiler.  To do 
  7009.  this, execute the following on the target machine: 
  7010.  
  7011.                       cd target-build-dir
  7012.                       ┬╖/configure --host=sparc --target=sun3
  7013.                       make libgcc1.a
  7014.  
  7015.  And then this on the host machine: 
  7016.  
  7017.                       ftp target-machine
  7018.                       binary
  7019.                       cd target-build-dir
  7020.                       get libgcc1.a
  7021.                       quit
  7022.  
  7023.  Another way to provide the functions you need in 'libgcc1.a' is to define the 
  7024.  appropriate perform_┬╖┬╖┬╖ macros for those functions.  If these definitions do 
  7025.  not use the C arithmetic operators that they are meant to implement, you 
  7026.  should be able to compile them with the cross-compiler you are building.  (If 
  7027.  these definitions already exist for your target file, then you are all set.) 
  7028.  
  7029.  To build 'libgcc1.a' using the perform macros, use 'LIBGCC1=libgcc1.a 
  7030.  OLDCC=./xgcc' when building the compiler. Otherwise, you should place your 
  7031.  replacement library under the name 'libgcc1.a' in the directory in which you 
  7032.  will build the cross-compiler, before you run make. 
  7033.  
  7034.  
  7035. ΓòÉΓòÉΓòÉ 5.3.5. Cross-Compilers and Header Files ΓòÉΓòÉΓòÉ
  7036.  
  7037.  If you are cross-compiling a standalone program or a program for an embedded 
  7038.  system, then you may not need any header files except the few that are part of 
  7039.  GNU CC (and those of your program).  However, if you intend to link your 
  7040.  program with a standard C library such as 'libc.a', then you probably need to 
  7041.  compile with the header files that go with the library you use. 
  7042.  
  7043.  The GNU C compiler does not come with these files, because (1) they are 
  7044.  system-specific, and (2) they belong in a C library, not in a compiler. 
  7045.  
  7046.  If the GNU C library supports your target machine, then you can get the header 
  7047.  files from there (assuming you actually use the GNU library when you link your 
  7048.  program). 
  7049.  
  7050.  If your target machine comes with a C compiler, it probably comes with 
  7051.  suitable header files also.  If you make these files accessible from the host 
  7052.  machine, the cross-compiler can use them also. 
  7053.  
  7054.  Otherwise, you're on your own in finding header files to use when 
  7055.  cross-compiling. 
  7056.  
  7057.  When you have found suitable header files, put them in the directory 
  7058.  '/usr/local/target/include', before building the cross compiler.  Then 
  7059.  installation will run fixincludes properly and install the corrected versions 
  7060.  of the header files where the compiler will use them. 
  7061.  
  7062.  Provide the header files before you build the cross-compiler, because the 
  7063.  build stage actually runs the cross-compiler to produce parts of 'libgcc.a'. 
  7064.  (These are the parts that can be compiled with GNU CC.)  Some of them need 
  7065.  suitable header files. 
  7066.  
  7067.  Here's an example showing how to copy the header files from a target machine. 
  7068.  On the target machine, do this: 
  7069.  
  7070.                       (cd /usr/include; tar cf - .) > tarfile
  7071.  
  7072.  Then, on the host machine, do this: 
  7073.  
  7074.                       ftp target-machine
  7075.                       lcd /usr/local/target/include
  7076.                       get tarfile
  7077.                       quit
  7078.                       tar xf tarfile
  7079.  
  7080.  
  7081. ΓòÉΓòÉΓòÉ 5.3.6. Actually Building the Cross-Compiler ΓòÉΓòÉΓòÉ
  7082.  
  7083.  Now you can proceed just as for compiling a single-machine compiler through 
  7084.  the step of building stage 1.  If you have not provided some sort of 
  7085.  'libgcc1.a', then compilation will give up at the point where it needs that 
  7086.  file, printing a suitable error message.  If you do provide 'libgcc1.a', then 
  7087.  building the compiler will automatically compile and link a test program 
  7088.  called 'libgcc1-test'; if you get errors in the linking, it means that not all 
  7089.  of the necessary routines in 'libgcc1.a' are available. 
  7090.  
  7091.  You must provide the header file 'float.h'.  One way to do this is to compile 
  7092.  'enquire' and run it on your target machine.  The job of 'enquire' is to run 
  7093.  on the target machine and figure out by experiment the nature of its floating 
  7094.  point representation. 'enquire' records its findings in the header file 
  7095.  'float.h'. If you can't produce this file by running 'enquire' on the target 
  7096.  machine, then you will need to come up with a suitable 'float.h' in some other 
  7097.  way (or else, avoid using it in your programs). 
  7098.  
  7099.  Do not try to build stage 2 for a cross-compiler.  It doesn't work to rebuild 
  7100.  GNU CC as a cross-compiler using the cross-compiler, because that would 
  7101.  produce a program that runs on the target machine, not on the host.  For 
  7102.  example, if you compile a 386-to-68030 cross-compiler with itself, the result 
  7103.  will not be right either for the 386 (because it was compiled into 68030 code) 
  7104.  or for the 68030 (because it was configured for a 386 as the host).  If you 
  7105.  want to compile GNU CC into 68030 code, whether you compile it on a 68030 or 
  7106.  with a cross-compiler on a 386, you must specify a 68030 as the host when you 
  7107.  configure it. 
  7108.  
  7109.  To install the cross-compiler, use 'make install', as usual. 
  7110.  
  7111.  
  7112. ΓòÉΓòÉΓòÉ 5.4. Installing GNU CC on the Sun ΓòÉΓòÉΓòÉ
  7113.  
  7114.  On Solaris, do not use the linker or other tools in '/usr/ucb' to build GNU 
  7115.  CC.  Use /usr/ccs/bin. 
  7116.  
  7117.  If the assembler reports 'Error: misaligned data' when bootstrapping, you are 
  7118.  probably using an obsolete version of the GNU assembler.  Upgrade to the 
  7119.  latest version of GNU binutils, or use the Solaris assembler. 
  7120.  
  7121.  Make sure the environment variable FLOAT_OPTION is not set when you compile 
  7122.  'libgcc.a'.  If this option were set to f68881 when 'libgcc.a' is compiled, 
  7123.  the resulting code would demand to be linked with a special startup file and 
  7124.  would not link properly without special pains. 
  7125.  
  7126.  There is a bug in alloca in certain versions of the Sun library. To avoid this 
  7127.  bug, install the binaries of GNU CC that were compiled by GNU CC.  They use 
  7128.  alloca as a built-in function and never the one in the library. 
  7129.  
  7130.  Some versions of the Sun compiler crash when compiling GNU CC.  The problem is 
  7131.  a segmentation fault in cpp.  This problem seems to be due to the bulk of data 
  7132.  in the environment variables.  You may be able to avoid it by using the 
  7133.  following command to compile GNU CC with Sun CC: 
  7134.  
  7135.                       make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
  7136.  
  7137.  SunOS 4.1.3 and 4.1.3_U1 have bugs that can cause intermittent core dumps when 
  7138.  compiling GNU CC.  A common symptom is an internal compiler error which does 
  7139.  not recur if you run it again. To fix the problem, install Sun recommended 
  7140.  patch 100726 (for SunOS 4.1.3) or 101508 (for SunOS 4.1.3_U1), or upgrade to a 
  7141.  later SunOS release. 
  7142.  
  7143.  
  7144. ΓòÉΓòÉΓòÉ 5.5. Installing GNU CC on VMS ΓòÉΓòÉΓòÉ
  7145.  
  7146.  The VMS version of GNU CC is distributed in a backup saveset containing both 
  7147.  source code and precompiled binaries. 
  7148.  
  7149.  To install the 'gcc' command so you can use the compiler easily, in the same 
  7150.  manner as you use the VMS C compiler, you must install the VMS CLD file for 
  7151.  GNU CC as follows: 
  7152.  
  7153.    1. Define the VMS logical names 'GNU_CC' and 'GNU_CC_INCLUDE' to point to 
  7154.       the directories where the GNU CC executables ('gcc-cpp.exe', 
  7155.       'gcc-cc1.exe', etc.) and the C include files are kept respectively.  This 
  7156.       should be done with the commands: 
  7157.  
  7158.                       $ assign /system /translation=concealed -
  7159.                        disk:[gcc.] gnu_cc
  7160.                       $ assign /system /translation=concealed -
  7161.                        disk:[gcc.include.] gnu_cc_include
  7162.  
  7163.  with the appropriate disk and directory names.  These commands can be placed 
  7164.  in your system startup file so they will be executed whenever the machine is 
  7165.  rebooted.  You may, if you choose, do this via the 'GCC_INSTALL.COM' script in 
  7166.  the '[GCC]' directory. 
  7167.  
  7168.    2. Install the 'GCC' command with the command line: 
  7169.  
  7170.                       $ set command /table=sys$common:[syslib]dcltables -
  7171.                        /output=sys$common:[syslib]dcltables gnu_cc:[000000]gcc
  7172.                       $ install replace sys$common:[syslib]dcltables
  7173.  
  7174.    3. To install the help file, do the following: 
  7175.  
  7176.                       $ library/help sys$library:helplib.hlb gcc.hlp
  7177.  
  7178.  Now you can invoke the compiler with a command like 'gcc /verbose file.c', 
  7179.  which is equivalent to the command 'gcc -v -c file.c' in Unix. 
  7180.  
  7181.  If you wish to use GNU C++ you must first install GNU CC, and then perform the 
  7182.  following steps: 
  7183.  
  7184.    1. Define the VMS logical name 'GNU_GXX_INCLUDE' to point to the directory 
  7185.       where the preprocessor will search for the C++ header files. This can be 
  7186.       done with the command: 
  7187.  
  7188.                       $ assign /system /translation=concealed -
  7189.                        disk:[gcc.gxx_include.] gnu_gxx_include
  7190.  
  7191.  with the appropriate disk and directory name.  If you are going to be using a 
  7192.  C++ runtime library, this is where its install procedure will install its 
  7193.  header files. 
  7194.  
  7195.    2. Obtain the file 'gcc-cc1plus.exe', and place this in the same directory 
  7196.       that 'gcc-cc1.exe' is kept. 
  7197.  
  7198.       The GNU C++ compiler can be invoked with a command like 'gcc /plus 
  7199.       /verbose file.cc', which is equivalent to the command 'g++ -v -c file.cc' 
  7200.       in Unix. 
  7201.  
  7202.  We try to put corresponding binaries and sources on the VMS distribution tape. 
  7203.  But sometimes the binaries will be from an older version than the sources, 
  7204.  because we don't always have time to update them.  (Use the '/version' option 
  7205.  to determine the version number of the binaries and compare it with the source 
  7206.  file 'version.c' to tell whether this is so.)  In this case, you should use 
  7207.  the binaries you get to recompile the sources.  If you must recompile, here is 
  7208.  how: 
  7209.  
  7210.    1. Execute the command procedure 'vmsconfig.com' to set up the files 'tm.h', 
  7211.       'config.h', 'aux-output.c', and 'md.', and to create files 'tconfig.h' 
  7212.       and 'hconfig.h'.  This procedure also creates several linker option files 
  7213.       used by 'make-cc1.com' and a data file used by 'make-l2.com'. 
  7214.  
  7215.                       $ @vmsconfig.com
  7216.  
  7217.    2. Setup the logical names and command tables as defined above.  In 
  7218.       addition, define the VMS logical name 'GNU_BISON' to point at the to the 
  7219.       directories where the Bison executable is kept.  This should be done with 
  7220.       the command: 
  7221.  
  7222.                       $ assign /system /translation=concealed -
  7223.                        disk:[bison.] gnu_bison
  7224.  
  7225.  You may, if you choose, use the 'INSTALL_BISON.COM' script in the '[BISON]' 
  7226.  directory. 
  7227.  
  7228.    3. Install the 'BISON' command with the command line: 
  7229.  
  7230.                       $ set command /table=sys$common:[syslib]dcltables -
  7231.                        /output=sys$common:[syslib]dcltables -
  7232.                        gnu_bison:[000000]bison
  7233.                       $ install replace sys$common:[syslib]dcltables
  7234.  
  7235.    4. Type '@make-gcc' to recompile everything (alternatively, submit the file 
  7236.       'make-gcc.com' to a batch queue).  If you wish to build the GNU C++ 
  7237.       compiler as well as the GNU CC compiler, you must first edit 
  7238.       'make-gcc.com' and follow the instructions that appear in the comments. 
  7239.  
  7240.    5. In order to use GCC, you need a library of functions which GCC compiled 
  7241.       code will call to perform certain tasks, and these functions are defined 
  7242.       in the file 'libgcc2.c'.  To compile this you should use the command 
  7243.       procedure 'make-l2.com', which will generate the library 'libgcc2.olb'. 
  7244.       'libgcc2.olb' should be built using the compiler built from the same 
  7245.       distribution that 'libgcc2.c' came from, and 'make-gcc.com' will 
  7246.       automatically do all of this for you. 
  7247.  
  7248.       To install the library, use the following commands: 
  7249.  
  7250.                       $ library gnu_cc:[000000]gcclib/delete=(new,eprintf)
  7251.                       $ library gnu_cc:[000000]gcclib/delete=L_*
  7252.                       $ library libgcc2/extract=*/output=libgcc2.obj
  7253.                       $ library gnu_cc:[000000]gcclib libgcc2.obj
  7254.  
  7255.  The first command simply removes old modules that will be replaced with 
  7256.  modules from 'libgcc2' under different module names.  The modules new and 
  7257.  eprintf may not actually be present in your 'gcclib.olb'---if the VMS 
  7258.  librarian complains about those modules not being present, simply ignore the 
  7259.  message and continue on with the next command.  The second command removes the 
  7260.  modules that came from the previous version of the library 'libgcc2.c'. 
  7261.  
  7262.  Whenever you update the compiler on your system, you should also update the 
  7263.  library with the above procedure. 
  7264.  
  7265.    6. You may wish to build GCC in such a way that no files are written to the 
  7266.       directory where the source files reside.  An example would be the when 
  7267.       the source files are on a read-only disk.  In these cases, execute the 
  7268.       following DCL commands (substituting your actual path names): 
  7269.  
  7270.                       $ assign dua0:[gcc.build_dir.]/translation=concealed, -
  7271.                            dua1:[gcc.source_dir.]/translation=concealed  gcc_build
  7272.                       $ set default gcc_build:[000000]
  7273.  
  7274.  where the directory 'dua1:[gcc.source_dir]' contains the source code, and the 
  7275.  directory 'dua0:[gcc.build_dir]' is meant to contain all of the generated 
  7276.  object files and executables.  Once you have done this, you can proceed 
  7277.  building GCC as described above.  (Keep in mind that 'gcc_build' is a rooted 
  7278.  logical name, and thus the device names in each element of the search list 
  7279.  must be an actual physical device name rather than another rooted logical 
  7280.  name). 
  7281.  
  7282.    7. If you are building GNU CC with a previous version of GNU CC, you also 
  7283.       should check to see that you have the newest version of the assembler. 
  7284.       In particular, GNU CC version 2 treats global constant variables slightly 
  7285.       differently from GNU CC version 1, and GAS version 1.38.1 does not have 
  7286.       the patches required to work with GCC version 2. If you use GAS 1.38.1, 
  7287.       then extern const variables will not have the read-only bit set, and the 
  7288.       linker will generate warning messages about mismatched psect attributes 
  7289.       for these variables.  These warning messages are merely a nuisance, and 
  7290.       can safely be ignored. 
  7291.  
  7292.       If you are compiling with a version of GNU CC older than 1.33, specify 
  7293.       '/DEFINE=("inline=")' as an option in all the compilations.  This 
  7294.       requires editing all the gcc commands in 'make-cc1.com'. (The older 
  7295.       versions had problems supporting inline.)  Once you have a working 1.33 
  7296.       or newer GNU CC, you can change this file back. 
  7297.  
  7298.    8. If you want to build GNU CC with the VAX C compiler, you will need to 
  7299.       make minor changes in 'make-cccp.com' and 'make-cc1.com' to choose 
  7300.       alternate definitions of CC, CFLAGS, and LIBS.  See comments in those 
  7301.       files.  However, you must also have a working version of the GNU 
  7302.       assembler (GNU as, aka GAS) as it is used as the back-end for GNU CC to 
  7303.       produce binary object modules and is not included in the GNU CC sources. 
  7304.       GAS is also needed to compile 'libgcc2' in order to build 'gcclib' (see 
  7305.       above); 'make-l2.com' expects to be able to find it operational in 
  7306.       'gnu_cc:[000000]gnu-as.exe'. 
  7307.  
  7308.       To use GNU CC on VMS, you need the VMS driver programs 'gcc.exe', 
  7309.       'gcc.com', and 'gcc.cld'.  They are distributed with the VMS binaries 
  7310.       ('gcc-vms') rather than the GNU CC sources.  GAS is also included in 
  7311.       'gcc-vms', as is Bison. 
  7312.  
  7313.       Once you have successfully built GNU CC with VAX C, you should use the 
  7314.       resulting compiler to rebuild itself.  Before doing this, be sure to 
  7315.       restore the CC, CFLAGS, and LIBS definitions in 'make-cccp.com' and 
  7316.       'make-cc1.com'.  The second generation compiler will be able to take 
  7317.       advantage of many optimizations that must be suppressed when building 
  7318.       with other compilers. 
  7319.  
  7320.  Under previous versions of GNU CC, the generated code would occasionally give 
  7321.  strange results when linked with the sharable 'VAXCRTL' library. Now this 
  7322.  should work. 
  7323.  
  7324.  Even with this version, however, GNU CC itself should not be linked with the 
  7325.  sharable 'VAXCRTL'.  The version of qsort in 'VAXCRTL' has a bug (known to be 
  7326.  present in VMS versions V4.6 through V5.5) which causes the compiler to fail. 
  7327.  
  7328.  The executables are generated by 'make-cc1.com' and 'make-cccp.com' use the 
  7329.  object library version of 'VAXCRTL' in order to make use of the qsort routine 
  7330.  in 'gcclib.olb'.  If you wish to link the compiler executables with the 
  7331.  shareable image version of 'VAXCRTL', you should edit the file 'tm.h' (created 
  7332.  by 'vmsconfig.com') to define the macro QSORT_WORKAROUND. 
  7333.  
  7334.  QSORT_WORKAROUND is always defined when GNU CC is compiled with VAX C, to 
  7335.  avoid a problem in case 'gcclib.olb' is not yet available. 
  7336.  
  7337.  
  7338. ΓòÉΓòÉΓòÉ 5.6. collect2 ΓòÉΓòÉΓòÉ
  7339.  
  7340.  Many target systems do not have support in the assembler and linker for 
  7341.  ``constructors''---initialization functions to be called before the official 
  7342.  ``start'' of main.  On such systems, GNU CC uses a utility called collect2 to 
  7343.  arrange to call these functions at start time. 
  7344.  
  7345.  The program collect2 works by linking the program once and looking through the 
  7346.  linker output file for symbols with particular names indicating they are 
  7347.  constructor functions.  If it finds any, it creates a new temporary '.c' file 
  7348.  containing a table of them, compiles it, and links the program a second time 
  7349.  including that file. 
  7350.  
  7351.  The actual calls to the constructors are carried out by a subroutine called 
  7352.  __main, which is called (automatically) at the beginning of the body of main 
  7353.  (provided main was compiled with GNU CC).  Calling __main is necessary, even 
  7354.  when compiling C code, to allow linking C and C++ object code together.  (If 
  7355.  you use '-nostdlib', you get an unresolved reference to __main, since it's 
  7356.  defined in the standard GCC library.  Include '-lgcc' at the end of your 
  7357.  compiler command line to resolve this reference.) 
  7358.  
  7359.  The program collect2 is installed as ld in the directory where the passes of 
  7360.  the compiler are installed.  When collect2 needs to find the real ld, it tries 
  7361.  the following file names: 
  7362.  
  7363.      'real-ld' in the directories listed in the compiler's search directories. 
  7364.  
  7365.      'real-ld' in the directories listed in the environment variable PATH. 
  7366.  
  7367.      The file specified in the REAL_LD_FILE_NAME configuration macro, if 
  7368.       specified. 
  7369.  
  7370.      'ld' in the compiler's search directories, except that collect2 will not 
  7371.       execute itself recursively. 
  7372.  
  7373.      'ld' in PATH. 
  7374.  
  7375.  ``The compiler's search directories'' means all the directories where gcc 
  7376.  searches for passes of the compiler.  This includes directories that you 
  7377.  specify with '-B'. 
  7378.  
  7379.  Cross-compilers search a little differently: 
  7380.  
  7381.      'real-ld' in the compiler's search directories. 
  7382.  
  7383.      'target-real-ld' in PATH. 
  7384.  
  7385.      The file specified in the REAL_LD_FILE_NAME configuration macro, if 
  7386.       specified. 
  7387.  
  7388.      'ld' in the compiler's search directories. 
  7389.  
  7390.      'target-ld' in PATH. 
  7391.  
  7392.  collect2 explicitly avoids running ld using the file name under which collect2 
  7393.  itself was invoked.  In fact, it remembers up a list of such names---in case 
  7394.  one copy of collect2 finds another copy (or version) of collect2 installed as 
  7395.  ld in a second place in the search path. 
  7396.  
  7397.  collect2 searches for the utilities nm and strip using the same algorithm as 
  7398.  above for ld. 
  7399.  
  7400.  
  7401. ΓòÉΓòÉΓòÉ 5.7. Standard Header File Directories ΓòÉΓòÉΓòÉ
  7402.  
  7403.  GCC_INCLUDE_DIR means the same thing for native and cross.  It is where GNU CC 
  7404.  stores its private include files, and also where GNU CC stores the fixed 
  7405.  include files.  A cross compiled GNU CC runs fixincludes on the header files 
  7406.  in '$(tooldir)/include'. (If the cross compilation header files need to be 
  7407.  fixed, they must be installed before GNU CC is built.  If the cross 
  7408.  compilation header files are already suitable for ANSI C and GNU CC, nothing 
  7409.  special need be done). 
  7410.  
  7411.  GPLUS_INCLUDE_DIR means the same thing for native and cross.  It is where g++ 
  7412.  looks first for header files.  The C++ library installs only target 
  7413.  independent header files in that directory. 
  7414.  
  7415.  LOCAL_INCLUDE_DIR is used only for a native compiler.  It is normally 
  7416.  '/usr/local/include'.  GNU CC searches this directory so that users can 
  7417.  install header files in '/usr/local/include'. 
  7418.  
  7419.  CROSS_INCLUDE_DIR is used only for a cross compiler.  GNU CC doesn't install 
  7420.  anything there. 
  7421.  
  7422.  TOOL_INCLUDE_DIR is used for both native and cross compilers.  It is the place 
  7423.  for other packages to install header files that GNU CC will use.  For a 
  7424.  cross-compiler, this is the equivalent of '/usr/include'.  When you build a 
  7425.  cross-compiler, fixincludes processes any header files in this directory. 
  7426.  
  7427.  
  7428. ΓòÉΓòÉΓòÉ 6. Extensions to the C Language Family ΓòÉΓòÉΓòÉ
  7429.  
  7430.  GNU C provides several language features not found in ANSI standard C. (The 
  7431.  '-pedantic' option directs GNU CC to print a warning message if any of these 
  7432.  features is used.)  To test for the availability of these features in 
  7433.  conditional compilation, check for a predefined macro __GNUC__, which is 
  7434.  always defined under GNU CC. 
  7435.  
  7436.  These extensions are available in C and Objective C.  Most of them are also 
  7437.  available in C++.  See Extensions to the C++ Language, for extensions that 
  7438.  apply only to C++. 
  7439.  
  7440.  Statement Exprs               Putting statements and declarations inside 
  7441.                                expressions. 
  7442.  Local Labels                  Labels local to a statement-expression. 
  7443.  Labels as Values              Getting pointers to labels, and computed gotos. 
  7444.  Nested Functions              As in Algol and Pascal, lexical scoping of 
  7445.                                functions. 
  7446.  Constructing Calls            Dispatching a call to another function. 
  7447.  Naming Types                  Giving a name to the type of some expression. 
  7448.  Typeof                        typeof: referring to the type of an expression. 
  7449.  Lvalues                       Using '?:', ',' and casts in lvalues. 
  7450.  Conditionals                  Omitting the middle operand of a '?:' 
  7451.                                expression. 
  7452.  Long Long                     Double-word integers---long long int. 
  7453.  Complex                       Data types for complex numbers. 
  7454.  Zero Length                   Zero-length arrays. 
  7455.  Variable Length               Arrays whose length is computed at run time. 
  7456.  Macro Varargs                 Macros with variable number of arguments. 
  7457.  Subscripting                  Any array can be subscripted, even if not an 
  7458.                                lvalue. 
  7459.  Pointer Arith                 Arithmetic on void-pointers and function 
  7460.                                pointers. 
  7461.  Initializers                  Non-constant initializers. 
  7462.  Constructors                  Constructor expressions give structures, unions 
  7463.                                or arrays as values. 
  7464.  Labeled Elements              Labeling elements of initializers. 
  7465.  Cast to Union                 Casting to union type from any member of the 
  7466.                                union. 
  7467.  Case Ranges                   `case 1 ┬╖┬╖┬╖ 9' and such. 
  7468.  Function Attributes           Declaring that functions have no side effects, 
  7469.                                or that they can never return. 
  7470.  Function Prototypes           Prototype declarations and old-style 
  7471.                                definitions. 
  7472.  C++ Comments                  C++ comments are recognized. 
  7473.  Dollar Signs                  Dollar sign is allowed in identifiers. 
  7474.  Character Escapes             '\e' stands for the character ESC. 
  7475.  Variable Attributes           Specifying attributes of variables. 
  7476.  Type Attributes               Specifying attributes of types. 
  7477.  Alignment                     Inquiring about the alignment of a type or 
  7478.                                variable. 
  7479.  Inline                        Defining inline functions (as fast as macros). 
  7480.  Extended Asm                  Assembler instructions with C expressions as 
  7481.                                operands. (With them you can define ``built-in'' 
  7482.                                functions.) 
  7483.  Constraints                   Constraints for asm operands 
  7484.  Asm Labels                    Specifying the assembler name to use for a C 
  7485.                                symbol. 
  7486.  Explicit Reg Vars             Defining variables residing in specified 
  7487.                                registers. 
  7488.  Alternate Keywords            __const__, __asm__, etc., for header files. 
  7489.  Incomplete Enums              enum foo;, with details to follow. 
  7490.  Function Names                Printable strings which are the name of the 
  7491.                                current function. 
  7492.  Return Address                Getting the return or frame address of a 
  7493.                                function. 
  7494.  
  7495.  
  7496. ΓòÉΓòÉΓòÉ 6.1. Statements and Declarations in Expressions ΓòÉΓòÉΓòÉ
  7497.  
  7498.  A compound statement enclosed in parentheses may appear as an expression in 
  7499.  GNU C.  This allows you to use loops, switches, and local variables within an 
  7500.  expression. 
  7501.  
  7502.  Recall that a compound statement is a sequence of statements surrounded by 
  7503.  braces; in this construct, parentheses go around the braces.  For example: 
  7504.  
  7505.                       ({ int y = foo (); int z;
  7506.                         if (y > 0) z = y;
  7507.                         else z = - y;
  7508.                         z; })
  7509.  
  7510.  is a valid (though slightly more complex than necessary) expression for the 
  7511.  absolute value of foo (). 
  7512.  
  7513.  The last thing in the compound statement should be an expression followed by a 
  7514.  semicolon; the value of this subexpression serves as the value of the entire 
  7515.  construct.  (If you use some other kind of statement last within the braces, 
  7516.  the construct has type void, and thus effectively no value.) 
  7517.  
  7518.  This feature is especially useful in making macro definitions ``safe'' (so 
  7519.  that they evaluate each operand exactly once).  For example, the ``maximum'' 
  7520.  function is commonly defined as a macro in standard C as follows: 
  7521.  
  7522.                       #define max(a,b) ((a) > (b) ? (a) : (b))
  7523.  
  7524.  But this definition computes either a or b twice, with bad results if the 
  7525.  operand has side effects.  In GNU C, if you know the type of the operands 
  7526.  (here let's assume int), you can define the macro safely as follows: 
  7527.  
  7528.                       #define maxint(a,b) \
  7529.                        ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
  7530.  
  7531.  Embedded statements are not allowed in constant expressions, such as the value 
  7532.  of an enumeration constant, the width of a bit field, or the initial value of 
  7533.  a static variable. 
  7534.  
  7535.  If you don't know the type of the operand, you can still do this, but you must 
  7536.  use typeof (see Typeof) or type naming (see Naming Types). 
  7537.  
  7538.  
  7539. ΓòÉΓòÉΓòÉ 6.2. Locally Declared Labels ΓòÉΓòÉΓòÉ
  7540.  
  7541.  Each statement expression is a scope in which local labels can be declared.  A 
  7542.  local label is simply an identifier; you can jump to it with an ordinary goto 
  7543.  statement, but only from within the statement expression it belongs to. 
  7544.  
  7545.  A local label declaration looks like this: 
  7546.  
  7547.                       __label__ label;
  7548.  
  7549.  or 
  7550.  
  7551.                       __label__ label1, label2, ┬╖┬╖┬╖;
  7552.  
  7553.  Local label declarations must come at the beginning of the statement 
  7554.  expression, right after the '({', before any ordinary declarations. 
  7555.  
  7556.  The label declaration defines the label name, but does not define the label 
  7557.  itself.  You must do this in the usual way, with label:, within the statements 
  7558.  of the statement expression. 
  7559.  
  7560.  The local label feature is useful because statement expressions are often used 
  7561.  in macros.  If the macro contains nested loops, a goto can be useful for 
  7562.  breaking out of them.  However, an ordinary label whose scope is the whole 
  7563.  function cannot be used: if the macro can be expanded several times in one 
  7564.  function, the label will be multiply defined in that function.  A local label 
  7565.  avoids this problem.  For example: 
  7566.  
  7567.                       #define SEARCH(array, target)           \
  7568.                       ({                        \
  7569.                        __label__ found;                 \
  7570.                        typeof (target) _SEARCH_target = (target);    \
  7571.                        typeof (*(array)) *_SEARCH_array = (array);   \
  7572.                        int i, j;                    \
  7573.                        int value;                    \
  7574.                        for (i = 0; i < max; i++)            \
  7575.                         for (j = 0; j < max; j++)           \
  7576.                          if (_SEARCH_array[i][j] == _SEARCH_target)  \
  7577.                           { value = i; goto found; }        \
  7578.                        value = -1;                   \
  7579.                        found:                      \
  7580.                        value;                      \
  7581.                       })
  7582.  
  7583.  
  7584. ΓòÉΓòÉΓòÉ 6.3. Labels as Values ΓòÉΓòÉΓòÉ
  7585.  
  7586.  You can get the address of a label defined in the current function (or a 
  7587.  containing function) with the unary operator '&&'.  The value has type void *. 
  7588.  This value is a constant and can be used wherever a constant of that type is 
  7589.  valid.  For example: 
  7590.  
  7591.                       void *ptr;
  7592.                       ┬╖┬╖┬╖
  7593.                       ptr = &&foo;
  7594.  
  7595.  To use these values, you need to be able to jump to one.  This is done with 
  7596.  the computed goto statement (2), goto *exp;.  For example, 
  7597.  
  7598.                       goto *ptr;
  7599.  
  7600.  Any expression of type void * is allowed. 
  7601.  
  7602.  One way of using these constants is in initializing a static array that will 
  7603.  serve as a jump table: 
  7604.  
  7605.                       static void *array[] = { &&foo, &&bar, &&hack };
  7606.  
  7607.  Then you can select a label with indexing, like this: 
  7608.  
  7609.                       goto *array[i];
  7610.  
  7611.  Note that this does not check whether the subscript is in bounds---array 
  7612.  indexing in C never does that. 
  7613.  
  7614.  Such an array of label values serves a purpose much like that of the switch 
  7615.  statement.  The switch statement is cleaner, so use that rather than an array 
  7616.  unless the problem does not fit a switch statement very well. 
  7617.  
  7618.  Another use of label values is in an interpreter for threaded code. The labels 
  7619.  within the interpreter function can be stored in the threaded code for 
  7620.  super-fast dispatching. 
  7621.  
  7622.  You can use this mechanism to jump to code in a different function.  If you do 
  7623.  that, totally unpredictable things will happen.  The best way to avoid this is 
  7624.  to store the label address only in automatic variables and never pass it as an 
  7625.  argument. 
  7626.  
  7627.  
  7628. ΓòÉΓòÉΓòÉ 6.4. Nested Functions ΓòÉΓòÉΓòÉ
  7629.  
  7630.  A nested function is a function defined inside another function. (Nested 
  7631.  functions are not supported for GNU C++.)  The nested function's name is local 
  7632.  to the block where it is defined.  For example, here we define a nested 
  7633.  function named square, and call it twice: 
  7634.  
  7635.                       foo (double a, double b)
  7636.                       {
  7637.                        double square (double z) { return z * z; }
  7638.                        return square (a) + square (b);
  7639.                       }
  7640.  
  7641.  The nested function can access all the variables of the containing function 
  7642.  that are visible at the point of its definition.  This is called lexical 
  7643.  scoping.  For example, here we show a nested function which uses an inherited 
  7644.  variable named offset: 
  7645.  
  7646.                       bar (int *array, int offset, int size)
  7647.                       {
  7648.                        int access (int *array, int index)
  7649.                         { return array[index + offset]; }
  7650.                        int i;
  7651.                        ┬╖┬╖┬╖
  7652.                        for (i = 0; i < size; i++)
  7653.                         ┬╖┬╖┬╖ access (array, i) ┬╖┬╖┬╖
  7654.                       }
  7655.  
  7656.  Nested function definitions are permitted within functions in the places where 
  7657.  variable definitions are allowed; that is, in any block, before the first 
  7658.  statement in the block. 
  7659.  
  7660.  It is possible to call the nested function from outside the scope of its name 
  7661.  by storing its address or passing the address to another function: 
  7662.  
  7663.                       hack (int *array, int size)
  7664.                       {
  7665.                        void store (int index, int value)
  7666.                         { array[index] = value; }
  7667.                        intermediate (store, size);
  7668.                       }
  7669.  
  7670.  Here, the function intermediate receives the address of store as an argument. 
  7671.  If intermediate calls store, the arguments given to store are used to store 
  7672.  into array. But this technique works only so long as the containing function 
  7673.  (hack, in this example) does not exit. 
  7674.  
  7675.  If you try to call the nested function through its address after the 
  7676.  containing function has exited, all hell will break loose.  If you try to call 
  7677.  it after a containing scope level has exited, and if it refers to some of the 
  7678.  variables that are no longer in scope, you may be lucky, but it's not wise to 
  7679.  take the risk.  If, however, the nested function does not refer to anything 
  7680.  that has gone out of scope, you should be safe. 
  7681.  
  7682.  GNU CC implements taking the address of a nested function using a technique 
  7683.  called trampolines. 
  7684.  
  7685.  A nested function can jump to a label inherited from a containing function, 
  7686.  provided the label was explicitly declared in the containing function (see 
  7687.  Local Labels).  Such a jump returns instantly to the containing function, 
  7688.  exiting the nested function which did the goto and any intermediate functions 
  7689.  as well.  Here is an example: 
  7690.  
  7691.                       bar (int *array, int offset, int size)
  7692.                       {
  7693.                        __label__ failure;
  7694.                        int access (int *array, int index)
  7695.                         {
  7696.                          if (index > size)
  7697.                           goto failure;
  7698.                          return array[index + offset];
  7699.                         }
  7700.                        int i;
  7701.                        ┬╖┬╖┬╖
  7702.                        for (i = 0; i < size; i++)
  7703.                         ┬╖┬╖┬╖ access (array, i) ┬╖┬╖┬╖
  7704.                        ┬╖┬╖┬╖
  7705.                        return 0;
  7706.                        /* Control comes here from access   if it detects an error.  */
  7707.                        failure:
  7708.                        return -1;
  7709.                       }
  7710.  
  7711.  A nested function always has internal linkage.  Declaring one with extern is 
  7712.  erroneous.  If you need to declare the nested function before its definition, 
  7713.  use auto (which is otherwise meaningless for function declarations). 
  7714.  
  7715.                       bar (int *array, int offset, int size)
  7716.                       {
  7717.                        __label__ failure;
  7718.                        auto int access (int *, int);
  7719.                        ┬╖┬╖┬╖
  7720.                        int access (int *array, int index)
  7721.                         {
  7722.                          if (index > size)
  7723.                           goto failure;
  7724.                          return array[index + offset];
  7725.                         }
  7726.                        ┬╖┬╖┬╖
  7727.                       }
  7728.  
  7729.  
  7730. ΓòÉΓòÉΓòÉ 6.5. Constructing Function Calls ΓòÉΓòÉΓòÉ
  7731.  
  7732.  Using the built-in functions described below, you can record the arguments a 
  7733.  function received, and call another function with the same arguments, without 
  7734.  knowing the number or types of the arguments. 
  7735.  
  7736.  You can also record the return value of that function call, and later return 
  7737.  that value, without knowing what data type the function tried to return (as 
  7738.  long as your caller expects that data type). 
  7739.  
  7740.  __builtin_apply_args () 
  7741.            This built-in function returns a pointer of type void * to data 
  7742.            describing how to perform a call with the same arguments as were 
  7743.            passed to the current function. 
  7744.  
  7745.            The function saves the arg pointer register, structure value 
  7746.            address, and all registers that might be used to pass arguments to a 
  7747.            function into a block of memory allocated on the stack.  Then it 
  7748.            returns the address of that block. 
  7749.  
  7750.  __builtin_apply (function, arguments, size) 
  7751.            This built-in function invokes function (type void (*)()) with a 
  7752.            copy of the parameters described by arguments (type void *) and size 
  7753.            (type int). 
  7754.  
  7755.            The value of arguments should be the value returned by 
  7756.            __builtin_apply_args.  The argument size specifies the size of the 
  7757.            stack argument data, in bytes. 
  7758.  
  7759.            This function returns a pointer of type void * to data describing 
  7760.            how to return whatever value was returned by function.  The data is 
  7761.            saved in a block of memory allocated on the stack. 
  7762.  
  7763.            It is not always simple to compute the proper value for size.  The 
  7764.            value is used by __builtin_apply to compute the amount of data that 
  7765.            should be pushed on the stack and copied from the incoming argument 
  7766.            area. 
  7767.  
  7768.  __builtin_return (result) 
  7769.            This built-in function returns the value described by result from 
  7770.            the containing function.  You should specify, for result, a value 
  7771.            returned by __builtin_apply. 
  7772.  
  7773.  
  7774. ΓòÉΓòÉΓòÉ 6.6. Naming an Expression's Type ΓòÉΓòÉΓòÉ
  7775.  
  7776.  You can give a name to the type of an expression using a typedef declaration 
  7777.  with an initializer.  Here is how to define name as a type name for the type 
  7778.  of exp: 
  7779.  
  7780.                       typedef name = exp;
  7781.  
  7782.  This is useful in conjunction with the statements-within-expressions feature. 
  7783.  Here is how the two together can be used to define a safe ``maximum'' macro 
  7784.  that operates on any arithmetic type: 
  7785.  
  7786.                       #define max(a,b) \
  7787.                        ({typedef _ta = (a), _tb = (b);  \
  7788.                         _ta _a = (a); _tb _b = (b);   \
  7789.                         _a > _b ? _a : _b; })
  7790.  
  7791.  The reason for using names that start with underscores for the local variables 
  7792.  is to avoid conflicts with variable names that occur within the expressions 
  7793.  that are substituted for a and b.  Eventually we hope to design a new form of 
  7794.  declaration syntax that allows you to declare variables whose scopes start 
  7795.  only after their initializers; this will be a more reliable way to prevent 
  7796.  such conflicts. 
  7797.  
  7798.  
  7799. ΓòÉΓòÉΓòÉ 6.7. Referring to a Type with typeof ΓòÉΓòÉΓòÉ
  7800.  
  7801.  Another way to refer to the type of an expression is with typeof. The syntax 
  7802.  of using of this keyword looks like sizeof, but the construct acts 
  7803.  semantically like a type name defined with typedef. 
  7804.  
  7805.  There are two ways of writing the argument to typeof: with an expression or 
  7806.  with a type.  Here is an example with an expression: 
  7807.  
  7808.                       typeof (x[0](1))
  7809.  
  7810.  This assumes that x is an array of functions; the type described is that of 
  7811.  the values of the functions. 
  7812.  
  7813.  Here is an example with a typename as the argument: 
  7814.  
  7815.                       typeof (int *)
  7816.  
  7817.  Here the type described is that of pointers to int. 
  7818.  
  7819.  If you are writing a header file that must work when included in ANSI C 
  7820.  programs, write __typeof__ instead of typeof. See Alternate Keywords. 
  7821.  
  7822.  A typeof-construct can be used anywhere a typedef name could be used.  For 
  7823.  example, you can use it in a declaration, in a cast, or inside of sizeof or 
  7824.  typeof. 
  7825.  
  7826.      This declares y with the type of what x points to. 
  7827.  
  7828.                       typeof (*x) y;
  7829.  
  7830.      This declares y as an array of such values. 
  7831.  
  7832.                       typeof (*x) y[4];
  7833.  
  7834.      This declares y as an array of pointers to characters: 
  7835.  
  7836.                       typeof (typeof (char *)[4]) y;
  7837.  
  7838.  It is equivalent to the following traditional C declaration: 
  7839.  
  7840.                       char *y[4];
  7841.  
  7842.  To see the meaning of the declaration using typeof, and why it might be a 
  7843.  useful way to write, let's rewrite it with these macros: 
  7844.  
  7845.                       #define pointer(T)  typeof(T *)
  7846.                       #define array(T, N) typeof(T [N])
  7847.  
  7848.  Now the declaration can be rewritten this way: 
  7849.  
  7850.                       array (pointer (char), 4) y;
  7851.  
  7852.  Thus, array (pointer (char), 4) is the type of arrays of 4 pointers to char. 
  7853.  
  7854.  
  7855. ΓòÉΓòÉΓòÉ 6.8. Generalized Lvalues ΓòÉΓòÉΓòÉ
  7856.  
  7857.  Compound expressions, conditional expressions and casts are allowed as lvalues 
  7858.  provided their operands are lvalues.  This means that you can take their 
  7859.  addresses or store values into them. 
  7860.  
  7861.  Standard C++ allows compound expressions and conditional expressions as 
  7862.  lvalues, and permits casts to reference type, so use of this extension is 
  7863.  deprecated for C++ code. 
  7864.  
  7865.  For example, a compound expression can be assigned, provided the last 
  7866.  expression in the sequence is an lvalue.  These two expressions are 
  7867.  equivalent: 
  7868.  
  7869.                       (a, b) += 5
  7870.                       a, (b += 5)
  7871.  
  7872.  Similarly, the address of the compound expression can be taken.  These two 
  7873.  expressions are equivalent: 
  7874.  
  7875.                       &(a, b)
  7876.                       a, &b
  7877.  
  7878.  A conditional expression is a valid lvalue if its type is not void and the 
  7879.  true and false branches are both valid lvalues.  For example, these two 
  7880.  expressions are equivalent: 
  7881.  
  7882.                       (a ? b : c) = 5
  7883.                       (a ? b = 5 : (c = 5))
  7884.  
  7885.  A cast is a valid lvalue if its operand is an lvalue.  A simple assignment 
  7886.  whose left-hand side is a cast works by converting the right-hand side first 
  7887.  to the specified type, then to the type of the inner left-hand side 
  7888.  expression.  After this is stored, the value is converted back to the 
  7889.  specified type to become the value of the assignment.  Thus, if a has type 
  7890.  char *, the following two expressions are equivalent: 
  7891.  
  7892.                       (int)a = 5
  7893.                       (int)(a = (char *)(int)5)
  7894.  
  7895.  An assignment-with-arithmetic operation such as '+=' applied to a cast 
  7896.  performs the arithmetic using the type resulting from the cast, and then 
  7897.  continues as in the previous case.  Therefore, these two expressions are 
  7898.  equivalent: 
  7899.  
  7900.                       (int)a += 5
  7901.                       (int)(a = (char *)(int) ((int)a + 5))
  7902.  
  7903.  You cannot take the address of an lvalue cast, because the use of its address 
  7904.  would not work out coherently.  Suppose that &(int)f were permitted, where f 
  7905.  has type float.  Then the following statement would try to store an integer 
  7906.  bit-pattern where a floating point number belongs: 
  7907.  
  7908.                       *&(int)f = 1;
  7909.  
  7910.  This is quite different from what (int)f = 1 would do---that would convert 1 
  7911.  to floating point and store it.  Rather than cause this inconsistency, we 
  7912.  think it is better to prohibit use of '&' on a cast. 
  7913.  
  7914.  If you really do want an int * pointer with the address of f, you can simply 
  7915.  write (int *)&f. 
  7916.  
  7917.  
  7918. ΓòÉΓòÉΓòÉ 6.9. Conditionals with Omitted Operands ΓòÉΓòÉΓòÉ
  7919.  
  7920.  The middle operand in a conditional expression may be omitted.  Then if the 
  7921.  first operand is nonzero, its value is the value of the conditional 
  7922.  expression. 
  7923.  
  7924.  Therefore, the expression 
  7925.  
  7926.                       x ? : y
  7927.  
  7928.  has the value of x if that is nonzero; otherwise, the value of y. 
  7929.  
  7930.  This example is perfectly equivalent to 
  7931.  
  7932.                       x ? x : y
  7933.  
  7934.  In this simple case, the ability to omit the middle operand is not especially 
  7935.  useful.  When it becomes useful is when the first operand does, or may (if it 
  7936.  is a macro argument), contain a side effect.  Then repeating the operand in 
  7937.  the middle would perform the side effect twice.  Omitting the middle operand 
  7938.  uses the value already computed without the undesirable effects of recomputing 
  7939.  it. 
  7940.  
  7941.  
  7942. ΓòÉΓòÉΓòÉ 6.10. Double-Word Integers ΓòÉΓòÉΓòÉ
  7943.  
  7944.  GNU C supports data types for integers that are twice as long as int.  Simply 
  7945.  write long long int for a signed integer, or unsigned long long int for an 
  7946.  unsigned integer.  To make an integer constant of type long long int, add the 
  7947.  suffix LL to the integer.  To make an integer constant of type unsigned long 
  7948.  long int, add the suffix ULL to the integer. 
  7949.  
  7950.  You can use these types in arithmetic like any other integer types. Addition, 
  7951.  subtraction, and bitwise boolean operations on these types are open-coded on 
  7952.  all types of machines.  Multiplication is open-coded if the machine supports 
  7953.  fullword-to-doubleword a widening multiply instruction.  Division and shifts 
  7954.  are open-coded only on machines that provide special support.  The operations 
  7955.  that are not open-coded use special library routines that come with GNU CC. 
  7956.  
  7957.  There may be pitfalls when you use long long types for function arguments, 
  7958.  unless you declare function prototypes.  If a function expects type int for 
  7959.  its argument, and you pass a value of type long long int, confusion will 
  7960.  result because the caller and the subroutine will disagree about the number of 
  7961.  bytes for the argument. Likewise, if the function expects long long int and 
  7962.  you pass int.  The best way to avoid such problems is to use prototypes. 
  7963.  
  7964.  
  7965. ΓòÉΓòÉΓòÉ 6.11. Complex Numbers ΓòÉΓòÉΓòÉ
  7966.  
  7967.  GNU C supports complex data types.  You can declare both complex integer types 
  7968.  and complex floating types, using the keyword __complex__. 
  7969.  
  7970.  For example, '__complex__ double x;' declares x as a variable whose real part 
  7971.  and imaginary part are both of type double.  '__complex__ short int y;' 
  7972.  declares y to have real and imaginary parts of type short int; this is not 
  7973.  likely to be useful, but it shows that the set of complex types is complete. 
  7974.  
  7975.  To write a constant with a complex data type, use the suffix 'i' or 'j' 
  7976.  (either one; they are equivalent).  For example, 2.5fi has type __complex__ 
  7977.  float and 3i has type __complex__ int.  Such a constant always has a pure 
  7978.  imaginary value, but you can form any complex value you like by adding one to 
  7979.  a real constant. 
  7980.  
  7981.  To extract the real part of a complex-valued expression exp, write __real__ 
  7982.  exp.  Likewise, use __imag__ to extract the imaginary part. 
  7983.  
  7984.  The operator '~' performs complex conjugation when used on a value with a 
  7985.  complex type. 
  7986.  
  7987.  GNU CC can allocate complex automatic variables in a noncontiguous fashion; 
  7988.  it's even possible for the real part to be in a register while the imaginary 
  7989.  part is on the stack (or vice-versa).  None of the supported debugging info 
  7990.  formats has a way to represent noncontiguous allocation like this, so GNU CC 
  7991.  describes a noncontiguous complex variable as if it were two separate 
  7992.  variables of noncomplex type. If the variable's actual name is foo, the two 
  7993.  fictitious variables are named foo$real and foo$imag.  You can examine and set 
  7994.  these two fictitious variables with your debugger. 
  7995.  
  7996.  A future version of GDB will know how to recognize such pairs and treat them 
  7997.  as a single variable with a complex type. 
  7998.  
  7999.  
  8000. ΓòÉΓòÉΓòÉ 6.12. Arrays of Length Zero ΓòÉΓòÉΓòÉ
  8001.  
  8002.  Zero-length arrays are allowed in GNU C.  They are very useful as the last 
  8003.  element of a structure which is really a header for a variable-length object: 
  8004.  
  8005.                       struct line {
  8006.                        int length;
  8007.                        char contents[0];
  8008.                       };
  8009.                       {
  8010.                        struct line *thisline = (struct line *)
  8011.                         malloc (sizeof (struct line) + this_length);
  8012.                        thisline->length = this_length;
  8013.                       }
  8014.  
  8015.  In standard C, you would have to give contents a length of 1, which means 
  8016.  either you waste space or complicate the argument to malloc. 
  8017.  
  8018.  
  8019. ΓòÉΓòÉΓòÉ 6.13. Arrays of Variable Length ΓòÉΓòÉΓòÉ
  8020.  
  8021.  Variable-length automatic arrays are allowed in GNU C.  These arrays are 
  8022.  declared like any other automatic arrays, but with a length that is not a 
  8023.  constant expression.  The storage is allocated at the point of declaration and 
  8024.  deallocated when the brace-level is exited.  For example: 
  8025.  
  8026.                       FILE *
  8027.                       concat_fopen (char *s1, char *s2, char *mode)
  8028.                       {
  8029.                        char str[strlen (s1) + strlen (s2) + 1];
  8030.                        strcpy (str, s1);
  8031.                        strcat (str, s2);
  8032.                        return fopen (str, mode);
  8033.                       }
  8034.  
  8035.  Jumping or breaking out of the scope of the array name deallocates the 
  8036.  storage.  Jumping into the scope is not allowed; you get an error message for 
  8037.  it. 
  8038.  
  8039.  You can use the function alloca to get an effect much like variable-length 
  8040.  arrays.  The function alloca is available in many other C implementations (but 
  8041.  not in all).  On the other hand, variable-length arrays are more elegant. 
  8042.  
  8043.  There are other differences between these two methods.  Space allocated with 
  8044.  alloca exists until the containing function returns. The space for a 
  8045.  variable-length array is deallocated as soon as the array name's scope ends. 
  8046.  (If you use both variable-length arrays and alloca in the same function, 
  8047.  deallocation of a variable-length array will also deallocate anything more 
  8048.  recently allocated with alloca.) 
  8049.  
  8050.  You can also use variable-length arrays as arguments to functions: 
  8051.  
  8052.                       struct entry
  8053.                       tester (int len, char data[len][len])
  8054.                       {
  8055.                        ┬╖┬╖┬╖
  8056.                       }
  8057.  
  8058.  The length of an array is computed once when the storage is allocated and is 
  8059.  remembered for the scope of the array in case you access it with sizeof. 
  8060.  
  8061.  If you want to pass the array first and the length afterward, you can use a 
  8062.  forward declaration in the parameter list---another GNU extension. 
  8063.  
  8064.                       struct entry
  8065.                       tester (int len; char data[len][len], int len)
  8066.                       {
  8067.                        ┬╖┬╖┬╖
  8068.                       }
  8069.  
  8070.  The 'int len' before the semicolon is a parameter forward declaration, and it 
  8071.  serves the purpose of making the name len known when the declaration of data 
  8072.  is parsed. 
  8073.  
  8074.  You can write any number of such parameter forward declarations in the 
  8075.  parameter list.  They can be separated by commas or semicolons, but the last 
  8076.  one must end with a semicolon, which is followed by the ``real'' parameter 
  8077.  declarations.  Each forward declaration must match a ``real'' declaration in 
  8078.  parameter name and data type. 
  8079.  
  8080.  
  8081. ΓòÉΓòÉΓòÉ 6.14. Macros with Variable Numbers of Arguments ΓòÉΓòÉΓòÉ
  8082.  
  8083.  In GNU C, a macro can accept a variable number of arguments, much as a 
  8084.  function can.  The syntax for defining the macro looks much like that used for 
  8085.  a function.  Here is an example: 
  8086.  
  8087.                       #define eprintf(format, args┬╖┬╖┬╖)  \
  8088.                        fprintf (stderr, format , ## args)
  8089.  
  8090.  Here args is a rest argument: it takes in zero or more arguments, as many as 
  8091.  the call contains.  All of them plus the commas between them form the value of 
  8092.  args, which is substituted into the macro body where args is used.  Thus, we 
  8093.  have this expansion: 
  8094.  
  8095.                       eprintf ("%s:%d: ", input_file_name, line_number)
  8096.                       ==>
  8097.                       fprintf (stderr, "%s:%d: " , input_file_name, line_number)
  8098.  
  8099.  Note that the comma after the string constant comes from the definition of 
  8100.  eprintf, whereas the last comma comes from the value of args. 
  8101.  
  8102.  The reason for using '##' is to handle the case when args matches no arguments 
  8103.  at all.  In this case, args has an empty value.  In this case, the second 
  8104.  comma in the definition becomes an embarrassment: if it got through to the 
  8105.  expansion of the macro, we would get something like this: 
  8106.  
  8107.                       fprintf (stderr, "success!\n" , )
  8108.  
  8109.  which is invalid C syntax.  '##' gets rid of the comma, so we get the 
  8110.  following instead: 
  8111.  
  8112.                       fprintf (stderr, "success!\n")
  8113.  
  8114.  This is a special feature of the GNU C preprocessor: '##' before a rest 
  8115.  argument that is empty discards the preceding sequence of non-whitespace 
  8116.  characters from the macro definition.  (If another macro argument precedes, 
  8117.  none of it is discarded.) 
  8118.  
  8119.  It might be better to discard the last preprocessor token instead of the last 
  8120.  preceding sequence of non-whitespace characters; in fact, we may someday 
  8121.  change this feature to do so.  We advise you to write the macro definition so 
  8122.  that the preceding sequence of non-whitespace characters is just a single 
  8123.  token, so that the meaning will not change if we change the definition of this 
  8124.  feature. 
  8125.  
  8126.  
  8127. ΓòÉΓòÉΓòÉ 6.15. Non-Lvalue Arrays May Have Subscripts ΓòÉΓòÉΓòÉ
  8128.  
  8129.  Subscripting is allowed on arrays that are not lvalues, even though the unary 
  8130.  '&' operator is not.  For example, this is valid in GNU C though not valid in 
  8131.  other C dialects: 
  8132.  
  8133.                       struct foo {int a[4];};
  8134.                       struct foo f();
  8135.                       bar (int index)
  8136.                       {
  8137.                        return f().a[index];
  8138.                       }
  8139.  
  8140.  
  8141. ΓòÉΓòÉΓòÉ 6.16. Arithmetic on void- and Function-Pointers ΓòÉΓòÉΓòÉ
  8142.  
  8143.  In GNU C, addition and subtraction operations are supported on pointers to 
  8144.  void and on pointers to functions.  This is done by treating the size of a 
  8145.  void or of a function as 1. 
  8146.  
  8147.  A consequence of this is that sizeof is also allowed on void and on function 
  8148.  types, and returns 1. 
  8149.  
  8150.  The option '-Wpointer-arith' requests a warning if these extensions are used. 
  8151.  
  8152.  
  8153. ΓòÉΓòÉΓòÉ 6.17. Non-Constant Initializers ΓòÉΓòÉΓòÉ
  8154.  
  8155.  As in standard C++, the elements of an aggregate initializer for an automatic 
  8156.  variable are not required to be constant expressions in GNU C. Here is an 
  8157.  example of an initializer with run-time varying elements: 
  8158.  
  8159.                       foo (float f, float g)
  8160.                       {
  8161.                        float beat_freqs[2] = { f-g, f+g };
  8162.                        ┬╖┬╖┬╖
  8163.                       }
  8164.  
  8165.  
  8166. ΓòÉΓòÉΓòÉ 6.18. Constructor Expressions ΓòÉΓòÉΓòÉ
  8167.  
  8168.  GNU C supports constructor expressions.  A constructor looks like a cast 
  8169.  containing an initializer.  Its value is an object of the type specified in 
  8170.  the cast, containing the elements specified in the initializer. 
  8171.  
  8172.  Usually, the specified type is a structure.  Assume that struct foo and 
  8173.  structure are declared as shown: 
  8174.  
  8175.                       struct foo {int a; char b[2];} structure;
  8176.  
  8177.  Here is an example of constructing a struct foo with a constructor: 
  8178.  
  8179.                       structure = ((struct foo) {x + y, 'a', 0});
  8180.  
  8181.  This is equivalent to writing the following: 
  8182.  
  8183.                       {
  8184.                        struct foo temp = {x + y, 'a', 0};
  8185.                        structure = temp;
  8186.                       }
  8187.  
  8188.  You can also construct an array.  If all the elements of the constructor are 
  8189.  (made up of) simple constant expressions, suitable for use in initializers, 
  8190.  then the constructor is an lvalue and can be coerced to a pointer to its first 
  8191.  element, as shown here: 
  8192.  
  8193.                       char **foo = (char *[]) { "x", "y", "z" };
  8194.  
  8195.  Array constructors whose elements are not simple constants are not very 
  8196.  useful, because the constructor is not an lvalue.  There are only two valid 
  8197.  ways to use it: to subscript it, or initialize an array variable with it.  The 
  8198.  former is probably slower than a switch statement, while the latter does the 
  8199.  same thing an ordinary C initializer would do.  Here is an example of 
  8200.  subscripting an array constructor: 
  8201.  
  8202.                       output = ((int[]) { 2, x, 28 }) [input];
  8203.  
  8204.  Constructor expressions for scalar types and union types are is also allowed, 
  8205.  but then the constructor expression is equivalent to a cast. 
  8206.  
  8207.  
  8208. ΓòÉΓòÉΓòÉ 6.19. Labeled Elements in Initializers ΓòÉΓòÉΓòÉ
  8209.  
  8210.  Standard C requires the elements of an initializer to appear in a fixed order, 
  8211.  the same as the order of the elements in the array or structure being 
  8212.  initialized. 
  8213.  
  8214.  In GNU C you can give the elements in any order, specifying the array indices 
  8215.  or structure field names they apply to.  This extension is not implemented in 
  8216.  GNU C++. 
  8217.  
  8218.  To specify an array index, write '[index]' or '[index] =' before the element 
  8219.  value.  For example, 
  8220.  
  8221.                       int a[6] = { [4] 29, [2] = 15 };
  8222.  
  8223.  is equivalent to 
  8224.  
  8225.                       int a[6] = { 0, 0, 15, 0, 29, 0 };
  8226.  
  8227.  The index values must be constant expressions, even if the array being 
  8228.  initialized is automatic. 
  8229.  
  8230.  To initialize a range of elements to the same value, write '[first ┬╖┬╖┬╖ last] = 
  8231.  value'.  For example, 
  8232.  
  8233.                       int widths[] = { [0 ┬╖┬╖┬╖ 9] = 1, [10 ┬╖┬╖┬╖ 99] = 2, [100] = 3 };
  8234.  
  8235.  Note that the length of the array is the highest value specified plus one. 
  8236.  
  8237.  In a structure initializer, specify the name of a field to initialize with 
  8238.  'fieldname:' before the element value.  For example, given the following 
  8239.  structure, 
  8240.  
  8241.                       struct point { int x, y; };
  8242.  
  8243.  the following initialization 
  8244.  
  8245.                       struct point p = { y: yvalue, x: xvalue };
  8246.  
  8247.  is equivalent to 
  8248.  
  8249.                       struct point p = { xvalue, yvalue };
  8250.  
  8251.  Another syntax which has the same meaning is '.fieldname ='., as shown here: 
  8252.  
  8253.                       struct point p = { .y = yvalue, .x = xvalue };
  8254.  
  8255.  You can also use an element label (with either the colon syntax or the 
  8256.  period-equal syntax) when initializing a union, to specify which element of 
  8257.  the union should be used.  For example, 
  8258.  
  8259.                       union foo { int i; double d; };
  8260.                       union foo f = { d: 4 };
  8261.  
  8262.  will convert 4 to a double to store it in the union using the second element. 
  8263.  By contrast, casting 4 to type union foo would store it into the union as the 
  8264.  integer i, since it is an integer.  (See Cast to Union.) 
  8265.  
  8266.  You can combine this technique of naming elements with ordinary C 
  8267.  initialization of successive elements.  Each initializer element that does not 
  8268.  have a label applies to the next consecutive element of the array or 
  8269.  structure.  For example, 
  8270.  
  8271.                       int a[6] = { [1] = v1, v2, [4] = v4 };
  8272.  
  8273.  is equivalent to 
  8274.  
  8275.                       int a[6] = { 0, v1, v2, 0, v4, 0 };
  8276.  
  8277.  Labeling the elements of an array initializer is especially useful when the 
  8278.  indices are characters or belong to an enum type. For example: 
  8279.  
  8280.                       int whitespace[256]
  8281.                        = { [' '] = 1, ['\t'] = 1, ['\h'] = 1,
  8282.                          ['\f'] = 1, ['\n'] = 1, ['\r'] = 1 };
  8283.  
  8284.  
  8285. ΓòÉΓòÉΓòÉ 6.20. Case Ranges ΓòÉΓòÉΓòÉ
  8286.  
  8287.  You can specify a range of consecutive values in a single case label, like 
  8288.  this: 
  8289.  
  8290.                       case low ┬╖┬╖┬╖ high:
  8291.  
  8292.  This has the same effect as the proper number of individual case labels, one 
  8293.  for each integer value from low to high, inclusive. 
  8294.  
  8295.  This feature is especially useful for ranges of ASCII character codes: 
  8296.  
  8297.                       case 'A' ┬╖┬╖┬╖ 'Z':
  8298.  
  8299.  Be careful: Write spaces around the ┬╖┬╖┬╖, for otherwise it may be parsed wrong 
  8300.  when you use it with integer values.  For example, write this: 
  8301.  
  8302.                       case 1 ┬╖┬╖┬╖ 5:
  8303.  
  8304.  rather than this: 
  8305.  
  8306.                       case 1┬╖┬╖┬╖5:
  8307.  
  8308.  
  8309. ΓòÉΓòÉΓòÉ 6.21. Cast to a Union Type ΓòÉΓòÉΓòÉ
  8310.  
  8311.  A cast to union type is similar to other casts, except that the type specified 
  8312.  is a union type.  You can specify the type either with union tag or with a 
  8313.  typedef name.  A cast to union is actually a constructor though, not a cast, 
  8314.  and hence does not yield an lvalue like normal casts.  (See Constructors.) 
  8315.  
  8316.  The types that may be cast to the union type are those of the members of the 
  8317.  union.  Thus, given the following union and variables: 
  8318.  
  8319.                       union foo { int i; double d; };
  8320.                       int x;
  8321.                       double y;
  8322.  
  8323.  both x and y can be cast to type union foo. 
  8324.  
  8325.  Using the cast as the right-hand side of an assignment to a variable of union 
  8326.  type is equivalent to storing in a member of the union: 
  8327.  
  8328.                       union foo u;
  8329.                       ┬╖┬╖┬╖
  8330.                       u = (union foo) x  ==  u.i = x
  8331.                       u = (union foo) y  ==  u.d = y
  8332.  
  8333.  You can also use the union cast as a function argument: 
  8334.  
  8335.                       void hack (union foo);
  8336.                       ┬╖┬╖┬╖
  8337.                       hack ((union foo) x);
  8338.  
  8339.  
  8340. ΓòÉΓòÉΓòÉ 6.22. Declaring Attributes of Functions ΓòÉΓòÉΓòÉ
  8341.  
  8342.  In GNU C, you declare certain things about functions called in your program 
  8343.  which help the compiler optimize function calls and check your code more 
  8344.  carefully. 
  8345.  
  8346.  The keyword __attribute__ allows you to specify special attributes when making 
  8347.  a declaration.  This keyword is followed by an attribute specification inside 
  8348.  double parentheses.  Eight attributes, noreturn, const, format, section, 
  8349.  constructor, destructor, unused and weak are currently defined for functions. 
  8350.  Other attributes, including section are supported for variables declarations 
  8351.  (see Variable Attributes) and for types (see Type Attributes). 
  8352.  
  8353.  You may also specify attributes with '__' preceding and following each 
  8354.  keyword.  This allows you to use them in header files without being concerned 
  8355.  about a possible macro of the same name.  For example, you may use 
  8356.  __noreturn__ instead of noreturn. 
  8357.  
  8358.  noreturn 
  8359.            A few standard library functions, such as abort and exit, cannot 
  8360.            return.  GNU CC knows this automatically.  Some programs define 
  8361.            their own functions that never return.  You can declare them 
  8362.            noreturn to tell the compiler this fact.  For example, 
  8363.  
  8364.                       void fatal () __attribute__ ((noreturn));
  8365.                       void
  8366.                       fatal (┬╖┬╖┬╖)
  8367.                       {
  8368.                        ┬╖┬╖┬╖ /* Print error message. */ ┬╖┬╖┬╖
  8369.                        exit (1);
  8370.                       }
  8371.  
  8372.  The noreturn keyword tells the compiler to assume that fatal cannot return. 
  8373.  It can then optimize without regard to what would happen if fatal ever did 
  8374.  return.  This makes slightly better code.  More importantly, it helps avoid 
  8375.  spurious warnings of uninitialized variables. 
  8376.  
  8377.  Do not assume that registers saved by the calling function are restored before 
  8378.  calling the noreturn function. 
  8379.  
  8380.  It does not make sense for a noreturn function to have a return type other 
  8381.  than void. 
  8382.  
  8383.  The attribute noreturn is not implemented in GNU C versions earlier than 2.5. 
  8384.  An alternative way to declare that a function does not return, which works in 
  8385.  the current version and in some older versions, is as follows: 
  8386.  
  8387.                       typedef void voidfn ();
  8388.                       volatile voidfn fatal;
  8389.  
  8390.  const 
  8391.            Many functions do not examine any values except their arguments, and 
  8392.            have no effects except the return value.  Such a function can be 
  8393.            subject to common subexpression elimination and loop optimization 
  8394.            just as an arithmetic operator would be.  These functions should be 
  8395.            declared with the attribute const.  For example, 
  8396.  
  8397.                       int square (int) __attribute__ ((const));
  8398.  
  8399.  says that the hypothetical function square is safe to call fewer times than 
  8400.  the program says. 
  8401.  
  8402.  The attribute const is not implemented in GNU C versions earlier than 2.5.  An 
  8403.  alternative way to declare that a function has no side effects, which works in 
  8404.  the current version and in some older versions, is as follows: 
  8405.  
  8406.                       typedef int intfn ();
  8407.                       extern const intfn square;
  8408.  
  8409.  This approach does not work in GNU C++ from 2.6.0 on, since the language 
  8410.  specifies that the 'const' must be attached to the return value. 
  8411.  
  8412.  Note that a function that has pointer arguments and examines the data pointed 
  8413.  to must not be declared const.  Likewise, a function that calls a non-const 
  8414.  function usually must not be const.  It does not make sense for a const 
  8415.  function to return void. 
  8416.  
  8417.  format (archetype, string-index, first-to-check) 
  8418.            The format attribute specifies that a function takes printf or scanf 
  8419.            style arguments which should be type-checked against a format 
  8420.            string.  For example, the declaration: 
  8421.  
  8422.                       extern int
  8423.                       my_printf (void *my_object, const char *my_format, ┬╖┬╖┬╖)
  8424.                          __attribute__ ((format (printf, 2, 3)));
  8425.  
  8426.  causes the compiler to check the arguments in calls to my_printf for 
  8427.  consistency with the printf style format string argument my_format. 
  8428.  
  8429.  The parameter archetype determines how the format string is interpreted, and 
  8430.  should be either printf or scanf.  The parameter string-index specifies which 
  8431.  argument is the format string argument (starting from 1), while first-to-check 
  8432.  is the number of the first argument to check against the format string.  For 
  8433.  functions where the arguments are not available to be checked (such as 
  8434.  vprintf), specify the third parameter as zero.  In this case the compiler only 
  8435.  checks the format string for consistency. 
  8436.  
  8437.  In the example above, the format string (my_format) is the second argument of 
  8438.  the function my_print, and the arguments to check start with the third 
  8439.  argument, so the correct parameters for the format attribute are 2 and 3. 
  8440.  
  8441.  The format attribute allows you to identify your own functions which take 
  8442.  format strings as arguments, so that GNU CC can check the calls to these 
  8443.  functions for errors.  The compiler always checks formats for the ANSI library 
  8444.  functions printf, fprintf, sprintf, scanf, fscanf, sscanf, vprintf, vfprintf 
  8445.  and vsprintf whenever such warnings are requested (using '-Wformat'), so there 
  8446.  is no need to modify the header file 'stdio.h'. 
  8447.  
  8448.  format_arg (string-index) 
  8449.            The format_arg attribute specifies that a function takes printf or 
  8450.            scanf style arguments, modifies it (for example, to translate it 
  8451.            into another language), and passes it to a printf or scanf style 
  8452.            function.  For example, the declaration: 
  8453.  
  8454.                       extern char *
  8455.                       my_dgettext (char *my_domain, const char *my_format)
  8456.                          __attribute__ ((format_arg (2)));
  8457.  
  8458.  causes the compiler to check the arguments in calls to my_dgettext whose 
  8459.  result is passed to a printf or scanf type function for consistency with the 
  8460.  printf style format string argument my_format. 
  8461.  
  8462.  The parameter string-index specifies which argument is the format string 
  8463.  argument (starting from 1). 
  8464.  
  8465.  The format-arg attribute allows you to identify your own functions which 
  8466.  modify format strings, so that GNU CC can check the calls to printf and scanf 
  8467.  function whose operands are a call to one of your own function.  The compiler 
  8468.  always treats gettext, dgettext, and dcgettext in this manner. 
  8469.  
  8470.  section ("section-name") 
  8471.            Normally, the compiler places the code it generates in the text 
  8472.            section. Sometimes, however, you need additional sections, or you 
  8473.            need certain particular functions to appear in special sections. 
  8474.            The section attribute specifies that a function lives in a 
  8475.            particular section. For example, the declaration: 
  8476.  
  8477.                       extern void foobar (void) __attribute__ ((section ("bar")));
  8478.  
  8479.  puts the function foobar in the bar section. 
  8480.  
  8481.  Some file formats do not support arbitrary sections so the section attribute 
  8482.  is not available on all platforms. If you need to map the entire contents of a 
  8483.  module to a particular section, consider using the facilities of the linker 
  8484.  instead. 
  8485.  
  8486.  constructor 
  8487.  
  8488.  destructor 
  8489.            The constructor attribute causes the function to be called 
  8490.            automatically before execution enters main ().  Similarly, the 
  8491.            destructor attribute causes the function to be called automatically 
  8492.            after main () has completed or exit () has been called.  Functions 
  8493.            with these attributes are useful for initializing data that will be 
  8494.            used implicitly during the execution of the program. 
  8495.  
  8496.            These attributes are not currently implemented for Objective C. 
  8497.  
  8498.  unused 
  8499.            This attribute, attached to a function, means that the function is 
  8500.            meant to be possibly unused.  GNU CC will not produce a warning for 
  8501.            this function.  GNU C++ does not currently support this attribute as 
  8502.            definitions without parameters are valid in C++. 
  8503.  
  8504.  weak 
  8505.            The weak attribute causes the declaration to be emitted as a weak 
  8506.            symbol rather than a global.  This is primarily useful in defining 
  8507.            library functions which can be overridden in user code, though it 
  8508.            can also be used with non-function declarations.  Weak symbols are 
  8509.            supported for ELF targets, and also for a.out targets when using the 
  8510.            GNU assembler and linker. 
  8511.  
  8512.  alias ("target") 
  8513.            The alias attribute causes the declaration to be emitted as an alias 
  8514.            for another symbol, which must be specified.  For instance, 
  8515.  
  8516.                       void __f () { /* do something */; }
  8517.                       void f () __attribute__ ((weak, alias ("__f")));
  8518.  
  8519.  declares 'f' to be a weak alias for '__f'.  In C++, the mangled name for the 
  8520.  target must be used. 
  8521.  
  8522.  Not all target machines support this attribute. 
  8523.  
  8524.  regparm (number) 
  8525.            On the Intel 386, the regparm attribute causes the compiler to pass 
  8526.            up to number integer arguments in registers EAX, EDX, and ECX 
  8527.            instead of on the stack.  Functions that take a variable number of 
  8528.            arguments will continue to be passed all of their arguments on the 
  8529.            stack. 
  8530.  
  8531.  stdcall 
  8532.            On the Intel 386, the stdcall attribute causes the compiler to 
  8533.            assume that the called function will pop off the stack space used to 
  8534.            pass arguments, unless it takes a variable number of arguments. 
  8535.  
  8536.            The PowerPC compiler for Windows NT currently ignores the stdcall 
  8537.            attribute. 
  8538.  
  8539.  cdecl 
  8540.            On the Intel 386, the cdecl attribute causes the compiler to assume 
  8541.            that the calling function will pop off the stack space used to pass 
  8542.            arguments.  This is useful to override the effects of the '-mrtd' 
  8543.            switch. 
  8544.  
  8545.            The PowerPC compiler for Windows NT currently ignores the cdecl 
  8546.            attribute. 
  8547.  
  8548.  longcall 
  8549.            On the RS/6000 and PowerPC, the longcall attribute causes the 
  8550.            compiler to always call the function via a pointer, so that 
  8551.            functions which reside further than 32 megabytes from the current 
  8552.            location can be called. 
  8553.  
  8554.  shortcall 
  8555.            On the RS/6000 and PowerPC, the shortcall attribute causes the 
  8556.            compiler to always generate a direct call if it can, overriding the 
  8557.            attribute longcall and the command line flag '-mlongcall'. 
  8558.  
  8559.  dllimport 
  8560.            On the PowerPC running Windows NT, the dllimport attribute causes 
  8561.            the compiler to call the function via a global pointer to the 
  8562.            function pointer that is set up by the Windows NT dll library.  The 
  8563.            pointer name is formed by combining __imp_ and the function name. 
  8564.  
  8565.  dllexport 
  8566.            On the PowerPC running Windows NT, the dllexport attribute causes 
  8567.            the compiler to provide a global pointer to the function pointer, so 
  8568.            that it can be called with the dllimport attribute.  The pointer 
  8569.            name is formed by combining __imp_ and the function name. 
  8570.  
  8571.  exception (except-func [, except-arg]) 
  8572.            On the PowerPC running Windows NT, the exception attribute causes 
  8573.            the compiler to modify the structured exception table entry it emits 
  8574.            for the declared function.  The string or identifier except-func is 
  8575.            placed in the third entry of the structured exception table.  It 
  8576.            represents a function, which is called by the exception handling 
  8577.            mechanism if an exception occurs.  If it was specified, the string 
  8578.            or identifier except-arg is placed in the fourth entry of the 
  8579.            structured exception table. 
  8580.  
  8581.  function_vector 
  8582.            Use this option on the H8/300 and H8/300H to indicate that the 
  8583.            specified function should be called through the function vector. 
  8584.            Calling a function through the function vector will reduce code 
  8585.            size, however; the function vector has a limited size (maximum 128 
  8586.            entries on the H8/300 and 64 entries on the H8/300H) and shares 
  8587.            space with the interrupt vector. 
  8588.  
  8589.            You must use GAS and GLD from GNU binutils version 2.7 or later for 
  8590.            this option to work correctly. 
  8591.  
  8592.  interrupt_handler 
  8593.            Use this option on the H8/300 and H8/300H to indicate that the 
  8594.            specified function is an interrupt handler.  The compiler will 
  8595.            generate function entry and exit sequences suitable for use in an 
  8596.            interrupt handler when this attribute is present. 
  8597.  
  8598.  eightbit_data 
  8599.            Use this option on the H8/300 and H8/300H to indicate that the 
  8600.            specified variable should be placed into the eight bit data section. 
  8601.            The compiler will generate more efficient code for certain 
  8602.            operations on data in the eight bit data area.  Note the eight bit 
  8603.            data area is limited to 256 bytes of data. 
  8604.  
  8605.            You must use GAS and GLD from GNU binutils version 2.7 or later for 
  8606.            this option to work correctly. 
  8607.  
  8608.  tiny_data 
  8609.            Use this option on the H8/300H to indicate that the specified 
  8610.            variable should be placed into the tiny data section. The compiler 
  8611.            will generate more efficient code for loads and stores on data in 
  8612.            the tiny data section.  Note the tiny data area is limited to 
  8613.            slightly under 32kbytes of data. 
  8614.  
  8615.  interrupt 
  8616.            Use this option on the M32R/D to indicate that the specified 
  8617.            function is an interrupt handler.  The compiler will generate 
  8618.            function entry and exit sequences suitable for use in an interrupt 
  8619.            handler when this attribute is present. 
  8620.  
  8621.  model (model-name) 
  8622.            Use this attribute on the M32R/D to set the addressability of an 
  8623.            object, and the code generated for a function. The identifier 
  8624.            model-name is one of small, medium, or large, representing each of 
  8625.            the code models. 
  8626.  
  8627.            Small model objects live in the lower 16MB of memory (so that their 
  8628.            addresses can be loaded with the ld24 instruction), and are callable 
  8629.            with the bl instruction. 
  8630.  
  8631.            Medium model objects may live anywhere in the 32 bit address space 
  8632.            (the compiler will generate seth/add3 instructions to load their 
  8633.            addresses), and are callable with the bl instruction. 
  8634.  
  8635.            Large model objects may live anywhere in the 32 bit address space 
  8636.            (the compiler will generate seth/add3 instructions to load their 
  8637.            addresses), and may not be reachable with the bl instruction (the 
  8638.            compiler will generate the much slower seth/add3/jl instruction 
  8639.            sequence). 
  8640.  
  8641.  You can specify multiple attributes in a declaration by separating them by 
  8642.  commas within the double parentheses or by immediately following an attribute 
  8643.  declaration with another attribute declaration. 
  8644.  
  8645.  Some people object to the __attribute__ feature, suggesting that ANSI C's 
  8646.  #pragma should be used instead.  There are two reasons for not doing this. 
  8647.  
  8648.    1. It is impossible to generate #pragma commands from a macro. 
  8649.  
  8650.    2. There is no telling what the same #pragma might mean in another compiler. 
  8651.  
  8652.  These two reasons apply to almost any application that might be proposed for 
  8653.  #pragma.  It is basically a mistake to use #pragma for anything. 
  8654.  
  8655.  
  8656. ΓòÉΓòÉΓòÉ 6.23. Prototypes and Old-Style Function Definitions ΓòÉΓòÉΓòÉ
  8657.  
  8658.  GNU C extends ANSI C to allow a function prototype to override a later 
  8659.  old-style non-prototype definition.  Consider the following example: 
  8660.  
  8661.                       /* Use prototypes unless the compiler is old-fashioned.  */
  8662.                       #ifdef __STDC__
  8663.                       #define P(x) x
  8664.                       #else
  8665.                       #define P(x) ()
  8666.                       #endif
  8667.                       /* Prototype function declaration.  */
  8668.                       int isroot P((uid_t));
  8669.                       /* Old-style function definition.  */
  8670.                       int
  8671.                       isroot (x)  /* ??? lossage here ??? */
  8672.                          uid_t x;
  8673.                       {
  8674.                        return x == 0;
  8675.                       }
  8676.  
  8677.  Suppose the type uid_t happens to be short.  ANSI C does not allow this 
  8678.  example, because subword arguments in old-style non-prototype definitions are 
  8679.  promoted.  Therefore in this example the function definition's argument is 
  8680.  really an int, which does not match the prototype argument type of short. 
  8681.  
  8682.  This restriction of ANSI C makes it hard to write code that is portable to 
  8683.  traditional C compilers, because the programmer does not know whether the 
  8684.  uid_t type is short, int, or long.  Therefore, in cases like these GNU C 
  8685.  allows a prototype to override a later old-style definition.  More precisely, 
  8686.  in GNU C, a function prototype argument type overrides the argument type 
  8687.  specified by a later old-style definition if the former type is the same as 
  8688.  the latter type before promotion.  Thus in GNU C the above example is 
  8689.  equivalent to the following: 
  8690.  
  8691.                       int isroot (uid_t);
  8692.                       int
  8693.                       isroot (uid_t x)
  8694.                       {
  8695.                        return x == 0;
  8696.                       }
  8697.  
  8698.  GNU C++ does not support old-style function definitions, so this extension is 
  8699.  irrelevant. 
  8700.  
  8701.  
  8702. ΓòÉΓòÉΓòÉ 6.24. C++ Style Comments ΓòÉΓòÉΓòÉ
  8703.  
  8704.  In GNU C, you may use C++ style comments, which start with '//' and continue 
  8705.  until the end of the line.  Many other C implementations allow such comments, 
  8706.  and they are likely to be in a future C standard. However, C++ style comments 
  8707.  are not recognized if you specify '-ansi' or '-traditional', since they are 
  8708.  incompatible with traditional constructs like dividend//*comment*/divisor. 
  8709.  
  8710.  
  8711. ΓòÉΓòÉΓòÉ 6.25. Dollar Signs in Identifier Names ΓòÉΓòÉΓòÉ
  8712.  
  8713.  In GNU C, you may normally use dollar signs in identifier names. This is 
  8714.  because many traditional C implementations allow such identifiers. However, 
  8715.  dollar signs in identifiers are not supported on a few target machines, 
  8716.  typically because the target assembler does not allow them. 
  8717.  
  8718.  
  8719. ΓòÉΓòÉΓòÉ 6.26. The Character ESC in Constants ΓòÉΓòÉΓòÉ
  8720.  
  8721.  You can use the sequence '\e' in a string or character constant to stand for 
  8722.  the ASCII character ESC. 
  8723.  
  8724.  
  8725. ΓòÉΓòÉΓòÉ 6.27. Inquiring on Alignment of Types or Variables ΓòÉΓòÉΓòÉ
  8726.  
  8727.  The keyword __alignof__ allows you to inquire about how an object is aligned, 
  8728.  or the minimum alignment usually required by a type.  Its syntax is just like 
  8729.  sizeof. 
  8730.  
  8731.  For example, if the target machine requires a double value to be aligned on an 
  8732.  8-byte boundary, then __alignof__ (double) is 8. This is true on many RISC 
  8733.  machines.  On more traditional machine designs, __alignof__ (double) is 4 or 
  8734.  even 2. 
  8735.  
  8736.  Some machines never actually require alignment; they allow reference to any 
  8737.  data type even at an odd addresses.  For these machines, __alignof__ reports 
  8738.  the recommended alignment of a type. 
  8739.  
  8740.  When the operand of __alignof__ is an lvalue rather than a type, the value is 
  8741.  the largest alignment that the lvalue is known to have.  It may have this 
  8742.  alignment as a result of its data type, or because it is part of a structure 
  8743.  and inherits alignment from that structure.  For example, after this 
  8744.  declaration: 
  8745.  
  8746.                       struct foo { int x; char y; } foo1;
  8747.  
  8748.  the value of __alignof__ (foo1.y) is probably 2 or 4, the same as __alignof__ 
  8749.  (int), even though the data type of foo1.y does not itself demand any 
  8750.  alignment. 
  8751.  
  8752.  A related feature which lets you specify the alignment of an object is 
  8753.  __attribute__ ((aligned (alignment))); see the following section. 
  8754.  
  8755.  
  8756. ΓòÉΓòÉΓòÉ 6.28. Specifying Attributes of Variables ΓòÉΓòÉΓòÉ
  8757.  
  8758.  The keyword __attribute__ allows you to specify special attributes of 
  8759.  variables or structure fields.  This keyword is followed by an attribute 
  8760.  specification inside double parentheses.  Eight attributes are currently 
  8761.  defined for variables: aligned, mode, nocommon, packed, section, 
  8762.  transparent_union, unused, and weak.  Other attributes are available for 
  8763.  functions (see Function Attributes) and for types (see Type Attributes). 
  8764.  
  8765.  You may also specify attributes with '__' preceding and following each 
  8766.  keyword.  This allows you to use them in header files without being concerned 
  8767.  about a possible macro of the same name.  For example, you may use __aligned__ 
  8768.  instead of aligned. 
  8769.  
  8770.  aligned (alignment) 
  8771.            This attribute specifies a minimum alignment for the variable or 
  8772.            structure field, measured in bytes.  For example, the declaration: 
  8773.  
  8774.                       int x __attribute__ ((aligned (16))) = 0;
  8775.  
  8776.  causes the compiler to allocate the global variable x on a 16-byte boundary. 
  8777.  On a 68040, this could be used in conjunction with an asm expression to access 
  8778.  the move16 instruction which requires 16-byte aligned operands. 
  8779.  
  8780.  You can also specify the alignment of structure fields.  For example, to 
  8781.  create a double-word aligned int pair, you could write: 
  8782.  
  8783.                       struct foo { int x[2] __attribute__ ((aligned (8))); };
  8784.  
  8785.  This is an alternative to creating a union with a double member that forces 
  8786.  the union to be double-word aligned. 
  8787.  
  8788.  It is not possible to specify the alignment of functions; the alignment of 
  8789.  functions is determined by the machine's requirements and cannot be changed. 
  8790.  You cannot specify alignment for a typedef name because such a name is just an 
  8791.  alias, not a distinct type. 
  8792.  
  8793.  As in the preceding examples, you can explicitly specify the alignment (in 
  8794.  bytes) that you wish the compiler to use for a given variable or structure 
  8795.  field.  Alternatively, you can leave out the alignment factor and just ask the 
  8796.  compiler to align a variable or field to the maximum useful alignment for the 
  8797.  target machine you are compiling for.  For example, you could write: 
  8798.  
  8799.                       short array[3] __attribute__ ((aligned));
  8800.  
  8801.  Whenever you leave out the alignment factor in an aligned attribute 
  8802.  specification, the compiler automatically sets the alignment for the declared 
  8803.  variable or field to the largest alignment which is ever used for any data 
  8804.  type on the target machine you are compiling for.  Doing this can often make 
  8805.  copy operations more efficient, because the compiler can use whatever 
  8806.  instructions copy the biggest chunks of memory when performing copies to or 
  8807.  from the variables or fields that you have aligned this way. 
  8808.  
  8809.  The aligned attribute can only increase the alignment; but you can decrease it 
  8810.  by specifying packed as well.  See below. 
  8811.  
  8812.  Note that the effectiveness of aligned attributes may be limited by inherent 
  8813.  limitations in your linker.  On many systems, the linker is only able to 
  8814.  arrange for variables to be aligned up to a certain maximum alignment.  (For 
  8815.  some linkers, the maximum supported alignment may be very very small.)  If 
  8816.  your linker is only able to align variables up to a maximum of 8 byte 
  8817.  alignment, then specifying aligned(16) in an __attribute__ will still only 
  8818.  provide you with 8 byte alignment.  See your linker documentation for further 
  8819.  information. 
  8820.  
  8821.  mode (mode) 
  8822.            This attribute specifies the data type for the 
  8823.            declaration---whichever type corresponds to the mode mode.  This in 
  8824.            effect lets you request an integer or floating point type according 
  8825.            to its width. 
  8826.  
  8827.            You may also specify a mode of 'byte' or '__byte__' to indicate the 
  8828.            mode corresponding to a one-byte integer, 'word' or '__word__' for 
  8829.            the mode of a one-word integer, and 'pointer' or '__pointer__' for 
  8830.            the mode used to represent pointers. 
  8831.  
  8832.  nocommon 
  8833.            This attribute specifies requests GNU CC not to place a variable 
  8834.            ``common'' but instead to allocate space for it directly.  If you 
  8835.            specify the '-fno-common' flag, GNU CC will do this for all 
  8836.            variables. 
  8837.  
  8838.            Specifying the nocommon attribute for a variable provides an 
  8839.            initialization of zeros.  A variable may only be initialized in one 
  8840.            source file. 
  8841.  
  8842.  packed 
  8843.            The packed attribute specifies that a variable or structure field 
  8844.            should have the smallest possible alignment---one byte for a 
  8845.            variable, and one bit for a field, unless you specify a larger value 
  8846.            with the aligned attribute. 
  8847.  
  8848.            Here is a structure in which the field x is packed, so that it 
  8849.            immediately follows a: 
  8850.  
  8851.                       struct foo
  8852.                       {
  8853.                        char a;
  8854.                        int x[2] __attribute__ ((packed));
  8855.                       };
  8856.  
  8857.  section ("section-name") 
  8858.            Normally, the compiler places the objects it generates in sections 
  8859.            like data and bss.  Sometimes, however, you need additional 
  8860.            sections, or you need certain particular variables to appear in 
  8861.            special sections, for example to map to special hardware.  The 
  8862.            section attribute specifies that a variable (or function) lives in a 
  8863.            particular section.  For example, this small program uses several 
  8864.            specific section names: 
  8865.  
  8866.                       struct duart a __attribute__ ((section ("DUART_A"))) = { 0 };
  8867.                       struct duart b __attribute__ ((section ("DUART_B"))) = { 0 };
  8868.                       char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };
  8869.                       int init_data __attribute__ ((section ("INITDATA"))) = 0;
  8870.                       main()
  8871.                       {
  8872.                        /* Initialize stack pointer */
  8873.                        init_sp (stack + sizeof (stack));
  8874.                        /* Initialize initialized data */
  8875.                        memcpy (&init_data, &data, &edata - &data);
  8876.                        /* Turn on the serial ports */
  8877.                        init_duart (&a);
  8878.                        init_duart (&b);
  8879.                       }
  8880.  
  8881.  Use the section attribute with an initialized definition of a global variable, 
  8882.  as shown in the example.  GNU CC issues a warning and otherwise ignores the 
  8883.  section attribute in uninitialized variable declarations. 
  8884.  
  8885.  You may only use the section attribute with a fully initialized global 
  8886.  definition because of the way linkers work.  The linker requires each object 
  8887.  be defined once, with the exception that uninitialized variables tentatively 
  8888.  go in the common (or bss) section and can be multiply "defined".  You can 
  8889.  force a variable to be initialized with the '-fno-common' flag or the nocommon 
  8890.  attribute. 
  8891.  
  8892.  Some file formats do not support arbitrary sections so the section attribute 
  8893.  is not available on all platforms. If you need to map the entire contents of a 
  8894.  module to a particular section, consider using the facilities of the linker 
  8895.  instead. 
  8896.  
  8897.  transparent_union 
  8898.            This attribute, attached to a function parameter which is a union, 
  8899.            means that the corresponding argument may have the type of any union 
  8900.            member, but the argument is passed as if its type were that of the 
  8901.            first union member.  For more details see See Type Attributes.  You 
  8902.            can also use this attribute on a typedef for a union data type; then 
  8903.            it applies to all function parameters with that type. 
  8904.  
  8905.  unused 
  8906.            This attribute, attached to a variable, means that the variable is 
  8907.            meant to be possibly unused.  GNU CC will not produce a warning for 
  8908.            this variable. 
  8909.  
  8910.  weak 
  8911.            The weak attribute is described in See Function Attributes. 
  8912.  
  8913.  model (model-name) 
  8914.            Use this attribute on the M32R/D to set the addressability of an 
  8915.            object. The identifier model-name is one of small, medium, or large, 
  8916.            representing each of the code models. 
  8917.  
  8918.            Small model objects live in the lower 16MB of memory (so that their 
  8919.            addresses can be loaded with the ld24 instruction). 
  8920.  
  8921.            Medium and large model objects may live anywhere in the 32 bit 
  8922.            address space (the compiler will generate seth/add3 instructions to 
  8923.            load their addresses). 
  8924.  
  8925.  To specify multiple attributes, separate them by commas within the double 
  8926.  parentheses: for example, '__attribute__ ((aligned (16), packed))'. 
  8927.  
  8928.  
  8929. ΓòÉΓòÉΓòÉ 6.29. Specifying Attributes of Types ΓòÉΓòÉΓòÉ
  8930.  
  8931.  The keyword __attribute__ allows you to specify special attributes of struct 
  8932.  and union types when you define such types.  This keyword is followed by an 
  8933.  attribute specification inside double parentheses.  Three attributes are 
  8934.  currently defined for types: aligned, packed, and transparent_union.  Other 
  8935.  attributes are defined for functions (see Function Attributes) and for 
  8936.  variables (see Variable Attributes). 
  8937.  
  8938.  You may also specify any one of these attributes with '__' preceding and 
  8939.  following its keyword.  This allows you to use these attributes in header 
  8940.  files without being concerned about a possible macro of the same name.  For 
  8941.  example, you may use __aligned__ instead of aligned. 
  8942.  
  8943.  You may specify the aligned and transparent_union attributes either in a 
  8944.  typedef declaration or just past the closing curly brace of a complete enum, 
  8945.  struct or union type definition and the packed attribute only past the closing 
  8946.  brace of a definition. 
  8947.  
  8948.  aligned (alignment) 
  8949.            This attribute specifies a minimum alignment (in bytes) for 
  8950.            variables of the specified type.  For example, the declarations: 
  8951.  
  8952.                       struct S { short f[3]; } __attribute__ ((aligned (8)));
  8953.                       typedef int more_aligned_int __attribute__ ((aligned (8)));
  8954.  
  8955.  force the compiler to insure (as far as it can) that each variable whose type 
  8956.  is struct S or more_aligned_int will be allocated and aligned at least on a 
  8957.  8-byte boundary.  On a Sparc, having all variables of type struct S aligned to 
  8958.  8-byte boundaries allows the compiler to use the ldd and std (doubleword load 
  8959.  and store) instructions when copying one variable of type struct S to another, 
  8960.  thus improving run-time efficiency. 
  8961.  
  8962.  Note that the alignment of any given struct or union type is required by the 
  8963.  ANSI C standard to be at least a perfect multiple of the lowest common 
  8964.  multiple of the alignments of all of the members of the struct or union in 
  8965.  question.  This means that you can effectively adjust the alignment of a 
  8966.  struct or union type by attaching an aligned attribute to any one of the 
  8967.  members of such a type, but the notation illustrated in the example above is a 
  8968.  more obvious, intuitive, and readable way to request the compiler to adjust 
  8969.  the alignment of an entire struct or union type. 
  8970.  
  8971.  As in the preceding example, you can explicitly specify the alignment (in 
  8972.  bytes) that you wish the compiler to use for a given struct or union type. 
  8973.  Alternatively, you can leave out the alignment factor and just ask the 
  8974.  compiler to align a type to the maximum useful alignment for the target 
  8975.  machine you are compiling for.  For example, you could write: 
  8976.  
  8977.                       struct S { short f[3]; } __attribute__ ((aligned));
  8978.  
  8979.  Whenever you leave out the alignment factor in an aligned attribute 
  8980.  specification, the compiler automatically sets the alignment for the type to 
  8981.  the largest alignment which is ever used for any data type on the target 
  8982.  machine you are compiling for.  Doing this can often make copy operations more 
  8983.  efficient, because the compiler can use whatever instructions copy the biggest 
  8984.  chunks of memory when performing copies to or from the variables which have 
  8985.  types that you have aligned this way. 
  8986.  
  8987.  In the example above, if the size of each short is 2 bytes, then the size of 
  8988.  the entire struct S type is 6 bytes.  The smallest power of two which is 
  8989.  greater than or equal to that is 8, so the compiler sets the alignment for the 
  8990.  entire struct S type to 8 bytes. 
  8991.  
  8992.  Note that although you can ask the compiler to select a time-efficient 
  8993.  alignment for a given type and then declare only individual stand-alone 
  8994.  objects of that type, the compiler's ability to select a time-efficient 
  8995.  alignment is primarily useful only when you plan to create arrays of variables 
  8996.  having the relevant (efficiently aligned) type.  If you declare or use arrays 
  8997.  of variables of an efficiently-aligned type, then it is likely that your 
  8998.  program will also be doing pointer arithmetic (or subscripting, which amounts 
  8999.  to the same thing) on pointers to the relevant type, and the code that the 
  9000.  compiler generates for these pointer arithmetic operations will often be more 
  9001.  efficient for efficiently-aligned types than for other types. 
  9002.  
  9003.  The aligned attribute can only increase the alignment; but you can decrease it 
  9004.  by specifying packed as well.  See below. 
  9005.  
  9006.  Note that the effectiveness of aligned attributes may be limited by inherent 
  9007.  limitations in your linker.  On many systems, the linker is only able to 
  9008.  arrange for variables to be aligned up to a certain maximum alignment.  (For 
  9009.  some linkers, the maximum supported alignment may be very very small.)  If 
  9010.  your linker is only able to align variables up to a maximum of 8 byte 
  9011.  alignment, then specifying aligned(16) in an __attribute__ will still only 
  9012.  provide you with 8 byte alignment.  See your linker documentation for further 
  9013.  information. 
  9014.  
  9015.  packed 
  9016.            This attribute, attached to an enum, struct, or union type 
  9017.            definition, specified that the minimum required memory be used to 
  9018.            represent the type. 
  9019.  
  9020.            Specifying this attribute for struct and union types is equivalent 
  9021.            to specifying the packed attribute on each of the structure or union 
  9022.            members.  Specifying the '-fshort-enums' flag on the line is 
  9023.            equivalent to specifying the packed attribute on all enum 
  9024.            definitions. 
  9025.  
  9026.            You may only specify this attribute after a closing curly brace on 
  9027.            an enum definition, not in a typedef declaration, unless that 
  9028.            declaration also contains the definition of the enum. 
  9029.  
  9030.  transparent_union 
  9031.            This attribute, attached to a union type definition, indicates that 
  9032.            any function parameter having that union type causes calls to that 
  9033.            function to be treated in a special way. 
  9034.  
  9035.            First, the argument corresponding to a transparent union type can be 
  9036.            of any type in the union; no cast is required.  Also, if the union 
  9037.            contains a pointer type, the corresponding argument can be a null 
  9038.            pointer constant or a void pointer expression; and if the union 
  9039.            contains a void pointer type, the corresponding argument can be any 
  9040.            pointer expression. If the union member type is a pointer, 
  9041.            qualifiers like const on the referenced type must be respected, just 
  9042.            as with normal pointer conversions. 
  9043.  
  9044.            Second, the argument is passed to the function using the calling 
  9045.            conventions of first member of the transparent union, not the 
  9046.            calling conventions of the union itself.  All members of the union 
  9047.            must have the same machine representation; this is necessary for 
  9048.            this argument passing to work properly. 
  9049.  
  9050.            Transparent unions are designed for library functions that have 
  9051.            multiple interfaces for compatibility reasons.  For example, suppose 
  9052.            the wait function must accept either a value of type int * to comply 
  9053.            with Posix, or a value of type union wait * to comply with the 
  9054.            4.1BSD interface.  If wait's parameter were void *, wait would 
  9055.            accept both kinds of arguments, but it would also accept any other 
  9056.            pointer type and this would make argument type checking less useful. 
  9057.            Instead, <sys/wait.h> might define the interface as follows: 
  9058.  
  9059.                       typedef union
  9060.                        {
  9061.                         int *__ip;
  9062.                         union wait *__up;
  9063.                        } wait_status_ptr_t __attribute__ ((__transparent_union__));
  9064.                       pid_t wait (wait_status_ptr_t);
  9065.  
  9066.  This interface allows either int * or union wait * arguments to be passed, 
  9067.  using the int * calling convention. The program can call wait with arguments 
  9068.  of either type: 
  9069.  
  9070.                       int w1 () { int w; return wait (&w); }
  9071.                       int w2 () { union wait w; return wait (&w); }
  9072.  
  9073.  With this interface, wait's implementation might look like this: 
  9074.  
  9075.                       pid_t wait (wait_status_ptr_t p)
  9076.                       {
  9077.                        return waitpid (-1, p.__ip, 0);
  9078.                       }
  9079.  
  9080.  unused 
  9081.            When attached to a type (including a union or a struct), this 
  9082.            attribute means that variables of that type are meant to appear 
  9083.            possibly unused.  GNU CC will not produce a warning for any 
  9084.            variables of that type, even if the variable appears to do nothing. 
  9085.            This is often the case with lock or thread classes, which are 
  9086.            usually defined and then not referenced, but contain constructors 
  9087.            and destructors that have nontrivial bookkeeping functions. 
  9088.  
  9089.  To specify multiple attributes, separate them by commas within the double 
  9090.  parentheses: for example, '__attribute__ ((aligned (16), packed))'. 
  9091.  
  9092.  
  9093. ΓòÉΓòÉΓòÉ 6.30. An Inline Function is As Fast As a Macro ΓòÉΓòÉΓòÉ
  9094.  
  9095.  By declaring a function inline, you can direct GNU CC to integrate that 
  9096.  function's code into the code for its callers.  This makes execution faster by 
  9097.  eliminating the function-call overhead; in addition, if any of the actual 
  9098.  argument values are constant, their known values may permit simplifications at 
  9099.  compile time so that not all of the inline function's code needs to be 
  9100.  included.  The effect on code size is less predictable; object code may be 
  9101.  larger or smaller with function inlining, depending on the particular case. 
  9102.  Inlining of functions is an optimization and it really ``works'' only in 
  9103.  optimizing compilation.  If you don't use '-O', no function is really inline. 
  9104.  
  9105.  To declare a function inline, use the inline keyword in its declaration, like 
  9106.  this: 
  9107.  
  9108.                       inline int
  9109.                       inc (int *a)
  9110.                       {
  9111.                        (*a)++;
  9112.                       }
  9113.  
  9114.  (If you are writing a header file to be included in ANSI C programs, write 
  9115.  __inline__ instead of inline.  See Alternate Keywords.) 
  9116.  
  9117.  You can also make all ``simple enough'' functions inline with the option 
  9118.  '-finline-functions'.  Note that certain usages in a function definition can 
  9119.  make it unsuitable for inline substitution. 
  9120.  
  9121.  Note that in C and Objective C, unlike C++, the inline keyword does not affect 
  9122.  the linkage of the function. 
  9123.  
  9124.  GNU CC automatically inlines member functions defined within the class body of 
  9125.  C++ programs even if they are not explicitly declared inline.  (You can 
  9126.  override this with '-fno-default-inline'; see Options Controlling C++ 
  9127.  Dialect.) 
  9128.  
  9129.  When a function is both inline and static, if all calls to the function are 
  9130.  integrated into the caller, and the function's address is never used, then the 
  9131.  function's own assembler code is never referenced. In this case, GNU CC does 
  9132.  not actually output assembler code for the function, unless you specify the 
  9133.  option '-fkeep-inline-functions'. Some calls cannot be integrated for various 
  9134.  reasons (in particular, calls that precede the function's definition cannot be 
  9135.  integrated, and neither can recursive calls within the definition).  If there 
  9136.  is a nonintegrated call, then the function is compiled to assembler code as 
  9137.  usual.  The function must also be compiled as usual if the program refers to 
  9138.  its address, because that can't be inlined. 
  9139.  
  9140.  When an inline function is not static, then the compiler must assume that 
  9141.  there may be calls from other source files; since a global symbol can be 
  9142.  defined only once in any program, the function must not be defined in the 
  9143.  other source files, so the calls therein cannot be integrated. Therefore, a 
  9144.  non-static inline function is always compiled on its own in the usual fashion. 
  9145.  
  9146.  If you specify both inline and extern in the function definition, then the 
  9147.  definition is used only for inlining.  In no case is the function compiled on 
  9148.  its own, not even if you refer to its address explicitly.  Such an address 
  9149.  becomes an external reference, as if you had only declared the function, and 
  9150.  had not defined it. 
  9151.  
  9152.  This combination of inline and extern has almost the effect of a macro.  The 
  9153.  way to use it is to put a function definition in a header file with these 
  9154.  keywords, and put another copy of the definition (lacking inline and extern) 
  9155.  in a library file. The definition in the header file will cause most calls to 
  9156.  the function to be inlined.  If any uses of the function remain, they will 
  9157.  refer to the single copy in the library. 
  9158.  
  9159.  GNU C does not inline any functions when not optimizing.  It is not clear 
  9160.  whether it is better to inline or not, in this case, but we found that a 
  9161.  correct implementation when not optimizing was difficult.  So we did the easy 
  9162.  thing, and turned it off. 
  9163.  
  9164.  
  9165. ΓòÉΓòÉΓòÉ 6.31. Assembler Instructions with C Expression Operands ΓòÉΓòÉΓòÉ
  9166.  
  9167.  In an assembler instruction using asm, you can specify the operands of the 
  9168.  instruction using C expressions.  This means you need not guess which 
  9169.  registers or memory locations will contain the data you want to use. 
  9170.  
  9171.  You must specify an assembler instruction template much like what appears in a 
  9172.  machine description, plus an operand constraint string for each operand. 
  9173.  
  9174.  For example, here is how to use the 68881's fsinx instruction: 
  9175.  
  9176.                       asm ("fsinx %1,%0" : "=f" (result) : "f" (angle));
  9177.  
  9178.  Here angle is the C expression for the input operand while result is that of 
  9179.  the output operand.  Each has '"f"' as its operand constraint, saying that a 
  9180.  floating point register is required. The '=' in '=f' indicates that the 
  9181.  operand is an output; all output operands' constraints must use '='.  The 
  9182.  constraints use the same language used in the machine description (see 
  9183.  Constraints). 
  9184.  
  9185.  Each operand is described by an operand-constraint string followed by the C 
  9186.  expression in parentheses.  A colon separates the assembler template from the 
  9187.  first output operand and another separates the last output operand from the 
  9188.  first input, if any.  Commas separate the operands within each group.  The 
  9189.  total number of operands is limited to ten or to the maximum number of 
  9190.  operands in any instruction pattern in the machine description, whichever is 
  9191.  greater. 
  9192.  
  9193.  If there are no output operands but there are input operands, you must place 
  9194.  two consecutive colons surrounding the place where the output operands would 
  9195.  go. 
  9196.  
  9197.  Output operand expressions must be lvalues; the compiler can check this. The 
  9198.  input operands need not be lvalues.  The compiler cannot check whether the 
  9199.  operands have data types that are reasonable for the instruction being 
  9200.  executed.  It does not parse the assembler instruction template and does not 
  9201.  know what it means or even whether it is valid assembler input.  The extended 
  9202.  asm feature is most often used for machine instructions the compiler itself 
  9203.  does not know exist.  If the output expression cannot be directly addressed 
  9204.  (for example, it is a bit field), your constraint must allow a register.  In 
  9205.  that case, GNU CC will use the register as the output of the asm, and then 
  9206.  store that register into the output. 
  9207.  
  9208.  The ordinary output operands must be write-only; GNU CC will assume that the 
  9209.  values in these operands before the instruction are dead and need not be 
  9210.  generated.  Extended asm supports input-output or read-write operands.  Use 
  9211.  the constraint character '+' to indicate such an operand and list it with the 
  9212.  output operands. 
  9213.  
  9214.  When the constraints for the read-write operand (or the operand in which only 
  9215.  some of the bits are to be changed) allows a register, you may, as an 
  9216.  alternative, logically split its function into two separate operands, one 
  9217.  input operand and one write-only output operand.  The connection between them 
  9218.  is expressed by constraints which say they need to be in the same location 
  9219.  when the instruction executes.  You can use the same C expression for both 
  9220.  operands, or different expressions.  For example, here we write the 
  9221.  (fictitious) 'combine' instruction with bar as its read-only source operand 
  9222.  and foo as its read-write destination: 
  9223.  
  9224.                       asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar));
  9225.  
  9226.  The constraint '"0"' for operand 1 says that it must occupy the same location 
  9227.  as operand 0.  A digit in constraint is allowed only in an input operand and 
  9228.  it must refer to an output operand. 
  9229.  
  9230.  Only a digit in the constraint can guarantee that one operand will be in the 
  9231.  same place as another.  The mere fact that foo is the value of both operands 
  9232.  is not enough to guarantee that they will be in the same place in the 
  9233.  generated assembler code.  The following would not work reliably: 
  9234.  
  9235.                       asm ("combine %2,%0" : "=r" (foo) : "r" (foo), "g" (bar));
  9236.  
  9237.  Various optimizations or reloading could cause operands 0 and 1 to be in 
  9238.  different registers; GNU CC knows no reason not to do so.  For example, the 
  9239.  compiler might find a copy of the value of foo in one register and use it for 
  9240.  operand 1, but generate the output operand 0 in a different register (copying 
  9241.  it afterward to foo's own address).  Of course, since the register for operand 
  9242.  1 is not even mentioned in the assembler code, the result will not work, but 
  9243.  GNU CC can't tell that. 
  9244.  
  9245.  Some instructions clobber specific hard registers.  To describe this, write a 
  9246.  third colon after the input operands, followed by the names of the clobbered 
  9247.  hard registers (given as strings).  Here is a realistic example for the VAX: 
  9248.  
  9249.                       asm volatile ("movc3 %0,%1,%2"
  9250.                              : /* no outputs */
  9251.                              : "g" (from), "g" (to), "g" (count)
  9252.                              : "r0", "r1", "r2", "r3", "r4", "r5");
  9253.  
  9254.  If you refer to a particular hardware register from the assembler code, you 
  9255.  will probably have to list the register after the third colon to tell the 
  9256.  compiler the register's value is modified.  In some assemblers, the register 
  9257.  names begin with '%'; to produce one '%' in the assembler code, you must write 
  9258.  '%%' in the input. 
  9259.  
  9260.  If your assembler instruction can alter the condition code register, add 'cc' 
  9261.  to the list of clobbered registers.  GNU CC on some machines represents the 
  9262.  condition codes as a specific hardware register; 'cc' serves to name this 
  9263.  register.  On other machines, the condition code is handled differently, and 
  9264.  specifying 'cc' has no effect.  But it is valid no matter what the machine. 
  9265.  
  9266.  If your assembler instruction modifies memory in an unpredictable fashion, add 
  9267.  'memory' to the list of clobbered registers.  This will cause GNU CC to not 
  9268.  keep memory values cached in registers across the assembler instruction. 
  9269.  
  9270.  You can put multiple assembler instructions together in a single asm template, 
  9271.  separated either with newlines (written as '\n') or with semicolons if the 
  9272.  assembler allows such semicolons. The GNU assembler allows semicolons and most 
  9273.  Unix assemblers seem to do so.  The input operands are guaranteed not to use 
  9274.  any of the clobbered registers, and neither will the output operands' 
  9275.  addresses, so you can read and write the clobbered registers as many times as 
  9276.  you like.  Here is an example of multiple instructions in a template; it 
  9277.  assumes the subroutine _foo accepts arguments in registers 9 and 10: 
  9278.  
  9279.                       asm ("movl %0,r9;movl %1,r10;call _foo"
  9280.                          : /* no outputs */
  9281.                          : "g" (from), "g" (to)
  9282.                          : "r9", "r10");
  9283.  
  9284.  Unless an output operand has the '&' constraint modifier, GNU CC may allocate 
  9285.  it in the same register as an unrelated input operand, on the assumption the 
  9286.  inputs are consumed before the outputs are produced. This assumption may be 
  9287.  false if the assembler code actually consists of more than one instruction. 
  9288.  In such a case, use '&' for each output operand that may not overlap an input. 
  9289.  See Modifiers. 
  9290.  
  9291.  If you want to test the condition code produced by an assembler instruction, 
  9292.  you must include a branch and a label in the asm construct, as follows: 
  9293.  
  9294.                       asm ("clr %0;frob %1;beq 0f;mov #1,%0;0:"
  9295.                          : "g" (result)
  9296.                          : "g" (input));
  9297.  
  9298.  This assumes your assembler supports local labels, as the GNU assembler and 
  9299.  most Unix assemblers do. 
  9300.  
  9301.  Speaking of labels, jumps from one asm to another are not supported.  The 
  9302.  compiler's optimizers do not know about these jumps, and therefore they cannot 
  9303.  take account of them when deciding how to optimize. 
  9304.  
  9305.  Usually the most convenient way to use these asm instructions is to 
  9306.  encapsulate them in macros that look like functions.  For example, 
  9307.  
  9308.                       #define sin(x)    \
  9309.                       ({ double __value, __arg = (x);  \
  9310.                         asm ("fsinx %1,%0": "=f" (__value): "f" (__arg));  \
  9311.                         __value; })
  9312.  
  9313.  Here the variable __arg is used to make sure that the instruction operates on 
  9314.  a proper double value, and to accept only those arguments x which can convert 
  9315.  automatically to a double. 
  9316.  
  9317.  Another way to make sure the instruction operates on the correct data type is 
  9318.  to use a cast in the asm.  This is different from using a variable __arg in 
  9319.  that it converts more different types.  For example, if the desired type were 
  9320.  int, casting the argument to int would accept a pointer with no complaint, 
  9321.  while assigning the argument to an int variable named __arg would warn about 
  9322.  using a pointer unless the caller explicitly casts it. 
  9323.  
  9324.  If an asm has output operands, GNU CC assumes for optimization purposes the 
  9325.  instruction has no side effects except to change the output operands.  This 
  9326.  does not mean instructions with a side effect cannot be used, but you must be 
  9327.  careful, because the compiler may eliminate them if the output operands aren't 
  9328.  used, or move them out of loops, or replace two with one if they constitute a 
  9329.  common subexpression.  Also, if your instruction does have a side effect on a 
  9330.  variable that otherwise appears not to change, the old value of the variable 
  9331.  may be reused later if it happens to be found in a register. 
  9332.  
  9333.  You can prevent an asm instruction from being deleted, moved significantly, or 
  9334.  combined, by writing the keyword volatile after the asm.  For example: 
  9335.  
  9336.                       #define get_and_set_priority(new)  \
  9337.                       ({ int __old; \
  9338.                         asm volatile ("get_and_set_priority %0, %1": "=g" (__old) : "g" (new)); \
  9339.                         __old; })
  9340.             b
  9341.  
  9342.  If you write an asm instruction with no outputs, GNU CC will know the 
  9343.  instruction has side-effects and will not delete the instruction or move it 
  9344.  outside of loops.  If the side-effects of your instruction are not purely 
  9345.  external, but will affect variables in your program in ways other than reading 
  9346.  the inputs and clobbering the specified registers or memory, you should write 
  9347.  the volatile keyword to prevent future versions of GNU CC from moving the 
  9348.  instruction around within a core region. 
  9349.  
  9350.  An asm instruction without any operands or clobbers (and ``old style'' asm) 
  9351.  will not be deleted or moved significantly, regardless, unless it is 
  9352.  unreachable, the same wasy as if you had written a volatile keyword. 
  9353.  
  9354.  Note that even a volatile asm instruction can be moved in ways that appear 
  9355.  insignificant to the compiler, such as across jump instructions.  You can't 
  9356.  expect a sequence of volatile asm instructions to remain perfectly 
  9357.  consecutive.  If you want consecutive output, use a single asm. 
  9358.  
  9359.  It is a natural idea to look for a way to give access to the condition code 
  9360.  left by the assembler instruction.  However, when we attempted to implement 
  9361.  this, we found no way to make it work reliably.  The problem is that output 
  9362.  operands might need reloading, which would result in additional following 
  9363.  ``store'' instructions.  On most machines, these instructions would alter the 
  9364.  condition code before there was time to test it.  This problem doesn't arise 
  9365.  for ordinary ``test'' and ``compare'' instructions because they don't have any 
  9366.  output operands. 
  9367.  
  9368.  If you are writing a header file that should be includable in ANSI C programs, 
  9369.  write __asm__ instead of asm.  See Alternate Keywords. 
  9370.  
  9371.  
  9372. ΓòÉΓòÉΓòÉ 6.32. Constraints for asm Operands ΓòÉΓòÉΓòÉ
  9373.  
  9374.  Here are specific details on what constraint letters you can use with asm 
  9375.  operands. Constraints can say whether an operand may be in a register, and 
  9376.  which kinds of register; whether the operand can be a memory reference, and 
  9377.  which kinds of address; whether the operand may be an immediate constant, and 
  9378.  which possible values it may have.  Constraints can also require two operands 
  9379.  to match. 
  9380.  
  9381.  Simple Constraints            Basic use of constraints. 
  9382.  Multi-Alternative             When an insn has two alternative 
  9383.                                constraint-patterns. 
  9384.  Modifiers                     More precise control over effects of 
  9385.                                constraints. 
  9386.  Machine Constraints           Special constraints for some particular 
  9387.                                machines. 
  9388.  
  9389.  
  9390. ΓòÉΓòÉΓòÉ 6.32.1. Simple Constraints ΓòÉΓòÉΓòÉ
  9391.  
  9392.  The simplest kind of constraint is a string full of letters, each of which 
  9393.  describes one kind of operand that is permitted.  Here are the letters that 
  9394.  are allowed: 
  9395.  
  9396.  'm' 
  9397.            A memory operand is allowed, with any kind of address that the 
  9398.            machine supports in general. 
  9399.  
  9400.  'o' 
  9401.            A memory operand is allowed, but only if the address is offsettable. 
  9402.            This means that adding a small integer (actually, the width in bytes 
  9403.            of the operand, as determined by its machine mode) may be added to 
  9404.            the address and the result is also a valid memory address. 
  9405.  
  9406.            For example, an address which is constant is offsettable; so is an 
  9407.            address that is the sum of a register and a constant (as long as a 
  9408.            slightly larger constant is also within the range of address-offsets 
  9409.            supported by the machine); but an autoincrement or autodecrement 
  9410.            address is not offsettable.  More complicated indirect/indexed 
  9411.            addresses may or may not be offsettable depending on the other 
  9412.            addressing modes that the machine supports. 
  9413.  
  9414.            Note that in an output operand which can be matched by another 
  9415.            operand, the constraint letter 'o' is valid only when accompanied by 
  9416.            both '<' (if the target machine has predecrement addressing) and '>' 
  9417.            (if the target machine has preincrement addressing). 
  9418.  
  9419.  'V' 
  9420.            A memory operand that is not offsettable.  In other words, anything 
  9421.            that would fit the 'm' constraint but not the 'o' constraint. 
  9422.  
  9423.  '<' 
  9424.            A memory operand with autodecrement addressing (either predecrement 
  9425.            or postdecrement) is allowed. 
  9426.  
  9427.  '>' 
  9428.            A memory operand with autoincrement addressing (either preincrement 
  9429.            or postincrement) is allowed. 
  9430.  
  9431.  'r' 
  9432.            A register operand is allowed provided that it is in a general 
  9433.            register. 
  9434.  
  9435.  'd', 'a', 'f', ┬╖┬╖┬╖ 
  9436.            Other letters can be defined in machine-dependent fashion to stand 
  9437.            for particular classes of registers.  'd', 'a' and 'f' are defined 
  9438.            on the 68000/68020 to stand for data, address and floating point 
  9439.            registers. 
  9440.  
  9441.  'i' 
  9442.            An immediate integer operand (one with constant value) is allowed. 
  9443.            This includes symbolic constants whose values will be known only at 
  9444.            assembly time. 
  9445.  
  9446.  'n' 
  9447.            An immediate integer operand with a known numeric value is allowed. 
  9448.            Many systems cannot support assembly-time constants for operands 
  9449.            less than a word wide.  Constraints for these operands should use 
  9450.            'n' rather than 'i'. 
  9451.  
  9452.  'I', 'J', 'K', ┬╖┬╖┬╖ 'P' 
  9453.            Other letters in the range 'I' through 'P' may be defined in a 
  9454.            machine-dependent fashion to permit immediate integer operands with 
  9455.            explicit integer values in specified ranges.  For example, on the 
  9456.            68000, 'I' is defined to stand for the range of values 1 to 8. This 
  9457.            is the range permitted as a shift count in the shift instructions. 
  9458.  
  9459.  'E' 
  9460.            An immediate floating operand (expression code const_double) is 
  9461.            allowed, but only if the target floating point format is the same as 
  9462.            that of the host machine (on which the compiler is running). 
  9463.  
  9464.  'F' 
  9465.            An immediate floating operand (expression code const_double) is 
  9466.            allowed. 
  9467.  
  9468.  'G', 'H' 
  9469.            'G' and 'H' may be defined in a machine-dependent fashion to permit 
  9470.            immediate floating operands in particular ranges of values. 
  9471.  
  9472.  's' 
  9473.            An immediate integer operand whose value is not an explicit integer 
  9474.            is allowed. 
  9475.  
  9476.            This might appear strange; if an insn allows a constant operand with 
  9477.            a value not known at compile time, it certainly must allow any known 
  9478.            value.  So why use 's' instead of 'i'?  Sometimes it allows better 
  9479.            code to be generated. 
  9480.  
  9481.            For example, on the 68000 in a fullword instruction it is possible 
  9482.            to use an immediate operand; but if the immediate value is between 
  9483.            -128 and 127, better code results from loading the value into a 
  9484.            register and using the register.  This is because the load into the 
  9485.            register can be done with a 'moveq' instruction.  We arrange for 
  9486.            this to happen by defining the letter 'K' to mean ``any integer 
  9487.            outside the range -128 to 127'', and then specifying 'Ks' in the 
  9488.            operand constraints. 
  9489.  
  9490.  'g' 
  9491.            Any register, memory or immediate integer operand is allowed, except 
  9492.            for registers that are not general registers. 
  9493.  
  9494.  'X' 
  9495.            Any operand whatsoever is allowed. 
  9496.  
  9497.  ' 0', '1', '2', ┬╖┬╖┬╖ '9' 
  9498.            An operand that matches the specified operand number is allowed.  If 
  9499.            a digit is used together with letters within the same alternative, 
  9500.            the digit should come last. 
  9501.  
  9502.            This is called a matching constraint and what it really means is 
  9503.            that the assembler has only a single operand that fills two roles 
  9504.            which asm distinguishes.  For example, an add instruction uses two 
  9505.            input operands and an output operand, but on most CISC machines an 
  9506.            add instruction really has only two operands, one of them an 
  9507.            input-output operand: 
  9508.  
  9509.                       addl #35,r12
  9510.  
  9511.  Matching constraints are used in these circumstances. More precisely, the two 
  9512.  operands that match must include one input-only operand and one output-only 
  9513.  operand.  Moreover, the digit must be a smaller number than the number of the 
  9514.  operand that uses it in the constraint. 
  9515.  
  9516.  'p' 
  9517.            An operand that is a valid memory address is allowed.  This is for 
  9518.            ``load address'' and ``push address'' instructions. 
  9519.  
  9520.            'p' in the constraint must be accompanied by address_operand as the 
  9521.            predicate in the match_operand.  This predicate interprets the mode 
  9522.            specified in the match_operand as the mode of the memory reference 
  9523.            for which the address would be valid. 
  9524.  
  9525.  'Q', 'R', 'S', ┬╖┬╖┬╖ 'U' 
  9526.            Letters in the range 'Q' through 'U' may be defined in a 
  9527.            machine-dependent fashion to stand for arbitrary operand types. 
  9528.  
  9529.  
  9530. ΓòÉΓòÉΓòÉ 6.32.2. Multiple Alternative Constraints ΓòÉΓòÉΓòÉ
  9531.  
  9532.  Sometimes a single instruction has multiple alternative sets of possible 
  9533.  operands.  For example, on the 68000, a logical-or instruction can combine 
  9534.  register or an immediate value into memory, or it can combine any kind of 
  9535.  operand into a register; but it cannot combine one memory location into 
  9536.  another. 
  9537.  
  9538.  These constraints are represented as multiple alternatives.  An alternative 
  9539.  can be described by a series of letters for each operand.  The overall 
  9540.  constraint for an operand is made from the letters for this operand from the 
  9541.  first alternative, a comma, the letters for this operand from the second 
  9542.  alternative, a comma, and so on until the last alternative. 
  9543.  
  9544.  If all the operands fit any one alternative, the instruction is valid. 
  9545.  Otherwise, for each alternative, the compiler counts how many instructions 
  9546.  must be added to copy the operands so that that alternative applies. The 
  9547.  alternative requiring the least copying is chosen.  If two alternatives need 
  9548.  the same amount of copying, the one that comes first is chosen. These choices 
  9549.  can be altered with the '?' and '!' characters: 
  9550.  
  9551.  ? 
  9552.            Disparage slightly the alternative that the '?' appears in, as a 
  9553.            choice when no alternative applies exactly.  The compiler regards 
  9554.            this alternative as one unit more costly for each '?' that appears 
  9555.            in it. 
  9556.  
  9557.  ! 
  9558.            Disparage severely the alternative that the '!' appears in. This 
  9559.            alternative can still be used if it fits without reloading, but if 
  9560.            reloading is needed, some other alternative will be used. 
  9561.  
  9562.  
  9563. ΓòÉΓòÉΓòÉ 6.32.3. Constraint Modifier Characters ΓòÉΓòÉΓòÉ
  9564.  
  9565.  Here are constraint modifier characters. 
  9566.  
  9567.  '=' 
  9568.            Means that this operand is write-only for this instruction: the 
  9569.            previous value is discarded and replaced by output data. 
  9570.  
  9571.  '+' 
  9572.            Means that this operand is both read and written by the instruction. 
  9573.  
  9574.            When the compiler fixes up the operands to satisfy the constraints, 
  9575.            it needs to know which operands are inputs to the instruction and 
  9576.            which are outputs from it.  '=' identifies an output; '+' identifies 
  9577.            an operand that is both input and output; all other operands are 
  9578.            assumed to be input only. 
  9579.  
  9580.  '&' 
  9581.            Means (in a particular alternative) that this operand is an 
  9582.            earlyclobber operand, which is modified before the instruction is 
  9583.            finished using the input operands.  Therefore, this operand may not 
  9584.            lie in a register that is used as an input operand or as part of any 
  9585.            memory address. 
  9586.  
  9587.            '&' applies only to the alternative in which it is written.  In 
  9588.            constraints with multiple alternatives, sometimes one alternative 
  9589.            requires '&' while others do not.  See, for example, the 'movdf' 
  9590.            insn of the 68000. 
  9591.  
  9592.            An input operand can be tied to an earlyclobber operand if its only 
  9593.            use as an input occurs before the early result is written.  Adding 
  9594.            alternatives of this form often allows GCC to produce better code 
  9595.            when only some of the inputs can be affected by the earlyclobber. 
  9596.            See, for example, the 'mulsi3' insn of the ARM. 
  9597.  
  9598.            '&' does not obviate the need to write '='. 
  9599.  
  9600.  '%' 
  9601.            Declares the instruction to be commutative for this operand and the 
  9602.            following operand.  This means that the compiler may interchange the 
  9603.            two operands if that is the cheapest way to make all operands fit 
  9604.            the constraints. 
  9605.  
  9606.  '#' 
  9607.            Says that all following characters, up to the next comma, are to be 
  9608.            ignored as a constraint.  They are significant only for choosing 
  9609.            register preferences. 
  9610.  
  9611.  
  9612. ΓòÉΓòÉΓòÉ 6.32.4. Constraints for Particular Machines ΓòÉΓòÉΓòÉ
  9613.  
  9614.  Whenever possible, you should use the general-purpose constraint letters in 
  9615.  asm arguments, since they will convey meaning more readily to people reading 
  9616.  your code.  Failing that, use the constraint letters that usually have very 
  9617.  similar meanings across architectures.  The most commonly used constraints are 
  9618.  'm' and 'r' (for memory and general-purpose registers respectively; see Simple 
  9619.  Constraints), and 'I', usually the letter indicating the most common 
  9620.  immediate-constant format. 
  9621.  
  9622.  For each machine architecture, the 'config/machine.h' file defines additional 
  9623.  constraints.  These constraints are used by the compiler itself for 
  9624.  instruction generation, as well as for asm statements; therefore, some of the 
  9625.  constraints are not particularly interesting for asm.  The constraints are 
  9626.  defined through these macros: 
  9627.  
  9628.  REG_CLASS_FROM_LETTER 
  9629.            Register class constraints (usually lower case). 
  9630.  
  9631.  CONST_OK_FOR_LETTER_P 
  9632.            Immediate constant constraints, for non-floating point constants of 
  9633.            word size or smaller precision (usually upper case). 
  9634.  
  9635.  CONST_DOUBLE_OK_FOR_LETTER_P 
  9636.            Immediate constant constraints, for all floating point constants and 
  9637.            for constants of greater than word size precision (usually upper 
  9638.            case). 
  9639.  
  9640.  EXTRA_CONSTRAINT 
  9641.            Special cases of registers or memory.  This macro is not required, 
  9642.            and is only defined for some machines. 
  9643.  
  9644.  Inspecting these macro definitions in the compiler source for your machine is 
  9645.  the best way to be certain you have the right constraints. However, here is a 
  9646.  summary of the machine-dependent constraints available on some particular 
  9647.  machines. 
  9648.  
  9649.  ARM family---'arm.h' 
  9650.  
  9651.              f 
  9652.                          Floating-point register 
  9653.  
  9654.              F 
  9655.                          One of the floating-point constants 0.0, 0.5, 1.0, 
  9656.                          2.0, 3.0, 4.0, 5.0 or 10.0 
  9657.  
  9658.              G 
  9659.                          Floating-point constant that would satisfy the 
  9660.                          constraint 'F' if it were negated 
  9661.  
  9662.              I 
  9663.                          Integer that is valid as an immediate operand in a 
  9664.                          data processing instruction.  That is, an integer in 
  9665.                          the range 0 to 255 rotated by a multiple of 2 
  9666.  
  9667.              J 
  9668.                          Integer in the range -4095 to 4095 
  9669.  
  9670.              K 
  9671.                          Integer that satisfies constraint 'I' when inverted 
  9672.                          (ones complement) 
  9673.  
  9674.              L 
  9675.                          Integer that satisfies constraint 'I' when negated 
  9676.                          (twos complement) 
  9677.  
  9678.              M 
  9679.                          Integer in the range 0 to 32 
  9680.  
  9681.              Q 
  9682.                          A memory reference where the exact address is in a 
  9683.                          single register (`'m'' is preferable for asm 
  9684.                          statements) 
  9685.  
  9686.              R 
  9687.                          An item in the constant pool 
  9688.  
  9689.              S 
  9690.                          A symbol in the text segment of the current file 
  9691.  
  9692.  AMD 29000 family---'a29k.h' 
  9693.  
  9694.              l 
  9695.                          Local register 0 
  9696.  
  9697.              b 
  9698.                          Byte Pointer ('BP') register 
  9699.  
  9700.              q 
  9701.                          'Q' register 
  9702.  
  9703.              h 
  9704.                          Special purpose register 
  9705.  
  9706.              A 
  9707.                          First accumulator register 
  9708.  
  9709.              a 
  9710.                          Other accumulator register 
  9711.  
  9712.              f 
  9713.                          Floating point register 
  9714.  
  9715.              I 
  9716.                          Constant greater than 0, less than 0x100 
  9717.  
  9718.              J 
  9719.                          Constant greater than 0, less than 0x10000 
  9720.  
  9721.              K 
  9722.                          Constant whose high 24 bits are on (1) 
  9723.  
  9724.              L 
  9725.                          16 bit constant whose high 8 bits are on (1) 
  9726.  
  9727.              M 
  9728.                          32 bit constant whose high 16 bits are on (1) 
  9729.  
  9730.              N 
  9731.                          32 bit negative constant that fits in 8 bits 
  9732.  
  9733.              O 
  9734.                          The constant 0x80000000 or, on the 29050, any 32 bit 
  9735.                          constant whose low 16 bits are 0. 
  9736.  
  9737.              P 
  9738.                          16 bit negative constant that fits in 8 bits 
  9739.  
  9740.              G 
  9741.  
  9742.              H 
  9743.                          A floating point constant (in asm statements, use the 
  9744.                          machine independent 'E' or 'F' instead) 
  9745.  
  9746.  IBM RS6000---'rs6000.h' 
  9747.  
  9748.              b 
  9749.                          Address base register 
  9750.  
  9751.              f 
  9752.                          Floating point register 
  9753.  
  9754.              h 
  9755.                          'MQ', 'CTR', or 'LINK' register 
  9756.  
  9757.              q 
  9758.                          'MQ' register 
  9759.  
  9760.              c 
  9761.                          'CTR' register 
  9762.  
  9763.              l 
  9764.                          'LINK' register 
  9765.  
  9766.              x 
  9767.                          'CR' register (condition register) number 0 
  9768.  
  9769.              y 
  9770.                          'CR' register (condition register) 
  9771.  
  9772.              I 
  9773.                          Signed 16 bit constant 
  9774.  
  9775.              J 
  9776.                          Constant whose low 16 bits are 0 
  9777.  
  9778.              K 
  9779.                          Constant whose high 16 bits are 0 
  9780.  
  9781.              L 
  9782.                          Constant suitable as a mask operand 
  9783.  
  9784.              M 
  9785.                          Constant larger than 31 
  9786.  
  9787.              N 
  9788.                          Exact power of 2 
  9789.  
  9790.              O 
  9791.                          Zero 
  9792.  
  9793.              P 
  9794.                          Constant whose negation is a signed 16 bit constant 
  9795.  
  9796.              G 
  9797.                          Floating point constant that can be loaded into a 
  9798.                          register with one instruction per word 
  9799.  
  9800.              Q 
  9801.                          Memory operand that is an offset from a register ('m' 
  9802.                          is preferable for asm statements) 
  9803.  
  9804.              R 
  9805.                          AIX TOC entry 
  9806.  
  9807.              S 
  9808.                          Windows NT SYMBOL_REF 
  9809.  
  9810.              T 
  9811.                          Windows NT LABEL_REF 
  9812.  
  9813.              U 
  9814.                          System V Release 4 small data area reference 
  9815.  
  9816.  Intel 386---'i386.h' 
  9817.  
  9818.              q 
  9819.                          'a', b, c, or d register 
  9820.  
  9821.              A 
  9822.                          'a', or d register (for 64-bit ints) 
  9823.  
  9824.              f 
  9825.                          Floating point register 
  9826.  
  9827.              t 
  9828.                          First (top of stack) floating point register 
  9829.  
  9830.              u 
  9831.                          Second floating point register 
  9832.  
  9833.              a 
  9834.                          'a' register 
  9835.  
  9836.              b 
  9837.                          'b' register 
  9838.  
  9839.              c 
  9840.                          'c' register 
  9841.  
  9842.              d 
  9843.                          'd' register 
  9844.  
  9845.              D 
  9846.                          'di' register 
  9847.  
  9848.              S 
  9849.                          'si' register 
  9850.  
  9851.              I 
  9852.                          Constant in range 0 to 31 (for 32 bit shifts) 
  9853.  
  9854.              J 
  9855.                          Constant in range 0 to 63 (for 64 bit shifts) 
  9856.  
  9857.              K 
  9858.                          '0xff' 
  9859.  
  9860.              L 
  9861.                          '0xffff' 
  9862.  
  9863.              M 
  9864.                          0, 1, 2, or 3 (shifts for lea instruction) 
  9865.  
  9866.              N 
  9867.                          Constant in range 0 to 255 (for out instruction) 
  9868.  
  9869.              G 
  9870.                          Standard 80387 floating point constant 
  9871.  
  9872.  Intel 960---'i960.h' 
  9873.  
  9874.              f 
  9875.                          Floating point register (fp0 to fp3) 
  9876.  
  9877.              l 
  9878.                          Local register (r0 to r15) 
  9879.  
  9880.              b 
  9881.                          Global register (g0 to g15) 
  9882.  
  9883.              d 
  9884.                          Any local or global register 
  9885.  
  9886.              I 
  9887.                          Integers from 0 to 31 
  9888.  
  9889.              J 
  9890.                          0 
  9891.  
  9892.              K 
  9893.                          Integers from -31 to 0 
  9894.  
  9895.              G 
  9896.                          Floating point 0 
  9897.  
  9898.              H 
  9899.                          Floating point 1 
  9900.  
  9901.  MIPS---'mips.h' 
  9902.  
  9903.              d 
  9904.                          General-purpose integer register 
  9905.  
  9906.              f 
  9907.                          Floating-point register (if available) 
  9908.  
  9909.              h 
  9910.                          'Hi' register 
  9911.  
  9912.              l 
  9913.                          'Lo' register 
  9914.  
  9915.              x 
  9916.                          'Hi' or 'Lo' register 
  9917.  
  9918.              y 
  9919.                          General-purpose integer register 
  9920.  
  9921.              z 
  9922.                          Floating-point status register 
  9923.  
  9924.              I 
  9925.                          Signed 16 bit constant (for arithmetic instructions) 
  9926.  
  9927.              J 
  9928.                          Zero 
  9929.  
  9930.              K 
  9931.                          Zero-extended 16-bit constant (for logic instructions) 
  9932.  
  9933.              L 
  9934.                          Constant with low 16 bits zero (can be loaded with 
  9935.                          lui) 
  9936.  
  9937.              M 
  9938.                          32 bit constant which requires two instructions to 
  9939.                          load (a constant which is not 'I', 'K', or 'L') 
  9940.  
  9941.              N 
  9942.                          Negative 16 bit constant 
  9943.  
  9944.              O 
  9945.                          Exact power of two 
  9946.  
  9947.              P 
  9948.                          Positive 16 bit constant 
  9949.  
  9950.              G 
  9951.                          Floating point zero 
  9952.  
  9953.              Q 
  9954.                          Memory reference that can be loaded with more than one 
  9955.                          instruction ('m' is preferable for asm statements) 
  9956.  
  9957.              R 
  9958.                          Memory reference that can be loaded with one 
  9959.                          instruction ('m' is preferable for asm statements) 
  9960.  
  9961.              S 
  9962.                          Memory reference in external OSF/rose PIC format ('m' 
  9963.                          is preferable for asm statements) 
  9964.  
  9965.  Motorola 680x0---'m68k.h' 
  9966.  
  9967.              a 
  9968.                          Address register 
  9969.  
  9970.              d 
  9971.                          Data register 
  9972.  
  9973.              f 
  9974.                          68881 floating-point register, if available 
  9975.  
  9976.              x 
  9977.                          Sun FPA (floating-point) register, if available 
  9978.  
  9979.              y 
  9980.                          First 16 Sun FPA registers, if available 
  9981.  
  9982.              I 
  9983.                          Integer in the range 1 to 8 
  9984.  
  9985.              J 
  9986.                          16 bit signed number 
  9987.  
  9988.              K 
  9989.                          Signed number whose magnitude is greater than 0x80 
  9990.  
  9991.              L 
  9992.                          Integer in the range -8 to -1 
  9993.  
  9994.              M 
  9995.                          Signed number whose magnitude is greater than 0x100 
  9996.  
  9997.              G 
  9998.                          Floating point constant that is not a 68881 constant 
  9999.  
  10000.              H 
  10001.                          Floating point constant that can be used by Sun FPA 
  10002.  
  10003.  SPARC---'sparc.h' 
  10004.  
  10005.              f 
  10006.                          Floating-point register that can hold 32 or 64 bit 
  10007.                          values. 
  10008.  
  10009.              e 
  10010.                          Floating-point register that can hold 64 or 128 bit 
  10011.                          values. 
  10012.  
  10013.              I 
  10014.                          Signed 13 bit constant 
  10015.  
  10016.              J 
  10017.                          Zero 
  10018.  
  10019.              K 
  10020.                          32 bit constant with the low 12 bits clear (a constant 
  10021.                          that can be loaded with the sethi instruction) 
  10022.  
  10023.              G 
  10024.                          Floating-point zero 
  10025.  
  10026.              H 
  10027.                          Signed 13 bit constant, sign-extended to 32 or 64 bits 
  10028.  
  10029.              Q 
  10030.                          Memory reference that can be loaded with one 
  10031.                          instruction  ('m' is more appropriate for asm 
  10032.                          statements) 
  10033.  
  10034.              S 
  10035.                          Constant, or memory address 
  10036.  
  10037.              T 
  10038.                          Memory address aligned to an 8-byte boundary 
  10039.  
  10040.              U 
  10041.                          Even register 
  10042.  
  10043.  
  10044. ΓòÉΓòÉΓòÉ 6.33. Controlling Names Used in Assembler Code ΓòÉΓòÉΓòÉ
  10045.  
  10046.  You can specify the name to be used in the assembler code for a C function or 
  10047.  variable by writing the asm (or __asm__) keyword after the declarator as 
  10048.  follows: 
  10049.  
  10050.                       int foo asm ("myfoo") = 2;
  10051.  
  10052.  This specifies that the name to be used for the variable foo in the assembler 
  10053.  code should be 'myfoo' rather than the usual '_foo'. 
  10054.  
  10055.  On systems where an underscore is normally prepended to the name of a C 
  10056.  function or variable, this feature allows you to define names for the linker 
  10057.  that do not start with an underscore. 
  10058.  
  10059.  You cannot use asm in this way in a function definition; but you can get the 
  10060.  same effect by writing a declaration for the function before its definition 
  10061.  and putting asm there, like this: 
  10062.  
  10063.                       extern func () asm ("FUNC");
  10064.                       func (x, y)
  10065.                          int x, y;
  10066.                       ┬╖┬╖┬╖
  10067.  
  10068.  It is up to you to make sure that the assembler names you choose do not 
  10069.  conflict with any other assembler symbols.  Also, you must not use a register 
  10070.  name; that would produce completely invalid assembler code.  GNU CC does not 
  10071.  as yet have the ability to store static variables in registers. Perhaps that 
  10072.  will be added. 
  10073.  
  10074.  
  10075. ΓòÉΓòÉΓòÉ 6.34. Variables in Specified Registers ΓòÉΓòÉΓòÉ
  10076.  
  10077.  GNU C allows you to put a few global variables into specified hardware 
  10078.  registers.  You can also specify the register in which an ordinary register 
  10079.  variable should be allocated. 
  10080.  
  10081.      Global register variables reserve registers throughout the program. This 
  10082.       may be useful in programs such as programming language interpreters which 
  10083.       have a couple of global variables that are accessed very often. 
  10084.  
  10085.      Local register variables in specific registers do not reserve the 
  10086.       registers.  The compiler's data flow analysis is capable of determining 
  10087.       where the specified registers contain live values, and where they are 
  10088.       available for other uses. 
  10089.  
  10090.       These local variables are sometimes convenient for use with the extended 
  10091.       asm feature (see Extended Asm), if you want to write one output of the 
  10092.       assembler instruction directly into a particular register. (This will 
  10093.       work provided the register you specify fits the constraints specified for 
  10094.       that operand in the asm.) 
  10095.  
  10096.  Global Reg Vars               Global Reg Vars 
  10097.  Local Reg Vars                Local Reg Vars 
  10098.  
  10099.  
  10100. ΓòÉΓòÉΓòÉ 6.34.1. Defining Global Register Variables ΓòÉΓòÉΓòÉ
  10101.  
  10102.  You can define a global register variable in GNU C like this: 
  10103.  
  10104.                       register int *foo asm ("a5");
  10105.  
  10106.  Here a5 is the name of the register which should be used.  Choose a register 
  10107.  which is normally saved and restored by function calls on your machine, so 
  10108.  that library routines will not clobber it. 
  10109.  
  10110.  Naturally the register name is cpu-dependent, so you would need to 
  10111.  conditionalize your program according to cpu type.  The register a5 would be a 
  10112.  good choice on a 68000 for a variable of pointer type.  On machines with 
  10113.  register windows, be sure to choose a ``global'' register that is not affected 
  10114.  magically by the function call mechanism. 
  10115.  
  10116.  In addition, operating systems on one type of cpu may differ in how they name 
  10117.  the registers; then you would need additional conditionals.  For example, some 
  10118.  68000 operating systems call this register %a5. 
  10119.  
  10120.  Eventually there may be a way of asking the compiler to choose a register 
  10121.  automatically, but first we need to figure out how it should choose and how to 
  10122.  enable you to guide the choice.  No solution is evident. 
  10123.  
  10124.  Defining a global register variable in a certain register reserves that 
  10125.  register entirely for this use, at least within the current compilation. The 
  10126.  register will not be allocated for any other purpose in the functions in the 
  10127.  current compilation.  The register will not be saved and restored by these 
  10128.  functions.  Stores into this register are never deleted even if they would 
  10129.  appear to be dead, but references may be deleted or moved or simplified. 
  10130.  
  10131.  It is not safe to access the global register variables from signal handlers, 
  10132.  or from more than one thread of control, because the system library routines 
  10133.  may temporarily use the register for other things (unless you recompile them 
  10134.  specially for the task at hand). 
  10135.  
  10136.  It is not safe for one function that uses a global register variable to call 
  10137.  another such function foo by way of a third function lose that was compiled 
  10138.  without knowledge of this variable (i.e. in a different source file in which 
  10139.  the variable wasn't declared).  This is because lose might save the register 
  10140.  and put some other value there. For example, you can't expect a global 
  10141.  register variable to be available in the comparison-function that you pass to 
  10142.  qsort, since qsort might have put something else in that register.  (If you 
  10143.  are prepared to recompile qsort with the same global register variable, you 
  10144.  can solve this problem.) 
  10145.  
  10146.  If you want to recompile qsort or other source files which do not actually use 
  10147.  your global register variable, so that they will not use that register for any 
  10148.  other purpose, then it suffices to specify the compiler option '-ffixed-reg'. 
  10149.  You need not actually add a global register declaration to their source code. 
  10150.  
  10151.  A function which can alter the value of a global register variable cannot 
  10152.  safely be called from a function compiled without this variable, because it 
  10153.  could clobber the value the caller expects to find there on return. Therefore, 
  10154.  the function which is the entry point into the part of the program that uses 
  10155.  the global register variable must explicitly save and restore the value which 
  10156.  belongs to its caller. 
  10157.  
  10158.  On most machines, longjmp will restore to each global register variable the 
  10159.  value it had at the time of the setjmp.  On some machines, however, longjmp 
  10160.  will not change the value of global register variables.  To be portable, the 
  10161.  function that called setjmp should make other arrangements to save the values 
  10162.  of the global register variables, and to restore them in a longjmp.  This way, 
  10163.  the same thing will happen regardless of what longjmp does. 
  10164.  
  10165.  All global register variable declarations must precede all function 
  10166.  definitions.  If such a declaration could appear after function definitions, 
  10167.  the declaration would be too late to prevent the register from being used for 
  10168.  other purposes in the preceding functions. 
  10169.  
  10170.  Global register variables may not have initial values, because an executable 
  10171.  file has no means to supply initial contents for a register. 
  10172.  
  10173.  On the Sparc, there are reports that g3 ┬╖┬╖┬╖ g7 are suitable registers, but 
  10174.  certain library functions, such as getwd, as well as the subroutines for 
  10175.  division and remainder, modify g3 and g4.  g1 and g2 are local temporaries. 
  10176.  
  10177.  On the 68000, a2 ┬╖┬╖┬╖ a5 should be suitable, as should d2 ┬╖┬╖┬╖ d7. Of course, it 
  10178.  will not do to use more than a few of those. 
  10179.  
  10180.  
  10181. ΓòÉΓòÉΓòÉ 6.34.2. Specifying Registers for Local Variables ΓòÉΓòÉΓòÉ
  10182.  
  10183.  You can define a local register variable with a specified register like this: 
  10184.  
  10185.                       register int *foo asm ("a5");
  10186.  
  10187.  Here a5 is the name of the register which should be used.  Note that this is 
  10188.  the same syntax used for defining global register variables, but for a local 
  10189.  variable it would appear within a function. 
  10190.  
  10191.  Naturally the register name is cpu-dependent, but this is not a problem, since 
  10192.  specific registers are most often useful with explicit assembler instructions 
  10193.  (see Extended Asm).  Both of these things generally require that you 
  10194.  conditionalize your program according to cpu type. 
  10195.  
  10196.  In addition, operating systems on one type of cpu may differ in how they name 
  10197.  the registers; then you would need additional conditionals.  For example, some 
  10198.  68000 operating systems call this register %a5. 
  10199.  
  10200.  Defining such a register variable does not reserve the register; it remains 
  10201.  available for other uses in places where flow control determines the 
  10202.  variable's value is not live.  However, these registers are made unavailable 
  10203.  for use in the reload pass; excessive use of this feature leaves the compiler 
  10204.  too few available registers to compile certain functions. 
  10205.  
  10206.  This option does not guarantee that GNU CC will generate code that has this 
  10207.  variable in the register you specify at all times.  You may not code an 
  10208.  explicit reference to this register in an asm statement and assume it will 
  10209.  always refer to this variable. 
  10210.  
  10211.  
  10212. ΓòÉΓòÉΓòÉ 6.35. Alternate Keywords ΓòÉΓòÉΓòÉ
  10213.  
  10214.  The option '-traditional' disables certain keywords; '-ansi' disables certain 
  10215.  others.  This causes trouble when you want to use GNU C extensions, or ANSI C 
  10216.  features, in a general-purpose header file that should be usable by all 
  10217.  programs, including ANSI C programs and traditional ones.  The keywords asm, 
  10218.  typeof and inline cannot be used since they won't work in a program compiled 
  10219.  with '-ansi', while the keywords const, volatile, signed, typeof and inline 
  10220.  won't work in a program compiled with '-traditional'. 
  10221.  
  10222.  The way to solve these problems is to put '__' at the beginning and end of 
  10223.  each problematical keyword.  For example, use __asm__ instead of asm, 
  10224.  __const__ instead of const, and __inline__ instead of inline. 
  10225.  
  10226.  Other C compilers won't accept these alternative keywords; if you want to 
  10227.  compile with another compiler, you can define the alternate keywords as macros 
  10228.  to replace them with the customary keywords.  It looks like this: 
  10229.  
  10230.                       #ifndef __GNUC__
  10231.                       #define __asm__ asm
  10232.                       #endif
  10233.  
  10234.  '-pedantic' causes warnings for many GNU C extensions.  You can prevent such 
  10235.  warnings within one expression by writing __extension__ before the expression. 
  10236.  __extension__ has no effect aside from this. 
  10237.  
  10238.  
  10239. ΓòÉΓòÉΓòÉ 6.36. Incomplete enum Types ΓòÉΓòÉΓòÉ
  10240.  
  10241.  You can define an enum tag without specifying its possible values. This 
  10242.  results in an incomplete type, much like what you get if you write struct foo 
  10243.  without describing the elements.  A later declaration which does specify the 
  10244.  possible values completes the type. 
  10245.  
  10246.  You can't allocate variables or storage using the type while it is incomplete. 
  10247.  However, you can work with pointers to that type. 
  10248.  
  10249.  This extension may not be very useful, but it makes the handling of enum more 
  10250.  consistent with the way struct and union are handled. 
  10251.  
  10252.  This extension is not supported by GNU C++. 
  10253.  
  10254.  
  10255. ΓòÉΓòÉΓòÉ 6.37. Function Names as Strings ΓòÉΓòÉΓòÉ
  10256.  
  10257.  GNU CC predefines two string variables to be the name of the current function. 
  10258.  The variable __FUNCTION__ is the name of the function as it appears in the 
  10259.  source.  The variable __PRETTY_FUNCTION__ is the name of the function pretty 
  10260.  printed in a language specific fashion. 
  10261.  
  10262.  These names are always the same in a C function, but in a C++ function they 
  10263.  may be different.  For example, this program: 
  10264.  
  10265.                       extern "C" {
  10266.                       extern int printf (char *, ┬╖┬╖┬╖);
  10267.                       }
  10268.                       class a {
  10269.                        public:
  10270.                        sub (int i)
  10271.                         {
  10272.                          printf ("__FUNCTION__ = %s\n", __FUNCTION__);
  10273.                          printf ("__PRETTY_FUNCTION__ = %s\n", __PRETTY_FUNCTION__);
  10274.                         }
  10275.                       };
  10276.                       int
  10277.                       main (void)
  10278.                       {
  10279.                        a ax;
  10280.                        ax.sub (0);
  10281.                        return 0;
  10282.                       }
  10283.  
  10284.  gives this output: 
  10285.  
  10286.                       __FUNCTION__ = sub
  10287.                       __PRETTY_FUNCTION__ = int  a::sub (int)
  10288.  
  10289.  These names are not macros: they are predefined string variables. For example, 
  10290.  '#ifdef __FUNCTION__' does not have any special meaning inside a function, 
  10291.  since the preprocessor does not do anything special with the identifier 
  10292.  __FUNCTION__. 
  10293.  
  10294.  
  10295. ΓòÉΓòÉΓòÉ 6.38. Getting the Return or Frame Address of a Function ΓòÉΓòÉΓòÉ
  10296.  
  10297.  These functions may be used to get information about the callers of a 
  10298.  function. 
  10299.  
  10300.  __builtin_return_address (level) 
  10301.            This function returns the return address of the current function, or 
  10302.            of one of its callers.  The level argument is number of frames to 
  10303.            scan up the call stack.  A value of 0 yields the return address of 
  10304.            the current function, a value of 1 yields the return address of the 
  10305.            caller of the current function, and so forth. 
  10306.  
  10307.            The level argument must be a constant integer. 
  10308.  
  10309.            On some machines it may be impossible to determine the return 
  10310.            address of any function other than the current one; in such cases, 
  10311.            or when the top of the stack has been reached, this function will 
  10312.            return 0. 
  10313.  
  10314.            This function should only be used with a non-zero argument for 
  10315.            debugging purposes. 
  10316.  
  10317.  __builtin_frame_address (level) 
  10318.            This function is similar to __builtin_return_address, but it returns 
  10319.            the address of the function frame rather than the return address of 
  10320.            the function.  Calling __builtin_frame_address with a value of 0 
  10321.            yields the frame address of the current function, a value of 1 
  10322.            yields the frame address of the caller of the current function, and 
  10323.            so forth. 
  10324.  
  10325.            The frame is the area on the stack which holds local variables and 
  10326.            saved registers.  The frame address is normally the address of the 
  10327.            first word pushed on to the stack by the function.  However, the 
  10328.            exact definition depends upon the processor and the calling 
  10329.            convention.  If the processor has a dedicated frame pointer 
  10330.            register, and the function has a frame, then __builtin_frame_address 
  10331.            will return the value of the frame pointer register. 
  10332.  
  10333.            The caveats that apply to __builtin_return_address apply to this 
  10334.            function as well. 
  10335.  
  10336.  
  10337. ΓòÉΓòÉΓòÉ 7. Extensions to the C++ Language ΓòÉΓòÉΓòÉ
  10338.  
  10339.  The GNU compiler provides these extensions to the C++ language (and you can 
  10340.  also use most of the C language extensions in your C++ programs).  If you want 
  10341.  to write code that checks whether these features are available, you can test 
  10342.  for the GNU compiler the same way as for C programs: check for a predefined 
  10343.  macro __GNUC__.  You can also use __GNUG__ to test specifically for GNU C++ 
  10344.  (see Section Standard Predefined Macros of The C Preprocessor). 
  10345.  
  10346.  Naming Results                Giving a name to C++ function return values. 
  10347.  Min and Max                   C++ Minimum and maximum operators. 
  10348.  Destructors and Goto          Goto is safe to use in C++ even when destructors 
  10349.                                are needed. 
  10350.  C++ Interface                 You can use a single C++ header file for both 
  10351.                                declarations and definitions. 
  10352.  Template Instantiation        Methods for ensuring that exactly one copy of 
  10353.                                each needed template instantiation is emitted. 
  10354.  C++ Signatures                You can specify abstract types to get subtype 
  10355.                                polymorphism independent from inheritance. 
  10356.  
  10357.  
  10358. ΓòÉΓòÉΓòÉ 7.1. Named Return Values in C++ ΓòÉΓòÉΓòÉ
  10359.  
  10360.  GNU C++ extends the function-definition syntax to allow you to specify a name 
  10361.  for the result of a function outside the body of the definition, in C++ 
  10362.  programs: 
  10363.  
  10364.                       type
  10365.                       functionname (args) return resultname;
  10366.                       {
  10367.                        ┬╖┬╖┬╖
  10368.                        body
  10369.                        ┬╖┬╖┬╖
  10370.                       }
  10371.  
  10372.  You can use this feature to avoid an extra constructor call when a function 
  10373.  result has a class type.  For example, consider a function m, declared as 'X v 
  10374.  = m ();', whose result is of class X: 
  10375.  
  10376.                       X
  10377.                       m ()
  10378.                       {
  10379.                        X b;
  10380.                        b.a = 23;
  10381.                        return b;
  10382.                       }
  10383.  
  10384.  Although m appears to have no arguments, in fact it has one implicit argument: 
  10385.  the address of the return value.  At invocation, the address of enough space 
  10386.  to hold v is sent in as the implicit argument. Then b is constructed and its a 
  10387.  field is set to the value 23.  Finally, a copy constructor (a constructor of 
  10388.  the form 'X(X&)') is applied to b, with the (implicit) return value location 
  10389.  as the target, so that v is now bound to the return value. 
  10390.  
  10391.  But this is wasteful.  The local b is declared just to hold something that 
  10392.  will be copied right out.  While a compiler that combined an ``elision'' 
  10393.  algorithm with interprocedural data flow analysis could conceivably eliminate 
  10394.  all of this, it is much more practical to allow you to assist the compiler in 
  10395.  generating efficient code by manipulating the return value explicitly, thus 
  10396.  avoiding the local variable and copy constructor altogether. 
  10397.  
  10398.  Using the extended GNU C++ function-definition syntax, you can avoid the 
  10399.  temporary allocation and copying by naming r as your return value at the 
  10400.  outset, and assigning to its a field directly: 
  10401.  
  10402.                       X
  10403.                       m () return r;
  10404.                       {
  10405.                        r.a = 23;
  10406.                       }
  10407.  
  10408.  The declaration of r is a standard, proper declaration, whose effects are 
  10409.  executed before any of the body of m. 
  10410.  
  10411.  Functions of this type impose no additional restrictions; in particular, you 
  10412.  can execute return statements, or return implicitly by reaching the end of the 
  10413.  function body (``falling off the edge''). Cases like 
  10414.  
  10415.                       X
  10416.                       m () return r (23);
  10417.                       {
  10418.                        return;
  10419.                       }
  10420.  
  10421.  (or even 'X m () return r (23); { }') are unambiguous, since the return value 
  10422.  r has been initialized in either case.  The following code may be hard to 
  10423.  read, but also works predictably: 
  10424.  
  10425.                       X
  10426.                       m () return r;
  10427.                       {
  10428.                        X b;
  10429.                        return b;
  10430.                       }
  10431.  
  10432.  The return value slot denoted by r is initialized at the outset, but the 
  10433.  statement 'return b;' overrides this value.  The compiler deals with this by 
  10434.  destroying r (calling the destructor if there is one, or doing nothing if 
  10435.  there is not), and then reinitializing r with b. 
  10436.  
  10437.  This extension is provided primarily to help people who use overloaded 
  10438.  operators, where there is a great need to control not just the arguments, but 
  10439.  the return values of functions.  For classes where the copy constructor incurs 
  10440.  a heavy performance penalty (especially in the common case where there is a 
  10441.  quick default constructor), this is a major savings.  The disadvantage of this 
  10442.  extension is that you do not control when the default constructor for the 
  10443.  return value is called: it is always called at the beginning. 
  10444.  
  10445.  
  10446. ΓòÉΓòÉΓòÉ 7.2. Minimum and Maximum Operators in C++ ΓòÉΓòÉΓòÉ
  10447.  
  10448.  It is very convenient to have operators which return the ``minimum'' or the 
  10449.  ``maximum'' of two arguments.  In GNU C++ (but not in GNU C), 
  10450.  
  10451.  a <? b 
  10452.            is the minimum, returning the smaller of the numeric values a and b; 
  10453.  
  10454.  a >? b 
  10455.            is the maximum, returning the larger of the numeric values a and b. 
  10456.  
  10457.  These operations are not primitive in ordinary C++, since you can use a macro 
  10458.  to return the minimum of two things in C++, as in the following example. 
  10459.  
  10460.                       #define MIN(X,Y) ((X) < (Y) ? : (X) : (Y))
  10461.  
  10462.  You might then use 'int min = MIN (i, j);' to set min to the minimum value of 
  10463.  variables i and j. 
  10464.  
  10465.  However, side effects in X or Y may cause unintended behavior.  For example, 
  10466.  MIN (i++, j++) will fail, incrementing the smaller counter twice.  A GNU C 
  10467.  extension allows you to write safe macros that avoid this kind of problem (see 
  10468.  Naming an Expression's Type).  However, writing MIN and MAX as macros also 
  10469.  forces you to use function-call notation for a fundamental arithmetic 
  10470.  operation.  Using GNU C++ extensions, you can write 'int min = i <? j;' 
  10471.  instead. 
  10472.  
  10473.  Since <? and >? are built into the compiler, they properly handle expressions 
  10474.  with side-effects;  'int min = i++ <? j++;' works correctly. 
  10475.  
  10476.  
  10477. ΓòÉΓòÉΓòÉ 7.3. goto and Destructors in GNU C++ ΓòÉΓòÉΓòÉ
  10478.  
  10479.  In C++ programs, you can safely use the goto statement.  When you use it to 
  10480.  exit a block which contains aggregates requiring destructors, the destructors 
  10481.  will run before the goto transfers control. 
  10482.  
  10483.  The compiler still forbids using goto to enter a scope that requires 
  10484.  constructors. 
  10485.  
  10486.  
  10487. ΓòÉΓòÉΓòÉ 7.4. Declarations and Definitions in One Header ΓòÉΓòÉΓòÉ
  10488.  
  10489.  C++ object definitions can be quite complex.  In principle, your source code 
  10490.  will need two kinds of things for each object that you use across more than 
  10491.  one source file.  First, you need an interface specification, describing its 
  10492.  structure with type declarations and function prototypes.  Second, you need 
  10493.  the implementation itself. It can be tedious to maintain a separate interface 
  10494.  description in a header file, in parallel to the actual implementation.  It is 
  10495.  also dangerous, since separate interface and implementation definitions may 
  10496.  not remain parallel. 
  10497.  
  10498.  With GNU C++, you can use a single header file for both purposes. 
  10499.  
  10500.            Warning: The mechanism to specify this is in transition.  For the 
  10501.            nonce, you must use one of two #pragma commands; in a future release 
  10502.            of GNU C++, an alternative mechanism will make these #pragma 
  10503.            commands unnecessary. 
  10504.  
  10505.  The header file contains the full definitions, but is marked with '#pragma 
  10506.  interface' in the source code.  This allows the compiler to use the header 
  10507.  file only as an interface specification when ordinary source files incorporate 
  10508.  it with #include.  In the single source file where the full implementation 
  10509.  belongs, you can use either a naming convention or '#pragma implementation' to 
  10510.  indicate this alternate use of the header file. 
  10511.  
  10512.  #pragma interface 
  10513.  
  10514.  #pragma interface "subdir/objects.h" 
  10515.            Use this directive in header files that define object classes, to 
  10516.            save space in most of the object files that use those classes. 
  10517.            Normally, local copies of certain information (backup copies of 
  10518.            inline member functions, debugging information, and the internal 
  10519.            tables that implement virtual functions) must be kept in each object 
  10520.            file that includes class definitions.  You can use this pragma to 
  10521.            avoid such duplication.  When a header file containing '#pragma 
  10522.            interface' is included in a compilation, this auxiliary information 
  10523.            will not be generated (unless the main input source file itself uses 
  10524.            '#pragma implementation'). Instead, the object files will contain 
  10525.            references to be resolved at link time. 
  10526.  
  10527.            The second form of this directive is useful for the case where you 
  10528.            have multiple headers with the same name in different directories. 
  10529.            If you use this form, you must specify the same string to '#pragma 
  10530.            implementation'. 
  10531.  
  10532.  #pragma implementation 
  10533.  
  10534.  #pragma implementation "objects.h" 
  10535.            Use this pragma in a main input file, when you want full output from 
  10536.            included header files to be generated (and made globally visible). 
  10537.            The included header file, in turn, should use '#pragma interface'. 
  10538.            Backup copies of inline member functions, debugging information, and 
  10539.            the internal tables used to implement virtual functions are all 
  10540.            generated in implementation files. 
  10541.  
  10542.            If you use '#pragma implementation' with no argument, it applies to 
  10543.            an include file with the same basename (3) as your source file.  For 
  10544.            example, in 'allclass.cc', giving just '#pragma implementation' by 
  10545.            itself is equivalent to '#pragma implementation "allclass.h"'. 
  10546.  
  10547.            In versions of GNU C++ prior to 2.6.0 'allclass.h' was treated as an 
  10548.            implementation file whenever you would include it from 'allclass.cc' 
  10549.            even if you never specified '#pragma implementation'.  This was 
  10550.            deemed to be more trouble than it was worth, however, and disabled. 
  10551.  
  10552.            If you use an explicit '#pragma implementation', it must appear in 
  10553.            your source file before you include the affected header files. 
  10554.  
  10555.            Use the string argument if you want a single implementation file to 
  10556.            include code from multiple header files.  (You must also use 
  10557.            '#include' to include the header file; '#pragma implementation' only 
  10558.            specifies how to use the file---it doesn't actually include it.) 
  10559.  
  10560.            There is no way to split up the contents of a single header file 
  10561.            into multiple implementation files. 
  10562.  
  10563.  '#pragma implementation' and '#pragma interface' also have an effect on 
  10564.  function inlining. 
  10565.  
  10566.  If you define a class in a header file marked with '#pragma interface', the 
  10567.  effect on a function defined in that class is similar to an explicit extern 
  10568.  declaration---the compiler emits no code at all to define an independent 
  10569.  version of the function.  Its definition is used only for inlining with its 
  10570.  callers. 
  10571.  
  10572.  Conversely, when you include the same header file in a main source file that 
  10573.  declares it as '#pragma implementation', the compiler emits code for the 
  10574.  function itself; this defines a version of the function that can be found via 
  10575.  pointers (or by callers compiled without inlining).  If all calls to the 
  10576.  function can be inlined, you can avoid emitting the function by compiling with 
  10577.  '-fno-implement-inlines'. If any calls were not inlined, you will get linker 
  10578.  errors. 
  10579.  
  10580.  
  10581. ΓòÉΓòÉΓòÉ 7.5. Where's the Template? ΓòÉΓòÉΓòÉ
  10582.  
  10583.  C++ templates are the first language feature to require more intelligence from 
  10584.  the environment than one usually finds on a UNIX system.  Somehow the compiler 
  10585.  and linker have to make sure that each template instance occurs exactly once 
  10586.  in the executable if it is needed, and not at all otherwise.  There are two 
  10587.  basic approaches to this problem, which I will refer to as the Borland model 
  10588.  and the Cfront model. 
  10589.  
  10590.  Borland model 
  10591.            Borland C++ solved the template instantiation problem by adding the 
  10592.            code equivalent of common blocks to their linker; the compiler emits 
  10593.            template instances in each translation unit that uses them, and the 
  10594.            linker collapses them together.  The advantage of this model is that 
  10595.            the linker only has to consider the object files themselves; there 
  10596.            is no external complexity to worry about.  This disadvantage is that 
  10597.            compilation time is increased because the template code is being 
  10598.            compiled repeatedly. Code written for this model tends to include 
  10599.            definitions of all templates in the header file, since they must be 
  10600.            seen to be instantiated. 
  10601.  
  10602.  Cfront model 
  10603.            The AT&T C++ translator, Cfront, solved the template instantiation 
  10604.            problem by creating the notion of a template repository, an 
  10605.            automatically maintained place where template instances are stored. 
  10606.            A more modern version of the repository works as follows: As 
  10607.            individual object files are built, the compiler places any template 
  10608.            definitions and instantiations encountered in the repository.  At 
  10609.            link time, the link wrapper adds in the objects in the repository 
  10610.            and compiles any needed instances that were not previously emitted. 
  10611.            The advantages of this model are more optimal compilation speed and 
  10612.            the ability to use the system linker; to implement the Borland model 
  10613.            a compiler vendor also needs to replace the linker.  The 
  10614.            disadvantages are vastly increased complexity, and thus potential 
  10615.            for error; for some code this can be just as transparent, but in 
  10616.            practice it can been very difficult to build multiple programs in 
  10617.            one directory and one program in multiple directories.  Code written 
  10618.            for this model tends to separate definitions of non-inline member 
  10619.            templates into a separate file, which should be compiled separately. 
  10620.  
  10621.  When used with GNU ld version 2.8 or later on an ELF system such as Linux/GNU 
  10622.  or Solaris 2, or on Microsoft Windows, g++ supports the Borland model.  On 
  10623.  other systems, g++ implements neither automatic model. 
  10624.  
  10625.  A future version of g++ will support a hybrid model whereby the compiler will 
  10626.  emit any instantiations for which the template definition is included in the 
  10627.  compile, and store template definitions and instantiation context information 
  10628.  into the object file for the rest. The link wrapper will extract that 
  10629.  information as necessary and invoke the compiler to produce the remaining 
  10630.  instantiations.  The linker will then combine duplicate instantiations. 
  10631.  
  10632.  In the mean time, you have the following options for dealing with template 
  10633.  instantiations: 
  10634.  
  10635.    1. Compile your code with '-fno-implicit-templates' to disable the implicit 
  10636.       generation of template instances, and explicitly instantiate all the ones 
  10637.       you use.  This approach requires more knowledge of exactly which 
  10638.       instances you need than do the others, but it's less mysterious and 
  10639.       allows greater control.  You can scatter the explicit instantiations 
  10640.       throughout your program, perhaps putting them in the translation units 
  10641.       where the instances are used or the translation units that define the 
  10642.       templates themselves; you can put all of the explicit instantiations you 
  10643.       need into one big file; or you can create small files like 
  10644.  
  10645.                       #include "Foo.h"
  10646.                       #include "Foo.cc"
  10647.                       template class Foo<int>;
  10648.                       template ostream& operator <<
  10649.                               (ostream&, const Foo<int>&);
  10650.  
  10651.  for each of the instances you need, and create a template instantiation 
  10652.  library from those. 
  10653.  
  10654.  If you are using Cfront-model code, you can probably get away with not using 
  10655.  '-fno-implicit-templates' when compiling files that don't '#include' the 
  10656.  member template definitions. 
  10657.  
  10658.  If you use one big file to do the instantiations, you may want to compile it 
  10659.  without '-fno-implicit-templates' so you get all of the instances required by 
  10660.  your explicit instantiations (but not by any other files) without having to 
  10661.  specify them as well. 
  10662.  
  10663.  g++ has extended the template instantiation syntax outlined in the Working 
  10664.  Paper to allow forward declaration of explicit instantiations, explicit 
  10665.  instantiation of members of template classes and instantiation of the compiler 
  10666.  support data for a template class (i.e. the vtable) without instantiating any 
  10667.  of its members: 
  10668.  
  10669.                       extern template int max (int, int);
  10670.                       template void Foo<int>::f ();
  10671.                       inline template class Foo<int>;
  10672.  
  10673.    2. Do nothing.  Pretend g++ does implement automatic instantiation 
  10674.       management.  Code written for the Borland model will work fine, but each 
  10675.       translation unit will contain instances of each of the templates it uses. 
  10676.       In a large program, this can lead to an unacceptable amount of code 
  10677.       duplication. 
  10678.  
  10679.    3. Add '#pragma interface' to all files containing template definitions. 
  10680.       For each of these files, add '#pragma implementation "filename"' to the 
  10681.       top of some '.C' file which '#include's it.  Then compile everything with 
  10682.       '-fexternal-templates'.  The templates will then only be expanded in the 
  10683.       translation unit which implements them (i.e. has a '#pragma 
  10684.       implementation' line for the file where they live); all other files will 
  10685.       use external references.  If you're lucky, everything should work 
  10686.       properly.  If you get undefined symbol errors, you need to make sure that 
  10687.       each template instance which is used in the program is used in the file 
  10688.       which implements that template.  If you don't have any use for a 
  10689.       particular instance in that file, you can just instantiate it explicitly, 
  10690.       using the syntax from the latest C++ working paper: 
  10691.  
  10692.                       template class A<int>;
  10693.                       template ostream& operator << (ostream&, const A<int>&);
  10694.  
  10695.  This strategy will work with code written for either model.  If you are using 
  10696.  code written for the Cfront model, the file containing a class template and 
  10697.  the file containing its member templates should be implemented in the same 
  10698.  translation unit. 
  10699.  
  10700.  A slight variation on this approach is to instead use the flag 
  10701.  '-falt-external-templates'; this flag causes template instances to be emitted 
  10702.  in the translation unit that implements the header where they are first 
  10703.  instantiated, rather than the one which implements the file where the 
  10704.  templates are defined.  This header must be the same in all translation units, 
  10705.  or things are likely to break. 
  10706.  
  10707.  See Declarations and Definitions in One Header, for more discussion of these 
  10708.  pragmas. 
  10709.  
  10710.  
  10711. ΓòÉΓòÉΓòÉ 7.6. Type Abstraction using Signatures ΓòÉΓòÉΓòÉ
  10712.  
  10713.  In GNU C++, you can use the keyword signature to define a completely abstract 
  10714.  class interface as a datatype.  You can connect this abstraction with actual 
  10715.  classes using signature pointers.  If you want to use signatures, run the GNU 
  10716.  compiler with the '-fhandle-signatures' command-line option.  (With this 
  10717.  option, the compiler reserves a second keyword sigof as well, for a future 
  10718.  extension.) 
  10719.  
  10720.  Roughly, signatures are type abstractions or interfaces of classes. Some other 
  10721.  languages have similar facilities.  C++ signatures are related to ML's 
  10722.  signatures, Haskell's type classes, definition modules in Modula-2, interface 
  10723.  modules in Modula-3, abstract types in Emerald, type modules in Trellis/Owl, 
  10724.  categories in Scratchpad II, and types in POOL-I.  For a more detailed 
  10725.  discussion of signatures, see Signatures: A Language Extension for Improving 
  10726.  Type Abstraction and Subtype Polymorphism in C++ by Gerald Baumgartner and 
  10727.  Vincent F. Russo (Tech report CSD--TR--95--051, Dept. of Computer Sciences, 
  10728.  Purdue University, August 1995, a slightly improved version appeared in 
  10729.  Software---Practice & Experience, 25(8), pp. 863--889, August 1995).  You can 
  10730.  get the tech report by anonymous FTP from ftp.cs.purdue.edu in 
  10731.  'pub/gb/Signature-design.ps.gz'. 
  10732.  
  10733.  Syntactically, a signature declaration is a collection of member function 
  10734.  declarations and nested type declarations. For example, this signature 
  10735.  declaration defines a new abstract type S with member functions 'int foo ()' 
  10736.  and 'int bar (int)': 
  10737.  
  10738.                       signature S
  10739.                       {
  10740.                        int foo ();
  10741.                        int bar (int);
  10742.                       };
  10743.  
  10744.  Since signature types do not include implementation definitions, you cannot 
  10745.  write an instance of a signature directly.  Instead, you can define a pointer 
  10746.  to any class that contains the required interfaces as a signature pointer. 
  10747.  Such a class implements the signature type. To use a class as an 
  10748.  implementation of S, you must ensure that the class has public member 
  10749.  functions 'int foo ()' and 'int bar (int)'.  The class can have other member 
  10750.  functions as well, public or not; as long as it offers what's declared in the 
  10751.  signature, it is suitable as an implementation of that signature type. 
  10752.  
  10753.  For example, suppose that C is a class that meets the requirements of 
  10754.  signature S (C conforms to S).  Then 
  10755.  
  10756.                       C obj;
  10757.                       S * p = &obj;
  10758.  
  10759.  defines a signature pointer p and initializes it to point to an object of type 
  10760.  C. The member function call 'int i = p->foo ();' executes 'obj.foo ()'. 
  10761.  
  10762.  Abstract virtual classes provide somewhat similar facilities in standard C++. 
  10763.  There are two main advantages to using signatures instead: 
  10764.  
  10765.    1. Subtyping becomes independent from inheritance.  A class or signature 
  10766.       type T is a subtype of a signature type S independent of any inheritance 
  10767.       hierarchy as long as all the member functions declared in S are also 
  10768.       found in T.  So you can define a subtype hierarchy that is completely 
  10769.       independent from any inheritance (implementation) hierarchy, instead of 
  10770.       being forced to use types that mirror the class inheritance hierarchy. 
  10771.  
  10772.    2. Signatures allow you to work with existing class hierarchies as 
  10773.       implementations of a signature type.  If those class hierarchies are only 
  10774.       available in compiled form, you're out of luck with abstract virtual 
  10775.       classes, since an abstract virtual class cannot be retrofitted on top of 
  10776.       existing class hierarchies.  So you would be required to write interface 
  10777.       classes as subtypes of the abstract virtual class. 
  10778.  
  10779.  There is one more detail about signatures.  A signature declaration can 
  10780.  contain member function definitions as well as member function declarations. 
  10781.  A signature member function with a full definition is called a default 
  10782.  implementation; classes need not contain that particular interface in order to 
  10783.  conform.  For example, a class C can conform to the signature 
  10784.  
  10785.                       signature T
  10786.                       {
  10787.                        int f (int);
  10788.                        int f0 () { return f (0); };
  10789.                       };
  10790.  
  10791.  whether or not C implements the member function 'int f0 ()'. If you define 
  10792.  C::f0, that definition takes precedence; otherwise, the default implementation 
  10793.  S::f0 applies. 
  10794.  
  10795.  
  10796. ΓòÉΓòÉΓòÉ 8. gcov: a Test Coverage Program ΓòÉΓòÉΓòÉ
  10797.  
  10798.  gcov is a tool you can use in conjunction with GNU CC to test code coverage in 
  10799.  your programs. 
  10800.  
  10801.  This chapter describes version 1.5 of gcov. 
  10802.  
  10803.  Gcov Intro                    Introduction to gcov. 
  10804.  Invoking Gcov                 How to use gcov. 
  10805.  Gcov and Optimization         Using gcov with GCC optimization. 
  10806.  Gcov Data Files               The files used by gcov. 
  10807.  
  10808.  
  10809. ΓòÉΓòÉΓòÉ 8.1. Introduction to gcov ΓòÉΓòÉΓòÉ
  10810.  
  10811.  gcov is a test coverage program.  Use it in concert with GNU CC to analyze 
  10812.  your programs to help create more efficient, faster running code.  You can use 
  10813.  gcov as a profiling tool to help discover where your optimization efforts will 
  10814.  best affect your code.  You can also use gcov along with the other profiling 
  10815.  tool, gprof, to assess which parts of your code use the greatest amount of 
  10816.  computing time. 
  10817.  
  10818.  Profiling tools help you analyze your code's performance.  Using a profiler 
  10819.  such as gcov or gprof, you can find out some basic performance statistics, 
  10820.  such as: 
  10821.  
  10822.      how often each line of code executes 
  10823.  
  10824.      what lines of code are actually executed 
  10825.  
  10826.      how much computing time each section of code uses 
  10827.  
  10828.  Once you know these things about how your code works when compiled, you can 
  10829.  look at each module to see which modules should be optimized. gcov helps you 
  10830.  determine where to work on optimization. 
  10831.  
  10832.  Software developers also use coverage testing in concert with testsuites, to 
  10833.  make sure software is actually good enough for a release. Testsuites can 
  10834.  verify that a program works as expected; a coverage program tests to see how 
  10835.  much of the program is exercised by the testsuite.  Developers can then 
  10836.  determine what kinds of test cases need to be added to the testsuites to 
  10837.  create both better testing and a better final product. 
  10838.  
  10839.  You should compile your code without optimization if you plan to use gcov 
  10840.  because the optimization, by combining some lines of code into one function, 
  10841.  may not give you as much information as you need to look for `hot spots' where 
  10842.  the code is using a great deal of computer time.  Likewise, because gcov 
  10843.  accumulates statistics by line (at the lowest resolution), it works best with 
  10844.  a programming style that places only one statement on each line.  If you use 
  10845.  complicated macros that expand to loops or to other control structures, the 
  10846.  statistics are less helpful---they only report on the line where the macro 
  10847.  call appears.  If your complex macros behave like functions, you can replace 
  10848.  them with inline functions to solve this problem. 
  10849.  
  10850.  gcov creates a logfile called 'sourcefile.gcov' which indicates how many times 
  10851.  each line of a source file 'sourcefile.c' has executed.  You can use these 
  10852.  logfiles along with gprof to aid in fine-tuning the performance of your 
  10853.  programs.  gprof gives timing information you can use along with the 
  10854.  information you get from gcov. 
  10855.  
  10856.  gcov works only on code compiled with GNU CC.  It is not compatible with any 
  10857.  other profiling or test coverage mechanism. 
  10858.  
  10859.  
  10860. ΓòÉΓòÉΓòÉ 8.2. Invoking gcov ΓòÉΓòÉΓòÉ
  10861.  
  10862.                       gcov [-b] [-v] [-n] [-l] [-f] [-o directory] sourcefile
  10863.  
  10864.  -b 
  10865.            Write branch frequencies to the output file, and write branch 
  10866.            summary info to the standard output.  This option allows you to see 
  10867.            how often each branch in your program was taken. 
  10868.  
  10869.  -v 
  10870.            Display the gcov version number (on the standard error stream). 
  10871.  
  10872.  -n 
  10873.            Do not create the gcov output file. 
  10874.  
  10875.  -l 
  10876.            Create long file names for included source files.  For example, if 
  10877.            the header file 'x.h' contains code, and was included in the file 
  10878.            'a.c', then running gcov on the file 'a.c' will produce an output 
  10879.            file called 'a.c.x.h.gcov' instead of 'x.h.gcov'. This can be useful 
  10880.            if 'x.h' is included in multiple source files. 
  10881.  
  10882.  -f 
  10883.            Output summaries for each function in addition to the file level 
  10884.            summary. 
  10885.  
  10886.  -o 
  10887.            The directory where the object files live.  Gcov will search for 
  10888.            .bb, .bbg, and .da files in this directory. 
  10889.  
  10890.  When using gcov, you must first compile your program with two special GNU CC 
  10891.  options: '-fprofile-arcs -ftest-coverage'. This tells the compiler to generate 
  10892.  additional information needed by gcov (basically a flow graph of the program) 
  10893.  and also includes additional code in the object files for generating the extra 
  10894.  profiling information needed by gcov.  These additional files are placed in 
  10895.  the directory where the source code is located. 
  10896.  
  10897.  Running the program will cause profile output to be generated.  For each 
  10898.  source file compiled with -fprofile-arcs, an accompanying .da file will be 
  10899.  placed in the source directory. 
  10900.  
  10901.  Running gcov with your program's source file names as arguments will now 
  10902.  produce a listing of the code along with frequency of execution for each line. 
  10903.  For example, if your program is called 'tmp.c', this is what you see when you 
  10904.  use the basic gcov facility: 
  10905.  
  10906.                       $ gcc -fprofile-arcs -ftest-coverage tmp.c
  10907.                       $ a.out
  10908.                       $ gcov tmp.c
  10909.                        87.50% of 8 source lines executed in file tmp.c
  10910.                       Creating tmp.c.gcov.
  10911.  
  10912.  The file 'tmp.c.gcov' contains output from gcov. Here is a sample: 
  10913.  
  10914.                               main()
  10915.                               {
  10916.                             1    int i, total;
  10917.  
  10918.                             1    total = 0;
  10919.  
  10920.                            11    for (i = 0; i < 10; i++)
  10921.                            10     total += i;
  10922.  
  10923.                             1    if (total != 45)
  10924.                          ######     printf ("Failure\n");
  10925.                                else
  10926.                             1     printf ("Success\n");
  10927.                             1   }
  10928.  
  10929.  When you use the '-b' option, your output looks like this: 
  10930.  
  10931.                       $ gcov -b tmp.c
  10932.                        87.50% of 8 source lines executed in file tmp.c
  10933.                        80.00% of 5 branches executed in file tmp.c
  10934.                        80.00% of 5 branches taken at least once in file tmp.c
  10935.                        50.00% of 2 calls executed in file tmp.c
  10936.                       Creating tmp.c.gcov.
  10937.  
  10938.  Here is a sample of a resulting 'tmp.c.gcov' file: 
  10939.  
  10940.                               main()
  10941.                               {
  10942.                             1    int i, total;
  10943.  
  10944.                             1    total = 0;
  10945.  
  10946.                            11    for (i = 0; i < 10; i++)
  10947.                       branch 0 taken = 91%
  10948.                       branch 1 taken = 100%
  10949.                       branch 2 taken = 100%
  10950.                            10     total += i;
  10951.  
  10952.                             1    if (total != 45)
  10953.                       branch 0 taken = 100%
  10954.                          ######     printf ("Failure\n");
  10955.                       call 0 never executed
  10956.                       branch 1 never executed
  10957.                                else
  10958.                             1     printf ("Success\n");
  10959.                       call 0 returns = 100%
  10960.                             1   }
  10961.  
  10962.  For each basic block, a line is printed after the last line of the basic block 
  10963.  describing the branch or call that ends the basic block.  There can be 
  10964.  multiple branches and calls listed for a single source line if there are 
  10965.  multiple basic blocks that end on that line.  In this case, the branches and 
  10966.  calls are each given a number.  There is no simple way to map these branches 
  10967.  and calls back to source constructs.  In general, though, the lowest numbered 
  10968.  branch or call will correspond to the leftmost construct on the source line. 
  10969.  
  10970.  For a branch, if it was executed at least once, then a percentage indicating 
  10971.  the number of times the branch was taken divided by the number of times the 
  10972.  branch was executed will be printed.  Otherwise, the message ``never 
  10973.  executed'' is printed. 
  10974.  
  10975.  For a call, if it was executed at least once, then a percentage indicating the 
  10976.  number of times the call returned divided by the number of times the call was 
  10977.  executed will be printed.  This will usually be 100%, but may be less for 
  10978.  functions call exit or longjmp, and thus may not return everytime they are 
  10979.  called. 
  10980.  
  10981.  The execution counts are cumulative.  If the example program were executed 
  10982.  again without removing the .da file, the count for the number of times each 
  10983.  line in the source was executed would be added to the results of the previous 
  10984.  run(s).  This is potentially useful in several ways.  For example, it could be 
  10985.  used to accumulate data over a number of program runs as part of a test 
  10986.  verification suite, or to provide more accurate long-term information over a 
  10987.  large number of program runs. 
  10988.  
  10989.  The data in the .da files is saved immediately before the program exits.  For 
  10990.  each source file compiled with -fprofile-arcs, the profiling code first 
  10991.  attempts to read in an existing .da file; if the file doesn't match the 
  10992.  executable (differing number of basic block counts) it will ignore the 
  10993.  contents of the file.  It then adds in the new execution counts and finally 
  10994.  writes the data to the file. 
  10995.  
  10996.  
  10997. ΓòÉΓòÉΓòÉ 8.3. Using gcov with GCC Optimization ΓòÉΓòÉΓòÉ
  10998.  
  10999.  If you plan to use gcov to help optimize your code, you must first compile 
  11000.  your program with two special GNU CC options: '-fprofile-arcs 
  11001.  -ftest-coverage'.  Aside from that, you can use any other GNU CC options; but 
  11002.  if you want to prove that every single line in your program was executed, you 
  11003.  should not compile with optimization at the same time.  On some machines the 
  11004.  optimizer can eliminate some simple code lines by combining them with other 
  11005.  lines.  For example, code like this: 
  11006.  
  11007.                       if (a != b)
  11008.                        c = 1;
  11009.                       else
  11010.                        c = 0;
  11011.  
  11012.  can be compiled into one instruction on some machines.  In this case, there is 
  11013.  no way for gcov to calculate separate execution counts for each line because 
  11014.  there isn't separate code for each line.  Hence the gcov output looks like 
  11015.  this if you compiled the program with optimization: 
  11016.  
  11017.                          100  if (a != b)
  11018.                          100   c = 1;
  11019.                          100  else
  11020.                          100   c = 0;
  11021.  
  11022.  The output shows that this block of code, combined by optimization, executed 
  11023.  100 times.  In one sense this result is correct, because there was only one 
  11024.  instruction representing all four of these lines.  However, the output does 
  11025.  not indicate how many times the result was 0 and how many times the result was 
  11026.  1. 
  11027.  
  11028.  
  11029. ΓòÉΓòÉΓòÉ 8.4. Brief description of gcov data files ΓòÉΓòÉΓòÉ
  11030.  
  11031.  gcov uses three files for doing profiling.  The names of these files are 
  11032.  derived from the original source file by substituting the file suffix with 
  11033.  either .bb, .bbg, or .da.  All of these files are placed in the same directory 
  11034.  as the source file, and contain data stored in a platform-independent method. 
  11035.  
  11036.  The .bb and .bbg files are generated when the source file is compiled with the 
  11037.  GNU CC '-ftest-coverage' option.  The .bb file contains a list of source files 
  11038.  (including headers), functions within those files, and line numbers 
  11039.  corresponding to each basic block in the source file. 
  11040.  
  11041.  The .bb file format consists of several lists of 4-byte integers which 
  11042.  correspond to the line numbers of each basic block in the file.  Each list is 
  11043.  terminated by a line number of 0.  A line number of -1 is used to designate 
  11044.  that the source file name (padded to a 4-byte boundary and followed by another 
  11045.  -1) follows.  In addition, a line number of -2 is used to designate that the 
  11046.  name of a function (also padded to a 4-byte boundary and followed by a -2) 
  11047.  follows. 
  11048.  
  11049.  The .bbg file is used to reconstruct the program flow graph for the source 
  11050.  file.  It contains a list of the program flow arcs (possible branches taken 
  11051.  from one basic block to another) for each function which, in combination with 
  11052.  the .bb file, enables gcov to reconstruct the program flow. 
  11053.  
  11054.  In the .bbg file, the format is: 
  11055.  
  11056.                           number of basic blocks for function #0 (4-byte number)
  11057.                           total number of arcs for function #0 (4-byte number)
  11058.                           count of arcs in basic block #0 (4-byte number)
  11059.                           destination basic block of arc #0 (4-byte number)
  11060.                           flag bits (4-byte number)
  11061.                           destination basic block of arc #1 (4-byte number)
  11062.                           flag bits (4-byte number)
  11063.                           ┬╖┬╖┬╖
  11064.                           destination basic block of arc #N (4-byte number)
  11065.                           flag bits (4-byte number)
  11066.                           count of arcs in basic block #1 (4-byte number)
  11067.                           destination basic block of arc #0 (4-byte number)
  11068.                           flag bits (4-byte number)
  11069.                           ┬╖┬╖┬╖
  11070.  
  11071.  A -1 (stored as a 4-byte number) is used to separate each function's list of 
  11072.  basic blocks, and to verify that the file has been read correctly. 
  11073.  
  11074.  The .da file is generated when a program containing object files built with 
  11075.  the GNU CC '-fprofile-arcs' option is executed.  A separate .da file is 
  11076.  created for each source file compiled with this option, and the name of the 
  11077.  .da file is stored as an absolute pathname in the resulting object file.  This 
  11078.  path name is derived from the source file name by substituting a .da suffix. 
  11079.  
  11080.  The format of the .da file is fairly simple.  The first 8-byte number is the 
  11081.  number of counts in the file, followed by the counts (stored as 8-byte 
  11082.  numbers).  Each count corresponds to the number of times each arc in the 
  11083.  program is executed.  The counts are cumulative; each time the program is 
  11084.  executed, it attemps to combine the existing .da files with the new counts for 
  11085.  this invocation of the program.  It ignores the contents of any .da files 
  11086.  whose number of arcs doesn't correspond to the current program, and merely 
  11087.  overwrites them instead. 
  11088.  
  11089.  All three of these files use the functions in gcov-io.h to store integers; the 
  11090.  functions in this header provide a machine-independent mechanism for storing 
  11091.  and retrieving data from a stream. 
  11092.  
  11093.  
  11094. ΓòÉΓòÉΓòÉ 9. Known Causes of Trouble with GNU CC ΓòÉΓòÉΓòÉ
  11095.  
  11096.  This section describes known problems that affect users of GNU CC.  Most of 
  11097.  these are not GNU CC bugs per se---if they were, we would fix them. But the 
  11098.  result for a user may be like the result of a bug. 
  11099.  
  11100.  Some of these problems are due to bugs in other software, some are missing 
  11101.  features that are too much work to add, and some are places where people's 
  11102.  opinions differ as to what is best. 
  11103.  
  11104.  Actual Bugs                   Bugs we will fix later. 
  11105.  Installation Problems         Problems that manifest when you install GNU CC. 
  11106.  Cross-Compiler Problems       Common problems of cross compiling with GNU CC. 
  11107.  Interoperation                Problems using GNU CC with other compilers, and 
  11108.                                with certain linkers, assemblers and debuggers. 
  11109.  External Bugs                 Problems compiling certain programs. 
  11110.  Incompatibilities             GNU CC is incompatible with traditional C. 
  11111.  Fixed Headers                 GNU C uses corrected versions of system header 
  11112.                                files. This is necessary, but doesn't always 
  11113.                                work smoothly. 
  11114.  Standard Libraries            GNU C uses the system C library, which might not 
  11115.                                be compliant with the ISO/ANSI C standard. 
  11116.  Disappointments               Regrettable things we can't change, but not 
  11117.                                quite bugs. 
  11118.  C++ Misunderstandings         Common misunderstandings with GNU C++. 
  11119.  Protoize Caveats              Things to watch out for when using protoize. 
  11120.  Non-bugs                      Things we think are right, but some others 
  11121.                                disagree. 
  11122.  Warnings and Errors           Which problems in your code get warnings, and 
  11123.                                which get errors. 
  11124.  
  11125.  
  11126. ΓòÉΓòÉΓòÉ 9.1. Actual Bugs We Haven't Fixed Yet ΓòÉΓòÉΓòÉ
  11127.  
  11128.      The fixincludes script interacts badly with automounters; if the 
  11129.       directory of system header files is automounted, it tends to be unmounted 
  11130.       while fixincludes is running.  This would seem to be a bug in the 
  11131.       automounter.  We don't know any good way to work around it. 
  11132.  
  11133.      The fixproto script will sometimes add prototypes for the sigsetjmp and 
  11134.       siglongjmp functions that reference the jmp_buf type before that type is 
  11135.       defined.  To work around this, edit the offending file and place the 
  11136.       typedef in front of the prototypes. 
  11137.  
  11138.      There are several obscure case of mis-using struct, union, and enum tags 
  11139.       that are not detected as errors by the compiler. 
  11140.  
  11141.      When '-pedantic-errors' is specified, GNU C will incorrectly give an 
  11142.       error message when a function name is specified in an expression 
  11143.       involving the comma operator. 
  11144.  
  11145.      Loop unrolling doesn't work properly for certain C++ programs.  This is a 
  11146.       bug in the C++ front end.  It sometimes emits incorrect debug info, and 
  11147.       the loop unrolling code is unable to recover from this error. 
  11148.  
  11149.  
  11150. ΓòÉΓòÉΓòÉ 9.2. Installation Problems ΓòÉΓòÉΓòÉ
  11151.  
  11152.  This is a list of problems (and some apparent problems which don't really mean 
  11153.  anything is wrong) that show up during installation of GNU CC. 
  11154.  
  11155.      On certain systems, defining certain environment variables such as CC can 
  11156.       interfere with the functioning of make. 
  11157.  
  11158.      If you encounter seemingly strange errors when trying to build the 
  11159.       compiler in a directory other than the source directory, it could be 
  11160.       because you have previously configured the compiler in the source 
  11161.       directory.  Make sure you have done all the necessary preparations. See 
  11162.       Other Dir. 
  11163.  
  11164.      If you build GNU CC on a BSD system using a directory stored in a System 
  11165.       V file system, problems may occur in running fixincludes if the System V 
  11166.       file system doesn't support symbolic links.  These problems result in a 
  11167.       failure to fix the declaration of size_t in 'sys/types.h'.  If you find 
  11168.       that size_t is a signed type and that type mismatches occur, this could 
  11169.       be the cause. 
  11170.  
  11171.       The solution is not to use such a directory for building GNU CC. 
  11172.  
  11173.      In previous versions of GNU CC, the gcc driver program looked for as and 
  11174.       ld in various places; for example, in files beginning with 
  11175.       '/usr/local/lib/gcc-'.  GNU CC version 2 looks for them in the directory 
  11176.       '/usr/local/lib/gcc-lib/target/version'. 
  11177.  
  11178.       Thus, to use a version of as or ld that is not the system default, for 
  11179.       example gas or GNU ld, you must put them in that directory (or make links 
  11180.       to them from that directory). 
  11181.  
  11182.      Some commands executed when making the compiler may fail (return a 
  11183.       non-zero status) and be ignored by make.  These failures, which are often 
  11184.       due to files that were not found, are expected, and can safely be 
  11185.       ignored. 
  11186.  
  11187.      It is normal to have warnings in compiling certain files about 
  11188.       unreachable code and about enumeration type clashes.  These files' names 
  11189.       begin with 'insn-'.  Also, 'real.c' may get some warnings that you can 
  11190.       ignore. 
  11191.  
  11192.      Sometimes make recompiles parts of the compiler when installing the 
  11193.       compiler.  In one case, this was traced down to a bug in make.  Either 
  11194.       ignore the problem or switch to GNU Make. 
  11195.  
  11196.      If you have installed a program known as purify, you may find that it 
  11197.       causes errors while linking enquire, which is part of building GNU CC. 
  11198.       The fix is to get rid of the file real-ld which purify installs---so that 
  11199.       GNU CC won't try to use it. 
  11200.  
  11201.      On GNU/Linux SLS 1.01, there is a problem with 'libc.a': it does not 
  11202.       contain the obstack functions.  However, GNU CC assumes that the obstack 
  11203.       functions are in 'libc.a' when it is the GNU C library.  To work around 
  11204.       this problem, change the __GNU_LIBRARY__ conditional around line 31 to 
  11205.       '#if 1'. 
  11206.  
  11207.      On some 386 systems, building the compiler never finishes because enquire 
  11208.       hangs due to a hardware problem in the motherboard---it reports floating 
  11209.       point exceptions to the kernel incorrectly.  You can install GNU CC 
  11210.       except for 'float.h' by patching out the command to run enquire.  You may 
  11211.       also be able to fix the problem for real by getting a replacement 
  11212.       motherboard.  This problem was observed in Revision E of the Micronics 
  11213.       motherboard, and is fixed in Revision F. It has also been observed in the 
  11214.       MYLEX MXA-33 motherboard. 
  11215.  
  11216.       If you encounter this problem, you may also want to consider removing the 
  11217.       FPU from the socket during the compilation.  Alternatively, if you are 
  11218.       running SCO Unix, you can reboot and force the FPU to be ignored. To do 
  11219.       this, type 'hd(40)unix auto ignorefpu'. 
  11220.  
  11221.      On some 386 systems, GNU CC crashes trying to compile 'enquire.c'. This 
  11222.       happens on machines that don't have a 387 FPU chip.  On 386 machines, the 
  11223.       system kernel is supposed to emulate the 387 when you don't have one. 
  11224.       The crash is due to a bug in the emulator. 
  11225.  
  11226.       One of these systems is the Unix from Interactive Systems: 386/ix. On 
  11227.       this system, an alternate emulator is provided, and it does work. To use 
  11228.       it, execute this command as super-user: 
  11229.  
  11230.                       ln /etc/emulator.rel1 /etc/emulator
  11231.  
  11232.  and then reboot the system.  (The default emulator file remains present under 
  11233.  the name 'emulator.dflt'.) 
  11234.  
  11235.  Try using '/etc/emulator.att', if you have such a problem on the SCO system. 
  11236.  
  11237.  Another system which has this problem is Esix.  We don't know whether it has 
  11238.  an alternate emulator that works. 
  11239.  
  11240.  On NetBSD 0.8, a similar problem manifests itself as these error messages: 
  11241.  
  11242.                       enquire.c: In function `fprop':
  11243.                       enquire.c:2328: floating overflow
  11244.  
  11245.      On SCO systems, when compiling GNU CC with the system's compiler, do not 
  11246.       use '-O'.  Some versions of the system's compiler miscompile GNU CC with 
  11247.       '-O'. 
  11248.  
  11249.      Sometimes on a Sun 4 you may observe a crash in the program genflags or 
  11250.       genoutput while building GNU CC.  This is said to be due to a bug in sh. 
  11251.       You can probably get around it by running genflags or genoutput manually 
  11252.       and then retrying the make. 
  11253.  
  11254.      On Solaris 2, executables of GNU CC version 2.0.2 are commonly available, 
  11255.       but they have a bug that shows up when compiling current versions of GNU 
  11256.       CC: undefined symbol errors occur during assembly if you use '-g'. 
  11257.  
  11258.       The solution is to compile the current version of GNU CC without '-g'. 
  11259.       That makes a working compiler which you can use to recompile with '-g'. 
  11260.  
  11261.      Solaris 2 comes with a number of optional OS packages.  Some of these 
  11262.       packages are needed to use GNU CC fully.  If you did not install all 
  11263.       optional packages when installing Solaris, you will need to verify that 
  11264.       the packages that GNU CC needs are installed. 
  11265.  
  11266.       To check whether an optional package is installed, use the pkginfo 
  11267.       command.  To add an optional package, use the pkgadd command.  For 
  11268.       further details, see the Solaris documentation. 
  11269.  
  11270.       For Solaris 2.0 and 2.1, GNU CC needs six packages: 'SUNWarc', 
  11271.       'SUNWbtool', 'SUNWesu', ' SUNWhea', 'SUNWlibm', and 'SUNWtoo'. 
  11272.  
  11273.       For Solaris 2.2, GNU CC needs an additional seventh package: 'SUNWsprot'. 
  11274.  
  11275.      On Solaris 2, trying to use the linker and other tools in '/usr/ucb' to 
  11276.       install GNU CC has been observed to cause trouble. For example, the 
  11277.       linker may hang indefinitely.  The fix is to remove '/usr/ucb' from your 
  11278.       PATH. 
  11279.  
  11280.      If you use the 1.31 version of the MIPS assembler (such as was shipped 
  11281.       with Ultrix 3.1), you will need to use the -fno-delayed-branch switch 
  11282.       when optimizing floating point code.  Otherwise, the assembler will 
  11283.       complain when the GCC compiler fills a branch delay slot with a floating 
  11284.       point instruction, such as add.d. 
  11285.  
  11286.      If on a MIPS system you get an error message saying ``does not have gp 
  11287.       sections for all it's [sic] sectons [sic]'', don't worry about it.  This 
  11288.       happens whenever you use GAS with the MIPS linker, but there is not 
  11289.       really anything wrong, and it is okay to use the output file.  You can 
  11290.       stop such warnings by installing the GNU linker. 
  11291.  
  11292.       It would be nice to extend GAS to produce the gp tables, but they are 
  11293.       optional, and there should not be a warning about their absence. 
  11294.  
  11295.      In Ultrix 4.0 on the MIPS machine, 'stdio.h' does not work with GNU CC at 
  11296.       all unless it has been fixed with fixincludes.  This causes problems in 
  11297.       building GNU CC.  Once GNU CC is installed, the problems go away. 
  11298.  
  11299.       To work around this problem, when making the stage 1 compiler, specify 
  11300.       this option to Make: 
  11301.  
  11302.                       GCC_FOR_TARGET="./xgcc -B./ -I./include"
  11303.  
  11304.  When making stage 2 and stage 3, specify this option: 
  11305.  
  11306.                       CFLAGS="-g -I./include"
  11307.  
  11308.      Users have reported some problems with version 2.0 of the MIPS compiler 
  11309.       tools that were shipped with Ultrix 4.1.  Version 2.10 which came with 
  11310.       Ultrix 4.2 seems to work fine. 
  11311.  
  11312.       Users have also reported some problems with version 2.20 of the MIPS 
  11313.       compiler tools that were shipped with RISC/os 4.x.  The earlier version 
  11314.       2.11 seems to work fine. 
  11315.  
  11316.      Some versions of the MIPS linker will issue an assertion failure when 
  11317.       linking code that uses alloca against shared libraries on RISC-OS 5.0, 
  11318.       and DEC's OSF/1 systems.  This is a bug in the linker, that is supposed 
  11319.       to be fixed in future revisions. To protect against this, GNU CC passes 
  11320.       '-non_shared' to the linker unless you pass an explicit '-shared' or 
  11321.       '-call_shared' switch. 
  11322.  
  11323.      On System V release 3, you may get this error message while linking: 
  11324.  
  11325.                       ld fatal: failed to write symbol name something
  11326.                        in strings table for file whatever
  11327.  
  11328.  This probably indicates that the disk is full or your ULIMIT won't allow the 
  11329.  file to be as large as it needs to be. 
  11330.  
  11331.  This problem can also result because the kernel parameter MAXUMEM is too 
  11332.  small.  If so, you must regenerate the kernel and make the value much larger. 
  11333.  The default value is reported to be 1024; a value of 32768 is said to work. 
  11334.  Smaller values may also work. 
  11335.  
  11336.      On System V, if you get an error like this, 
  11337.  
  11338.                       /usr/local/lib/bison.simple: In function `yyparse':
  11339.                       /usr/local/lib/bison.simple:625: virtual memory exhausted
  11340.  
  11341.  that too indicates a problem with disk space, ULIMIT, or MAXUMEM. 
  11342.  
  11343.      Current GNU CC versions probably do not work on version 2 of the NeXT 
  11344.       operating system. 
  11345.  
  11346.      On NeXTStep 3.0, the Objective C compiler does not work, due, apparently, 
  11347.       to a kernel bug that it happens to trigger.  This problem does not happen 
  11348.       on 3.1. 
  11349.  
  11350.      On the Tower models 4n0 and 6n0, by default a process is not allowed to 
  11351.       have more than one megabyte of memory.  GNU CC cannot compile itself (or 
  11352.       many other programs) with '-O' in that much memory. 
  11353.  
  11354.       To solve this problem, reconfigure the kernel adding the following line 
  11355.       to the configuration file: 
  11356.  
  11357.                       MAXUMEM = 4096
  11358.  
  11359.      On HP 9000 series 300 or 400 running HP-UX release 8.0, there is a bug in 
  11360.       the assembler that must be fixed before GNU CC can be built.  This bug 
  11361.       manifests itself during the first stage of compilation, while building 
  11362.       'libgcc2.a': 
  11363.  
  11364.                       _floatdisf
  11365.                       cc1: warning: `-g' option not supported on this version of GCC
  11366.                       cc1: warning: `-g1' option not supported on this version of GCC
  11367.                       ┬╖/xgcc: Internal compiler error: program as got fatal signal 11
  11368.  
  11369.  A patched version of the assembler is available by anonymous ftp from 
  11370.  altdorf.ai.mit.edu as the file 'archive/cph/hpux-8.0-assembler'.  If you have 
  11371.  HP software support, the patch can also be obtained directly from HP, as 
  11372.  described in the following note: 
  11373.  
  11374.            This is the patched assembler, to patch SR#1653-010439, where the 
  11375.            assembler aborts on floating point constants. 
  11376.  
  11377.            The bug is not really in the assembler, but in the shared library 
  11378.            version of the function ``cvtnum(3c)''.  The bug on ``cvtnum(3c)'' 
  11379.            is SR#4701-078451.  Anyway, the attached assembler uses the archive 
  11380.            library version of ``cvtnum(3c)'' and thus does not exhibit the bug. 
  11381.  
  11382.  This patch is also known as PHCO_4484. 
  11383.  
  11384.      On HP-UX version 8.05, but not on 8.07 or more recent versions, the 
  11385.       fixproto shell script triggers a bug in the system shell. If you 
  11386.       encounter this problem, upgrade your operating system or use BASH (the 
  11387.       GNU shell) to run fixproto. 
  11388.  
  11389.      Some versions of the Pyramid C compiler are reported to be unable to 
  11390.       compile GNU CC.  You must use an older version of GNU CC for 
  11391.       bootstrapping.  One indication of this problem is if you get a crash when 
  11392.       GNU CC compiles the function muldi3 in file 'libgcc2.c'. 
  11393.  
  11394.       You may be able to succeed by getting GNU CC version 1, installing it, 
  11395.       and using it to compile GNU CC version 2.  The bug in the Pyramid C 
  11396.       compiler does not seem to affect GNU CC version 1. 
  11397.  
  11398.      There may be similar problems on System V Release 3.1 on 386 systems. 
  11399.  
  11400.      On the Intel Paragon (an i860 machine), if you are using operating system 
  11401.       version 1.0, you will get warnings or errors about redefinition of va_arg 
  11402.       when you build GNU CC. 
  11403.  
  11404.       If this happens, then you need to link most programs with the library 
  11405.       'iclib.a'.  You must also modify 'stdio.h' as follows: before the lines 
  11406.  
  11407.                       #if   defined(__i860__) && !defined(_VA_LIST)
  11408.                       #include <va_list.h>
  11409.  
  11410.  insert the line 
  11411.  
  11412.                       #if __PGC__
  11413.  
  11414.  and after the lines 
  11415.  
  11416.                       extern int  vprintf(const char *, va_list );
  11417.                       extern int  vsprintf(char *, const char *, va_list );
  11418.                       #endif
  11419.  
  11420.  insert the line 
  11421.  
  11422.                       #endif /* __PGC__ */
  11423.  
  11424.  These problems don't exist in operating system version 1.1. 
  11425.  
  11426.      On the Altos 3068, programs compiled with GNU CC won't work unless you 
  11427.       fix a kernel bug.  This happens using system versions V.2.2 1.0gT1 and 
  11428.       V.2.2 1.0e and perhaps later versions as well.  See the file 
  11429.       'README.ALTOS'. 
  11430.  
  11431.      You will get several sorts of compilation and linking errors on the we32k 
  11432.       if you don't follow the special instructions.  See Configurations. 
  11433.  
  11434.      A bug in the HP-UX 8.05 (and earlier) shell will cause the fixproto 
  11435.       program to report an error of the form: 
  11436.  
  11437.                       ┬╖/fixproto: sh internal 1K buffer overflow
  11438.  
  11439.  To fix this, change the first line of the fixproto script to look like: 
  11440.  
  11441.                       #!/bin/ksh
  11442.  
  11443.  
  11444. ΓòÉΓòÉΓòÉ 9.3. Cross-Compiler Problems ΓòÉΓòÉΓòÉ
  11445.  
  11446.  You may run into problems with cross compilation on certain machines, for 
  11447.  several reasons. 
  11448.  
  11449.      Cross compilation can run into trouble for certain machines because some 
  11450.       target machines' assemblers require floating point numbers to be written 
  11451.       as integer constants in certain contexts. 
  11452.  
  11453.       The compiler writes these integer constants by examining the floating 
  11454.       point value as an integer and printing that integer, because this is 
  11455.       simple to write and independent of the details of the floating point 
  11456.       representation.  But this does not work if the compiler is running on a 
  11457.       different machine with an incompatible floating point format, or even a 
  11458.       different byte-ordering. 
  11459.  
  11460.       In addition, correct constant folding of floating point values requires 
  11461.       representing them in the target machine's format. (The C standard does 
  11462.       not quite require this, but in practice it is the only way to win.) 
  11463.  
  11464.       It is now possible to overcome these problems by defining macros such as 
  11465.       REAL_VALUE_TYPE.  But doing so is a substantial amount of work for each 
  11466.       target machine. See Section Cross Compilation and Floating Point Format 
  11467.       of Using and Porting GCC. 
  11468.  
  11469.      At present, the program 'mips-tfile' which adds debug support to object 
  11470.       files on MIPS systems does not work in a cross compile environment. 
  11471.  
  11472.  
  11473. ΓòÉΓòÉΓòÉ 9.4. Interoperation ΓòÉΓòÉΓòÉ
  11474.  
  11475.  This section lists various difficulties encountered in using GNU C or GNU C++ 
  11476.  together with other compilers or with the assemblers, linkers, libraries and 
  11477.  debuggers on certain systems. 
  11478.  
  11479.      Objective C does not work on the RS/6000. 
  11480.  
  11481.      GNU C++ does not do name mangling in the same way as other C++ compilers. 
  11482.       This means that object files compiled with one compiler cannot be used 
  11483.       with another. 
  11484.  
  11485.       This effect is intentional, to protect you from more subtle problems. 
  11486.       Compilers differ as to many internal details of C++ implementation, 
  11487.       including: how class instances are laid out, how multiple inheritance is 
  11488.       implemented, and how virtual function calls are handled.  If the name 
  11489.       encoding were made the same, your programs would link against libraries 
  11490.       provided from other compilers---but the programs would then crash when 
  11491.       run.  Incompatible libraries are then detected at link time, rather than 
  11492.       at run time. 
  11493.  
  11494.      Older GDB versions sometimes fail to read the output of GNU CC version 2. 
  11495.       If you have trouble, get GDB version 4.4 or later. 
  11496.  
  11497.      DBX rejects some files produced by GNU CC, though it accepts similar 
  11498.       constructs in output from PCC.  Until someone can supply a coherent 
  11499.       description of what is valid DBX input and what is not, there is nothing 
  11500.       I can do about these problems.  You are on your own. 
  11501.  
  11502.      The GNU assembler (GAS) does not support PIC.  To generate PIC code, you 
  11503.       must use some other assembler, such as '/bin/as'. 
  11504.  
  11505.      On some BSD systems, including some versions of Ultrix, use of profiling 
  11506.       causes static variable destructors (currently used only in C++) not to be 
  11507.       run. 
  11508.  
  11509.      Use of '-I/usr/include' may cause trouble. 
  11510.  
  11511.       Many systems come with header files that won't work with GNU CC unless 
  11512.       corrected by fixincludes.  The corrected header files go in a new 
  11513.       directory; GNU CC searches this directory before '/usr/include'. If you 
  11514.       use '-I/usr/include', this tells GNU CC to search '/usr/include' earlier 
  11515.       on, before the corrected headers.  The result is that you get the 
  11516.       uncorrected header files. 
  11517.  
  11518.       Instead, you should use these options (when compiling C programs): 
  11519.  
  11520.                       -I/usr/local/lib/gcc-lib/target/version/include -I/usr/include
  11521.  
  11522.  For C++ programs, GNU CC also uses a special directory that defines C++ 
  11523.  interfaces to standard C subroutines.  This directory is meant to be searched 
  11524.  before other standard include directories, so that it takes precedence.  If 
  11525.  you are compiling C++ programs and specifying include directories explicitly, 
  11526.  use this option first, then the two options above: 
  11527.  
  11528.                       -I/usr/local/lib/g++-include
  11529.  
  11530.      On some SGI systems, when you use '-lgl_s' as an option, it gets 
  11531.       translated magically to '-lgl_s -lX11_s -lc_s'. Naturally, this does not 
  11532.       happen when you use GNU CC. You must specify all three options 
  11533.       explicitly. 
  11534.  
  11535.      On a Sparc, GNU CC aligns all values of type double on an 8-byte 
  11536.       boundary, and it expects every double to be so aligned.  The Sun compiler 
  11537.       usually gives double values 8-byte alignment, with one exception: 
  11538.       function arguments of type double may not be aligned. 
  11539.  
  11540.       As a result, if a function compiled with Sun CC takes the address of an 
  11541.       argument of type double and passes this pointer of type double * to a 
  11542.       function compiled with GNU CC, dereferencing the pointer may cause a 
  11543.       fatal signal. 
  11544.  
  11545.       One way to solve this problem is to compile your entire program with GNU 
  11546.       CC.  Another solution is to modify the function that is compiled with Sun 
  11547.       CC to copy the argument into a local variable; local variables are always 
  11548.       properly aligned.  A third solution is to modify the function that uses 
  11549.       the pointer to dereference it via the following function access_double 
  11550.       instead of directly with '*': 
  11551.  
  11552.                       inline double
  11553.                       access_double (double *unaligned_ptr)
  11554.                       {
  11555.                        union d2i { double d; int i[2]; };
  11556.                        union d2i *p = (union d2i *) unaligned_ptr;
  11557.                        union d2i u;
  11558.                        u.i[0] = p->i[0];
  11559.                        u.i[1] = p->i[1];
  11560.                        return u.d;
  11561.                       }
  11562.  
  11563.  Storing into the pointer can be done likewise with the same union. 
  11564.  
  11565.      On Solaris, the malloc function in the 'libmalloc.a' library may allocate 
  11566.       memory that is only 4 byte aligned.  Since GNU CC on the Sparc assumes 
  11567.       that doubles are 8 byte aligned, this may result in a fatal signal if 
  11568.       doubles are stored in memory allocated by the 'libmalloc.a' library. 
  11569.  
  11570.       The solution is to not use the 'libmalloc.a' library.  Use instead malloc 
  11571.       and related functions from 'libc.a'; they do not have this problem. 
  11572.  
  11573.      Sun forgot to include a static version of 'libdl.a' with some versions of 
  11574.       SunOS (mainly 4.1).  This results in undefined symbols when linking 
  11575.       static binaries (that is, if you use '-static').  If you see undefined 
  11576.       symbols _dlclose, _dlsym or _dlopen when linking, compile and link 
  11577.       against the file 'mit/util/misc/dlsym.c' from the MIT version of X 
  11578.       windows. 
  11579.  
  11580.      The 128-bit long double format that the Sparc port supports currently 
  11581.       works by using the architecturally defined quad-word floating point 
  11582.       instructions.  Since there is no hardware that supports these 
  11583.       instructions they must be emulated by the operating system.  Long doubles 
  11584.       do not work in Sun OS versions 4.0.3 and earlier, because the kernel 
  11585.       emulator uses an obsolete and incompatible format.  Long doubles do not 
  11586.       work in Sun OS version 4.1.1 due to a problem in a Sun library. Long 
  11587.       doubles do work on Sun OS versions 4.1.2 and higher, but GNU CC does not 
  11588.       enable them by default.  Long doubles appear to work in Sun OS 5.x 
  11589.       (Solaris 2.x). 
  11590.  
  11591.      On HP-UX version 9.01 on the HP PA, the HP compiler cc does not compile 
  11592.       GNU CC correctly.  We do not yet know why.  However, GNU CC compiled on 
  11593.       earlier HP-UX versions works properly on HP-UX 9.01 and can compile 
  11594.       itself properly on 9.01. 
  11595.  
  11596.      On the HP PA machine, ADB sometimes fails to work on functions compiled 
  11597.       with GNU CC.  Specifically, it fails to work on functions that use alloca 
  11598.       or variable-size arrays.  This is because GNU CC doesn't generate HP-UX 
  11599.       unwind descriptors for such functions.  It may even be impossible to 
  11600.       generate them. 
  11601.  
  11602.      Debugging ('-g') is not supported on the HP PA machine, unless you use 
  11603.       the preliminary GNU tools (see Installation). 
  11604.  
  11605.      Taking the address of a label may generate errors from the HP-UX PA 
  11606.       assembler.  GAS for the PA does not have this problem. 
  11607.  
  11608.      Using floating point parameters for indirect calls to static functions 
  11609.       will not work when using the HP assembler.  There simply is no way for 
  11610.       GCC to specify what registers hold arguments for static functions when 
  11611.       using the HP assembler.  GAS for the PA does not have this problem. 
  11612.  
  11613.      In extremely rare cases involving some very large functions you may 
  11614.       receive errors from the HP linker complaining about an out of bounds 
  11615.       unconditional branch offset.  This used to occur more often in previous 
  11616.       versions of GNU CC, but is now exceptionally rare.  If you should run 
  11617.       into it, you can work around by making your function smaller. 
  11618.  
  11619.      GNU CC compiled code sometimes emits warnings from the HP-UX assembler of 
  11620.       the form: 
  11621.  
  11622.                       (warning) Use of GR3 when
  11623.                        frame >= 8192 may cause conflict.
  11624.  
  11625.  These warnings are harmless and can be safely ignored. 
  11626.  
  11627.      The current version of the assembler ('/bin/as') for the RS/6000 has 
  11628.       certain problems that prevent the '-g' option in GCC from working.  Note 
  11629.       that 'Makefile.in' uses '-g' by default when compiling 'libgcc2.c'. 
  11630.  
  11631.       IBM has produced a fixed version of the assembler.  The upgraded 
  11632.       assembler unfortunately was not included in any of the AIX 3.2 update PTF 
  11633.       releases (3.2.2, 3.2.3, or 3.2.3e).  Users of AIX 3.1 should request PTF 
  11634.       U403044 from IBM and users of AIX 3.2 should request PTF U416277. See the 
  11635.       file 'README.RS6000' for more details on these updates. 
  11636.  
  11637.       You can test for the presense of a fixed assembler by using the command 
  11638.  
  11639.                       as -u < /dev/null
  11640.  
  11641.  If the command exits normally, the assembler fix already is installed. If the 
  11642.  assembler complains that "-u" is an unknown flag, you need to order the fix. 
  11643.  
  11644.      On the IBM RS/6000, compiling code of the form 
  11645.  
  11646.                       extern int foo;
  11647.                       ┬╖┬╖┬╖ foo ┬╖┬╖┬╖
  11648.                       static int foo;
  11649.  
  11650.  will cause the linker to report an undefined symbol foo. Although this 
  11651.  behavior differs from most other systems, it is not a bug because redefining 
  11652.  an extern variable as static is undefined in ANSI C. 
  11653.  
  11654.      AIX on the RS/6000 provides support (NLS) for environments outside of the 
  11655.       United States.  Compilers and assemblers use NLS to support 
  11656.       locale-specific representations of various objects including 
  11657.       floating-point numbers ("." vs "," for separating decimal fractions). 
  11658.       There have been problems reported where the library linked with GCC does 
  11659.       not produce the same floating-point formats that the assembler accepts. 
  11660.       If you have this problem, set the LANG environment variable to "C" or 
  11661.       "En_US". 
  11662.  
  11663.      Even if you specify '-fdollars-in-identifiers', you cannot successfully 
  11664.       use '$' in identifiers on the RS/6000 due to a restriction in the IBM 
  11665.       assembler.  GAS supports these identifiers. 
  11666.  
  11667.      On the RS/6000, XLC version 1.3.0.0 will miscompile 'jump.c'.  XLC 
  11668.       version 1.3.0.1 or later fixes this problem.  You can obtain XLC-1.3.0.2 
  11669.       by requesting PTF 421749 from IBM. 
  11670.  
  11671.      There is an assembler bug in versions of DG/UX prior to 5.4.2.01 that 
  11672.       occurs when the 'fldcr' instruction is used.  GNU CC uses 'fldcr' on the 
  11673.       88100 to serialize volatile memory references.  Use the option 
  11674.       '-mno-serialize-volatile' if your version of the assembler has this bug. 
  11675.  
  11676.      On VMS, GAS versions 1.38.1 and earlier may cause spurious warning 
  11677.       messages from the linker.  These warning messages complain of mismatched 
  11678.       psect attributes.  You can ignore them.  See VMS Install. 
  11679.  
  11680.      On NewsOS version 3, if you include both of the files 'stddef.h' and 
  11681.       'sys/types.h', you get an error because there are two typedefs of size_t. 
  11682.       You should change 'sys/types.h' by adding these lines around the 
  11683.       definition of size_t: 
  11684.  
  11685.                       #ifndef _SIZE_T
  11686.                       #define _SIZE_T
  11687.                       actual typedef here
  11688.                       #endif
  11689.  
  11690.      On the Alliant, the system's own convention for returning structures and 
  11691.       unions is unusual, and is not compatible with GNU CC no matter what 
  11692.       options are used. 
  11693.  
  11694.      On the IBM RT PC, the MetaWare HighC compiler (hc) uses a different 
  11695.       convention for structure and union returning.  Use the option 
  11696.       '-mhc-struct-return' to tell GNU CC to use a convention compatible with 
  11697.       it. 
  11698.  
  11699.      On Ultrix, the Fortran compiler expects registers 2 through 5 to be saved 
  11700.       by function calls.  However, the C compiler uses conventions compatible 
  11701.       with BSD Unix: registers 2 through 5 may be clobbered by function calls. 
  11702.  
  11703.       GNU CC uses the same convention as the Ultrix C compiler.  You can use 
  11704.       these options to produce code compatible with the Fortran compiler: 
  11705.  
  11706.                       -fcall-saved-r2 -fcall-saved-r3 -fcall-saved-r4 -fcall-saved-r5
  11707.  
  11708.      On the WE32k, you may find that programs compiled with GNU CC do not work 
  11709.       with the standard shared C library.  You may need to link with the 
  11710.       ordinary C compiler.  If you do so, you must specify the following 
  11711.       options: 
  11712.  
  11713.                       -L/usr/local/lib/gcc-lib/we32k-att-sysv/2.8.1 -lgcc -lc_s
  11714.  
  11715.  The first specifies where to find the library 'libgcc.a' specified with the 
  11716.  '-lgcc' option. 
  11717.  
  11718.  GNU CC does linking by invoking ld, just as cc does, and there is no reason 
  11719.  why it should matter which compilation program you use to invoke ld.  If 
  11720.  someone tracks this problem down, it can probably be fixed easily. 
  11721.  
  11722.      On the Alpha, you may get assembler errors about invalid syntax as a 
  11723.       result of floating point constants.  This is due to a bug in the C 
  11724.       library functions ecvt, fcvt and gcvt.  Given valid floating point 
  11725.       numbers, they sometimes print 'NaN'. 
  11726.  
  11727.      On Irix 4.0.5F (and perhaps in some other versions), an assembler bug 
  11728.       sometimes reorders instructions incorrectly when optimization is turned 
  11729.       on.  If you think this may be happening to you, try using the GNU 
  11730.       assembler; GAS version 2.1 supports ECOFF on Irix. 
  11731.  
  11732.       Or use the '-noasmopt' option when you compile GNU CC with itself, and 
  11733.       then again when you compile your program.  (This is a temporary kludge to 
  11734.       turn off assembler optimization on Irix.)  If this proves to be what you 
  11735.       need, edit the assembler spec in the file 'specs' so that it 
  11736.       unconditionally passes '-O0' to the assembler, and never passes '-O2' or 
  11737.       '-O3'. 
  11738.  
  11739.  
  11740. ΓòÉΓòÉΓòÉ 9.5. Problems Compiling Certain Programs ΓòÉΓòÉΓòÉ
  11741.  
  11742.  Certain programs have problems compiling. 
  11743.  
  11744.      Parse errors may occur compiling X11 on a Decstation running Ultrix 4.2 
  11745.       because of problems in DEC's versions of the X11 header files 
  11746.       'X11/Xlib.h' and 'X11/Xutil.h'.  People recommend adding 
  11747.       '-I/usr/include/mit' to use the MIT versions of the header files, using 
  11748.       the '-traditional' switch to turn off ANSI C, or fixing the header files 
  11749.       by adding this: 
  11750.  
  11751.                       #ifdef __STDC__
  11752.                       #define NeedFunctionPrototypes 0
  11753.                       #endif
  11754.  
  11755.      If you have trouble compiling Perl on a SunOS 4 system, it may be because 
  11756.       Perl specifies '-I/usr/ucbinclude'.  This accesses the unfixed header 
  11757.       files.  Perl specifies the options 
  11758.  
  11759.                       -traditional -Dvolatile=__volatile__
  11760.                       -I/usr/include/sun -I/usr/ucbinclude
  11761.                       -fpcc-struct-return
  11762.  
  11763.  most of which are unnecessary with GCC 2.4.5 and newer versions.  You can make 
  11764.  a properly working Perl by setting ccflags to '-fwritable-strings' (implied by 
  11765.  the '-traditional' in the original options) and cppflags to empty in 
  11766.  'config.sh', then typing './doSH; make depend; make'. 
  11767.  
  11768.      On various 386 Unix systems derived from System V, including SCO, ISC, 
  11769.       and ESIX, you may get error messages about running out of virtual memory 
  11770.       while compiling certain programs. 
  11771.  
  11772.       You can prevent this problem by linking GNU CC with the GNU malloc (which 
  11773.       thus replaces the malloc that comes with the system).  GNU malloc is 
  11774.       available as a separate package, and also in the file 'src/gmalloc.c' in 
  11775.       the GNU Emacs 19 distribution. 
  11776.  
  11777.       If you have installed GNU malloc as a separate library package, use this 
  11778.       option when you relink GNU CC: 
  11779.  
  11780.                       MALLOC=/usr/local/lib/libgmalloc.a
  11781.  
  11782.  Alternatively, if you have compiled 'gmalloc.c' from Emacs 19, copy the object 
  11783.  file to 'gmalloc.o' and use this option when you relink GNU CC: 
  11784.  
  11785.                       MALLOC=gmalloc.o
  11786.  
  11787.  
  11788. ΓòÉΓòÉΓòÉ 9.6. Incompatibilities of GNU CC ΓòÉΓòÉΓòÉ
  11789.  
  11790.  There are several noteworthy incompatibilities between GNU C and most existing 
  11791.  (non-ANSI) versions of C.  The '-traditional' option eliminates many of these 
  11792.  incompatibilities, but not all, by telling GNU C to behave like the other C 
  11793.  compilers. 
  11794.  
  11795.      GNU CC normally makes string constants read-only.  If several 
  11796.       identical-looking string constants are used, GNU CC stores only one copy 
  11797.       of the string. 
  11798.  
  11799.       One consequence is that you cannot call mktemp with a string constant 
  11800.       argument.  The function mktemp always alters the string its argument 
  11801.       points to. 
  11802.  
  11803.       Another consequence is that sscanf does not work on some systems when 
  11804.       passed a string constant as its format control string or input. This is 
  11805.       because sscanf incorrectly tries to write into the string constant. 
  11806.       Likewise fscanf and scanf. 
  11807.  
  11808.       The best solution to these problems is to change the program to use 
  11809.       char-array variables with initialization strings for these purposes 
  11810.       instead of string constants.  But if this is not possible, you can use 
  11811.       the '-fwritable-strings' flag, which directs GNU CC to handle string 
  11812.       constants the same way most C compilers do. '-traditional' also has this 
  11813.       effect, among others. 
  11814.  
  11815.      -2147483648 is positive. 
  11816.  
  11817.       This is because 2147483648 cannot fit in the type int, so (following the 
  11818.       ANSI C rules) its data type is unsigned long int. Negating this value 
  11819.       yields 2147483648 again. 
  11820.  
  11821.      GNU CC does not substitute macro arguments when they appear inside of 
  11822.       string constants.  For example, the following macro in GNU CC 
  11823.  
  11824.                       #define foo(a) "a"
  11825.  
  11826.  will produce output "a" regardless of what the argument a is. 
  11827.  
  11828.  The '-traditional' option directs GNU CC to handle such cases (among others) 
  11829.  in the old-fashioned (non-ANSI) fashion. 
  11830.  
  11831.      When you use setjmp and longjmp, the only automatic variables guaranteed 
  11832.       to remain valid are those declared volatile.  This is a consequence of 
  11833.       automatic register allocation.  Consider this function: 
  11834.  
  11835.                       jmp_buf j;
  11836.                       foo ()
  11837.                       {
  11838.                        int a, b;
  11839.                        a = fun1 ();
  11840.                        if (setjmp (j))
  11841.                         return a;
  11842.                        a = fun2 ();
  11843.                        /* longjmp (j) may occur in fun3. */
  11844.                        return a + fun3 ();
  11845.                       }
  11846.  
  11847.  Here a may or may not be restored to its first value when the longjmp occurs. 
  11848.  If a is allocated in a register, then its first value is restored; otherwise, 
  11849.  it keeps the last value stored in it. 
  11850.  
  11851.  If you use the '-W' option with the '-O' option, you will get a warning when 
  11852.  GNU CC thinks such a problem might be possible. 
  11853.  
  11854.  The '-traditional' option directs GNU C to put variables in the stack by 
  11855.  default, rather than in registers, in functions that call setjmp.  This 
  11856.  results in the behavior found in traditional C compilers. 
  11857.  
  11858.      Programs that use preprocessing directives in the middle of macro 
  11859.       arguments do not work with GNU CC.  For example, a program like this will 
  11860.       not work: 
  11861.  
  11862.                       foobar (
  11863.                       #define luser
  11864.                           hack)
  11865.  
  11866.  ANSI C does not permit such a construct.  It would make sense to support it 
  11867.  when '-traditional' is used, but it is too much work to implement. 
  11868.  
  11869.      Declarations of external variables and functions within a block apply 
  11870.       only to the block containing the declaration.  In other words, they have 
  11871.       the same scope as any other declaration in the same place. 
  11872.  
  11873.       In some other C compilers, a extern declaration affects all the rest of 
  11874.       the file even if it happens within a block. 
  11875.  
  11876.       The '-traditional' option directs GNU C to treat all extern declarations 
  11877.       as global, like traditional compilers. 
  11878.  
  11879.      In traditional C, you can combine long, etc., with a typedef name, as 
  11880.       shown here: 
  11881.  
  11882.                       typedef int foo;
  11883.                       typedef long foo bar;
  11884.  
  11885.  In ANSI C, this is not allowed: long and other type modifiers require an 
  11886.  explicit int.  Because this criterion is expressed by Bison grammar rules 
  11887.  rather than C code, the '-traditional' flag cannot alter it. 
  11888.  
  11889.      PCC allows typedef names to be used as function parameters.  The 
  11890.       difficulty described immediately above applies here too. 
  11891.  
  11892.      PCC allows whitespace in the middle of compound assignment operators such 
  11893.       as '+='.  GNU CC, following the ANSI standard, does not allow this.  The 
  11894.       difficulty described immediately above applies here too. 
  11895.  
  11896.      GNU CC complains about unterminated character constants inside of 
  11897.       preprocessing conditionals that fail.  Some programs have English 
  11898.       comments enclosed in conditionals that are guaranteed to fail; if these 
  11899.       comments contain apostrophes, GNU CC will probably report an error.  For 
  11900.       example, this code would produce an error: 
  11901.  
  11902.                       #if 0
  11903.                       You can't expect this to work.
  11904.                       #endif
  11905.  
  11906.  The best solution to such a problem is to put the text into an actual C 
  11907.  comment delimited by '/*┬╖┬╖┬╖*/'.  However, '-traditional' suppresses these 
  11908.  error messages. 
  11909.  
  11910.      Many user programs contain the declaration 'long time ();'.  In the past, 
  11911.       the system header files on many systems did not actually declare time, so 
  11912.       it did not matter what type your program declared it to return.  But in 
  11913.       systems with ANSI C headers, time is declared to return time_t, and if 
  11914.       that is not the same as long, then 'long time ();' is erroneous. 
  11915.  
  11916.       The solution is to change your program to use time_t as the return type 
  11917.       of time. 
  11918.  
  11919.      When compiling functions that return float, PCC converts it to a double. 
  11920.       GNU CC actually returns a float.  If you are concerned with PCC 
  11921.       compatibility, you should declare your functions to return double; you 
  11922.       might as well say what you mean. 
  11923.  
  11924.      When compiling functions that return structures or unions, GNU CC output 
  11925.       code normally uses a method different from that used on most versions of 
  11926.       Unix.  As a result, code compiled with GNU CC cannot call a 
  11927.       structure-returning function compiled with PCC, and vice versa. 
  11928.  
  11929.       The method used by GNU CC is as follows: a structure or union which is 1, 
  11930.       2, 4 or 8 bytes long is returned like a scalar.  A structure or union 
  11931.       with any other size is stored into an address supplied by the caller 
  11932.       (usually in a special, fixed register, but on some machines it is passed 
  11933.       on the stack).  The machine-description macros STRUCT_VALUE and 
  11934.       STRUCT_INCOMING_VALUE tell GNU CC where to pass this address. 
  11935.  
  11936.       By contrast, PCC on most target machines returns structures and unions of 
  11937.       any size by copying the data into an area of static storage, and then 
  11938.       returning the address of that storage as if it were a pointer value. The 
  11939.       caller must copy the data from that memory area to the place where the 
  11940.       value is wanted.  GNU CC does not use this method because it is slower 
  11941.       and nonreentrant. 
  11942.  
  11943.       On some newer machines, PCC uses a reentrant convention for all structure 
  11944.       and union returning.  GNU CC on most of these machines uses a compatible 
  11945.       convention when returning structures and unions in memory, but still 
  11946.       returns small structures and unions in registers. 
  11947.  
  11948.       You can tell GNU CC to use a compatible convention for all structure and 
  11949.       union returning with the option '-fpcc-struct-return'. 
  11950.  
  11951.      GNU C complains about program fragments such as '0x74ae-0x4000' which 
  11952.       appear to be two hexadecimal constants separated by the minus operator. 
  11953.       Actually, this string is a single preprocessing token. Each such token 
  11954.       must correspond to one token in C.  Since this does not, GNU C prints an 
  11955.       error message.  Although it may appear obvious that what is meant is an 
  11956.       operator and two values, the ANSI C standard specifically requires that 
  11957.       this be treated as erroneous. 
  11958.  
  11959.       A preprocessing token is a preprocessing number if it begins with a digit 
  11960.       and is followed by letters, underscores, digits, periods and 'e+', 'e-', 
  11961.       'E+', or 'E-' character sequences. 
  11962.  
  11963.       To make the above program fragment valid, place whitespace in front of 
  11964.       the minus sign.  This whitespace will end the preprocessing number. 
  11965.  
  11966.  
  11967. ΓòÉΓòÉΓòÉ 9.7. Fixed Header Files ΓòÉΓòÉΓòÉ
  11968.  
  11969.  GNU CC needs to install corrected versions of some system header files. This 
  11970.  is because most target systems have some header files that won't work with GNU 
  11971.  CC unless they are changed.  Some have bugs, some are incompatible with ANSI 
  11972.  C, and some depend on special features of other compilers. 
  11973.  
  11974.  Installing GNU CC automatically creates and installs the fixed header files, 
  11975.  by running a program called fixincludes (or for certain targets an alternative 
  11976.  such as fixinc.svr4).  Normally, you don't need to pay attention to this.  But 
  11977.  there are cases where it doesn't do the right thing automatically. 
  11978.  
  11979.      If you update the system's header files, such as by installing a new 
  11980.       system version, the fixed header files of GNU CC are not automatically 
  11981.       updated.  The easiest way to update them is to reinstall GNU CC.  (If you 
  11982.       want to be clever, look in the makefile and you can find a shortcut.) 
  11983.  
  11984.      On some systems, in particular SunOS 4, header file directories contain 
  11985.       machine-specific symbolic links in certain places.  This makes it 
  11986.       possible to share most of the header files among hosts running the same 
  11987.       version of SunOS 4 on different machine models. 
  11988.  
  11989.       The programs that fix the header files do not understand this special way 
  11990.       of using symbolic links; therefore, the directory of fixed header files 
  11991.       is good only for the machine model used to build it. 
  11992.  
  11993.       In SunOS 4, only programs that look inside the kernel will notice the 
  11994.       difference between machine models.  Therefore, for most purposes, you 
  11995.       need not be concerned about this. 
  11996.  
  11997.       It is possible to make separate sets of fixed header files for the 
  11998.       different machine models, and arrange a structure of symbolic links so as 
  11999.       to use the proper set, but you'll have to do this by hand. 
  12000.  
  12001.      On Lynxos, GNU CC by default does not fix the header files.  This is 
  12002.       because bugs in the shell cause the fixincludes script to fail. 
  12003.  
  12004.       This means you will encounter problems due to bugs in the system header 
  12005.       files.  It may be no comfort that they aren't GNU CC's fault, but it does 
  12006.       mean that there's nothing for us to do about them. 
  12007.  
  12008.  
  12009. ΓòÉΓòÉΓòÉ 9.8. Standard Libraries ΓòÉΓòÉΓòÉ
  12010.  
  12011.  GNU CC by itself attempts to be what the ISO/ANSI C standard calls a 
  12012.  conforming freestanding implementation.  This means all ANSI C language 
  12013.  features are available, as well as the contents of 'float.h', 'limits.h', 
  12014.  'stdarg.h', and 'stddef.h'.  The rest of the C library is supplied by the 
  12015.  vendor of the operating system.  If that C library doesn't conform to the C 
  12016.  standards, then your programs might get warnings (especially when using 
  12017.  '-Wall') that you don't expect. 
  12018.  
  12019.  For example, the sprintf function on SunOS 4.1.3 returns char * while the C 
  12020.  standard says that sprintf returns an int.  The fixincludes program could make 
  12021.  the prototype for this function match the Standard, but that would be wrong, 
  12022.  since the function will still return char *. 
  12023.  
  12024.  If you need a Standard compliant library, then you need to find one, as GNU CC 
  12025.  does not provide one.  The GNU C library (called glibc) has been ported to a 
  12026.  number of operating systems, and provides ANSI/ISO, POSIX, BSD and SystemV 
  12027.  compatibility.  You could also ask your operating system vendor if newer 
  12028.  libraries are available. 
  12029.  
  12030.  
  12031. ΓòÉΓòÉΓòÉ 9.9. Disappointments and Misunderstandings ΓòÉΓòÉΓòÉ
  12032.  
  12033.  These problems are perhaps regrettable, but we don't know any practical way 
  12034.  around them. 
  12035.  
  12036.      Certain local variables aren't recognized by debuggers when you compile 
  12037.       with optimization. 
  12038.  
  12039.       This occurs because sometimes GNU CC optimizes the variable out of 
  12040.       existence.  There is no way to tell the debugger how to compute the value 
  12041.       such a variable ``would have had'', and it is not clear that would be 
  12042.       desirable anyway.  So GNU CC simply does not mention the eliminated 
  12043.       variable when it writes debugging information. 
  12044.  
  12045.       You have to expect a certain amount of disagreement between the 
  12046.       executable and your source code, when you use optimization. 
  12047.  
  12048.      Users often think it is a bug when GNU CC reports an error for code like 
  12049.       this: 
  12050.  
  12051.                       int foo (struct mumble *);
  12052.                       struct mumble { ┬╖┬╖┬╖ };
  12053.                       int foo (struct mumble *x)
  12054.                       { ┬╖┬╖┬╖ }
  12055.  
  12056.  This code really is erroneous, because the scope of struct mumble in the 
  12057.  prototype is limited to the argument list containing it. It does not refer to 
  12058.  the struct mumble defined with file scope immediately below---they are two 
  12059.  unrelated types with similar names in different scopes. 
  12060.  
  12061.  But in the definition of foo, the file-scope type is used because that is 
  12062.  available to be inherited.  Thus, the definition and the prototype do not 
  12063.  match, and you get an error. 
  12064.  
  12065.  This behavior may seem silly, but it's what the ANSI standard specifies. It is 
  12066.  easy enough for you to make your code work by moving the definition of struct 
  12067.  mumble above the prototype.  It's not worth being incompatible with ANSI C 
  12068.  just to avoid an error for the example shown above. 
  12069.  
  12070.      Accesses to bitfields even in volatile objects works by accessing larger 
  12071.       objects, such as a byte or a word.  You cannot rely on what size of 
  12072.       object is accessed in order to read or write the bitfield; it may even 
  12073.       vary for a given bitfield according to the precise usage. 
  12074.  
  12075.       If you care about controlling the amount of memory that is accessed, use 
  12076.       volatile but do not use bitfields. 
  12077.  
  12078.      GNU CC comes with shell scripts to fix certain known problems in system 
  12079.       header files.  They install corrected copies of various header files in a 
  12080.       special directory where only GNU CC will normally look for them.  The 
  12081.       scripts adapt to various systems by searching all the system header files 
  12082.       for the problem cases that we know about. 
  12083.  
  12084.       If new system header files are installed, nothing automatically arranges 
  12085.       to update the corrected header files.  You will have to reinstall GNU CC 
  12086.       to fix the new header files.  More specifically, go to the build 
  12087.       directory and delete the files 'stmp-fixinc' and 'stmp-headers', and the 
  12088.       subdirectory include; then do 'make install' again. 
  12089.  
  12090.      On 68000 and x86 systems, for instance, you can get paradoxical results 
  12091.       if you test the precise values of floating point numbers.  For example, 
  12092.       you can find that a floating point value which is not a NaN is not equal 
  12093.       to itself.  This results from the fact that the floating point registers 
  12094.       hold a few more bits of precision than fit in a double in memory. 
  12095.       Compiled code moves values between memory and floating point registers at 
  12096.       its convenience, and moving them into memory truncates them. 
  12097.  
  12098.       You can partially avoid this problem by using the '-ffloat-store' option 
  12099.       (see Optimize Options). 
  12100.  
  12101.      On the MIPS, variable argument functions using 'varargs.h' cannot have a 
  12102.       floating point value for the first argument.  The reason for this is that 
  12103.       in the absence of a prototype in scope, if the first argument is a 
  12104.       floating point, it is passed in a floating point register, rather than an 
  12105.       integer register. 
  12106.  
  12107.       If the code is rewritten to use the ANSI standard 'stdarg.h' method of 
  12108.       variable arguments, and the prototype is in scope at the time of the 
  12109.       call, everything will work fine. 
  12110.  
  12111.      On the H8/300 and H8/300H, variable argument functions must be 
  12112.       implemented using the ANSI standard 'stdarg.h' method of variable 
  12113.       arguments.  Furthermore, calls to functions using 'stdarg.h' variable 
  12114.       arguments must have a prototype for the called function in scope at the 
  12115.       time of the call. 
  12116.  
  12117.  
  12118. ΓòÉΓòÉΓòÉ 9.10. Common Misunderstandings with GNU C++ ΓòÉΓòÉΓòÉ
  12119.  
  12120.  C++ is a complex language and an evolving one, and its standard definition 
  12121.  (the ANSI C++ draft standard) is also evolving.  As a result, your C++ 
  12122.  compiler may occasionally surprise you, even when its behavior is correct. 
  12123.  This section discusses some areas that frequently give rise to questions of 
  12124.  this sort. 
  12125.  
  12126.  Static Definitions            Static member declarations are not definitions 
  12127.  Temporaries                   Temporaries may vanish before you expect 
  12128.  
  12129.  
  12130. ΓòÉΓòÉΓòÉ 9.10.1. Declare and Define Static Members ΓòÉΓòÉΓòÉ
  12131.  
  12132.  When a class has static data members, it is not enough to declare the static 
  12133.  member; you must also define it.  For example: 
  12134.  
  12135.                       class Foo
  12136.                       {
  12137.                        ┬╖┬╖┬╖
  12138.                        void method();
  12139.                        static int bar;
  12140.                       };
  12141.  
  12142.  This declaration only establishes that the class Foo has an int named 
  12143.  Foo::bar, and a member function named Foo::method.  But you still need to 
  12144.  define both method and bar elsewhere.  According to the draft ANSI standard, 
  12145.  you must supply an initializer in one (and only one) source file, such as: 
  12146.  
  12147.                       int Foo::bar = 0;
  12148.  
  12149.  Other C++ compilers may not correctly implement the standard behavior. As a 
  12150.  result, when you switch to g++ from one of these compilers, you may discover 
  12151.  that a program that appeared to work correctly in fact does not conform to the 
  12152.  standard: g++ reports as undefined symbols any static data members that lack 
  12153.  definitions. 
  12154.  
  12155.  
  12156. ΓòÉΓòÉΓòÉ 9.10.2. Temporaries May Vanish Before You Expect ΓòÉΓòÉΓòÉ
  12157.  
  12158.  It is dangerous to use pointers or references to portions of a temporary 
  12159.  object.  The compiler may very well delete the object before you expect it to, 
  12160.  leaving a pointer to garbage.  The most common place where this problem crops 
  12161.  up is in classes like the libg++ String class, that define a conversion 
  12162.  function to type char * or const char *.  However, any class that returns a 
  12163.  pointer to some internal structure is potentially subject to this problem. 
  12164.  
  12165.  For example, a program may use a function strfunc that returns String objects, 
  12166.  and another function charfunc that operates on pointers to char: 
  12167.  
  12168.                       String strfunc ();
  12169.                       void charfunc (const char *);
  12170.  
  12171.  In this situation, it may seem natural to write 'charfunc (strfunc ());' based 
  12172.  on the knowledge that class String has an explicit conversion to char 
  12173.  pointers.  However, what really happens is akin to 'charfunc (strfunc 
  12174.  ().convert ());', where the convert method is a function to do the same data 
  12175.  conversion normally performed by a cast.  Since the last use of the temporary 
  12176.  String object is the call to the conversion function, the compiler may delete 
  12177.  that object before actually calling charfunc.  The compiler has no way of 
  12178.  knowing that deleting the String object will invalidate the pointer.  The 
  12179.  pointer then points to garbage, so that by the time charfunc is called, it 
  12180.  gets an invalid argument. 
  12181.  
  12182.  Code like this may run successfully under some other compilers, especially 
  12183.  those that delete temporaries relatively late.  However, the GNU C++ behavior 
  12184.  is also standard-conforming, so if your program depends on late destruction of 
  12185.  temporaries it is not portable. 
  12186.  
  12187.  If you think this is surprising, you should be aware that the ANSI C++ 
  12188.  committee continues to debate the lifetime-of-temporaries problem. 
  12189.  
  12190.  For now, at least, the safe way to write such code is to give the temporary a 
  12191.  name, which forces it to remain until the end of the scope of the name.  For 
  12192.  example: 
  12193.  
  12194.                       String& tmp = strfunc ();
  12195.                       charfunc (tmp);
  12196.  
  12197.  
  12198. ΓòÉΓòÉΓòÉ 9.11. Caveats of using protoize ΓòÉΓòÉΓòÉ
  12199.  
  12200.  The conversion programs protoize and unprotoize can sometimes change a source 
  12201.  file in a way that won't work unless you rearrange it. 
  12202.  
  12203.      protoize can insert references to a type name or type tag before the 
  12204.       definition, or in a file where they are not defined. 
  12205.  
  12206.       If this happens, compiler error messages should show you where the new 
  12207.       references are, so fixing the file by hand is straightforward. 
  12208.  
  12209.      There are some C constructs which protoize cannot figure out. For 
  12210.       example, it can't determine argument types for declaring a 
  12211.       pointer-to-function variable; this you must do by hand.  protoize inserts 
  12212.       a comment containing '???' each time it finds such a variable; so you can 
  12213.       find all such variables by searching for this string.  ANSI C does not 
  12214.       require declaring the argument types of pointer-to-function types. 
  12215.  
  12216.      Using unprotoize can easily introduce bugs.  If the program relied on 
  12217.       prototypes to bring about conversion of arguments, these conversions will 
  12218.       not take place in the program without prototypes. One case in which you 
  12219.       can be sure unprotoize is safe is when you are removing prototypes that 
  12220.       were made with protoize; if the program worked before without any 
  12221.       prototypes, it will work again without them. 
  12222.  
  12223.       You can find all the places where this problem might occur by compiling 
  12224.       the program with the '-Wconversion' option.  It prints a warning whenever 
  12225.       an argument is converted. 
  12226.  
  12227.      Both conversion programs can be confused if there are macro calls in and 
  12228.       around the text to be converted.  In other words, the standard syntax for 
  12229.       a declaration or definition must not result from expanding a macro. This 
  12230.       problem is inherent in the design of C and cannot be fixed.  If only a 
  12231.       few functions have confusing macro calls, you can easily convert them 
  12232.       manually. 
  12233.  
  12234.      protoize cannot get the argument types for a function whose definition 
  12235.       was not actually compiled due to preprocessing conditionals. When this 
  12236.       happens, protoize changes nothing in regard to such a function.  protoize 
  12237.       tries to detect such instances and warn about them. 
  12238.  
  12239.       You can generally work around this problem by using protoize step by 
  12240.       step, each time specifying a different set of '-D' options for 
  12241.       compilation, until all of the functions have been converted.  There is no 
  12242.       automatic way to verify that you have got them all, however. 
  12243.  
  12244.      Confusion may result if there is an occasion to convert a function 
  12245.       declaration or definition in a region of source code where there is more 
  12246.       than one formal parameter list present.  Thus, attempts to convert code 
  12247.       containing multiple (conditionally compiled) versions of a single 
  12248.       function header (in the same vicinity) may not produce the desired (or 
  12249.       expected) results. 
  12250.  
  12251.       If you plan on converting source files which contain such code, it is 
  12252.       recommended that you first make sure that each conditionally compiled 
  12253.       region of source code which contains an alternative function header also 
  12254.       contains at least one additional follower token (past the final right 
  12255.       parenthesis of the function header).  This should circumvent the problem. 
  12256.  
  12257.      unprotoize can become confused when trying to convert a function 
  12258.       definition or declaration which contains a declaration for a 
  12259.       pointer-to-function formal argument which has the same name as the 
  12260.       function being defined or declared.  We recommand you avoid such choices 
  12261.       of formal parameter names. 
  12262.  
  12263.      You might also want to correct some of the indentation by hand and break 
  12264.       long lines.  (The conversion programs don't write lines longer than 
  12265.       eighty characters in any case.) 
  12266.  
  12267.  
  12268. ΓòÉΓòÉΓòÉ 9.12. Certain Changes We Don't Want to Make ΓòÉΓòÉΓòÉ
  12269.  
  12270.  This section lists changes that people frequently request, but which we do not 
  12271.  make because we think GNU CC is better without them. 
  12272.  
  12273.      Checking the number and type of arguments to a function which has an 
  12274.       old-fashioned definition and no prototype. 
  12275.  
  12276.       Such a feature would work only occasionally---only for calls that appear 
  12277.       in the same file as the called function, following the definition.  The 
  12278.       only way to check all calls reliably is to add a prototype for the 
  12279.       function.  But adding a prototype eliminates the motivation for this 
  12280.       feature.  So the feature is not worthwhile. 
  12281.  
  12282.      Warning about using an expression whose type is signed as a shift count. 
  12283.  
  12284.       Shift count operands are probably signed more often than unsigned. 
  12285.       Warning about this would cause far more annoyance than good. 
  12286.  
  12287.      Warning about assigning a signed value to an unsigned variable. 
  12288.  
  12289.       Such assignments must be very common; warning about them would cause more 
  12290.       annoyance than good. 
  12291.  
  12292.      Warning about unreachable code. 
  12293.  
  12294.       It's very common to have unreachable code in machine-generated programs. 
  12295.       For example, this happens normally in some files of GNU C itself. 
  12296.  
  12297.      Warning when a non-void function value is ignored. 
  12298.  
  12299.       Coming as I do from a Lisp background, I balk at the idea that there is 
  12300.       something dangerous about discarding a value.  There are functions that 
  12301.       return values which some callers may find useful; it makes no sense to 
  12302.       clutter the program with a cast to void whenever the value isn't useful. 
  12303.  
  12304.      Assuming (for optimization) that the address of an external symbol is 
  12305.       never zero. 
  12306.  
  12307.       This assumption is false on certain systems when '#pragma weak' is used. 
  12308.  
  12309.      Making '-fshort-enums' the default. 
  12310.  
  12311.       This would cause storage layout to be incompatible with most other C 
  12312.       compilers.  And it doesn't seem very important, given that you can get 
  12313.       the same result in other ways.  The case where it matters most is when 
  12314.       the enumeration-valued object is inside a structure, and in that case you 
  12315.       can specify a field width explicitly. 
  12316.  
  12317.      Making bitfields unsigned by default on particular machines where ``the 
  12318.       ABI standard'' says to do so. 
  12319.  
  12320.       The ANSI C standard leaves it up to the implementation whether a bitfield 
  12321.       declared plain int is signed or not.  This in effect creates two 
  12322.       alternative dialects of C. 
  12323.  
  12324.       The GNU C compiler supports both dialects; you can specify the signed 
  12325.       dialect with '-fsigned-bitfields' and the unsigned dialect with 
  12326.       '-funsigned-bitfields'.  However, this leaves open the question of which 
  12327.       dialect to use by default. 
  12328.  
  12329.       Currently, the preferred dialect makes plain bitfields signed, because 
  12330.       this is simplest.  Since int is the same as signed int in every other 
  12331.       context, it is cleanest for them to be the same in bitfields as well. 
  12332.  
  12333.       Some computer manufacturers have published Application Binary Interface 
  12334.       standards which specify that plain bitfields should be unsigned.  It is a 
  12335.       mistake, however, to say anything about this issue in an ABI.  This is 
  12336.       because the handling of plain bitfields distinguishes two dialects of C. 
  12337.       Both dialects are meaningful on every type of machine.  Whether a 
  12338.       particular object file was compiled using signed bitfields or unsigned is 
  12339.       of no concern to other object files, even if they access the same 
  12340.       bitfields in the same data structures. 
  12341.  
  12342.       A given program is written in one or the other of these two dialects. The 
  12343.       program stands a chance to work on most any machine if it is compiled 
  12344.       with the proper dialect.  It is unlikely to work at all if compiled with 
  12345.       the wrong dialect. 
  12346.  
  12347.       Many users appreciate the GNU C compiler because it provides an 
  12348.       environment that is uniform across machines.  These users would be 
  12349.       inconvenienced if the compiler treated plain bitfields differently on 
  12350.       certain machines. 
  12351.  
  12352.       Occasionally users write programs intended only for a particular machine 
  12353.       type.  On these occasions, the users would benefit if the GNU C compiler 
  12354.       were to support by default the same dialect as the other compilers on 
  12355.       that machine.  But such applications are rare.  And users writing a 
  12356.       program to run on more than one type of machine cannot possibly benefit 
  12357.       from this kind of compatibility. 
  12358.  
  12359.       This is why GNU CC does and will treat plain bitfields in the same 
  12360.       fashion on all types of machines (by default). 
  12361.  
  12362.       There are some arguments for making bitfields unsigned by default on all 
  12363.       machines.  If, for example, this becomes a universal de facto standard, 
  12364.       it would make sense for GNU CC to go along with it.  This is something to 
  12365.       be considered in the future. 
  12366.  
  12367.       (Of course, users strongly concerned about portability should indicate 
  12368.       explicitly in each bitfield whether it is signed or not.  In this way, 
  12369.       they write programs which have the same meaning in both C dialects.) 
  12370.  
  12371.      Undefining __STDC__ when '-ansi' is not used. 
  12372.  
  12373.       Currently, GNU CC defines __STDC__ as long as you don't use 
  12374.       '-traditional'.  This provides good results in practice. 
  12375.  
  12376.       Programmers normally use conditionals on __STDC__ to ask whether it is 
  12377.       safe to use certain features of ANSI C, such as function prototypes or 
  12378.       ANSI token concatenation.  Since plain 'gcc' supports all the features of 
  12379.       ANSI C, the correct answer to these questions is ``yes''. 
  12380.  
  12381.       Some users try to use __STDC__ to check for the availability of certain 
  12382.       library facilities.  This is actually incorrect usage in an ANSI C 
  12383.       program, because the ANSI C standard says that a conforming freestanding 
  12384.       implementation should define __STDC__ even though it does not have the 
  12385.       library facilities.  'gcc -ansi -pedantic' is a conforming freestanding 
  12386.       implementation, and it is therefore required to define __STDC__, even 
  12387.       though it does not come with an ANSI C library. 
  12388.  
  12389.       Sometimes people say that defining __STDC__ in a compiler that does not 
  12390.       completely conform to the ANSI C standard somehow violates the standard. 
  12391.       This is illogical.  The standard is a standard for compilers that claim 
  12392.       to support ANSI C, such as 'gcc -ansi'---not for other compilers such as 
  12393.       plain 'gcc'.  Whatever the ANSI C standard says is relevant to the design 
  12394.       of plain 'gcc' without '-ansi' only for pragmatic reasons, not as a 
  12395.       requirement. 
  12396.  
  12397.       GNU CC normally defines __STDC__ to be 1, and in addition defines 
  12398.       __STRICT_ANSI__ if you specify the '-ansi' option. On some hosts, system 
  12399.       include files use a different convention, where __STDC__ is normally 0, 
  12400.       but is 1 if the user specifies strict conformance to the C Standard.  GNU 
  12401.       CC follows the host convention when processing system include files, but 
  12402.       when processing user files it follows the usual GNU C convention. 
  12403.  
  12404.      Undefining __STDC__ in C++. 
  12405.  
  12406.       Programs written to compile with C++-to-C translators get the value of 
  12407.       __STDC__ that goes with the C compiler that is subsequently used.  These 
  12408.       programs must test __STDC__ to determine what kind of C preprocessor that 
  12409.       compiler uses: whether they should concatenate tokens in the ANSI C 
  12410.       fashion or in the traditional fashion. 
  12411.  
  12412.       These programs work properly with GNU C++ if __STDC__ is defined. They 
  12413.       would not work otherwise. 
  12414.  
  12415.       In addition, many header files are written to provide prototypes in ANSI 
  12416.       C but not in traditional C.  Many of these header files can work without 
  12417.       change in C++ provided __STDC__ is defined.  If __STDC__ is not defined, 
  12418.       they will all fail, and will all need to be changed to test explicitly 
  12419.       for C++ as well. 
  12420.  
  12421.      Deleting ``empty'' loops. 
  12422.  
  12423.       GNU CC does not delete ``empty'' loops because the most likely reason you 
  12424.       would put one in a program is to have a delay.  Deleting them will not 
  12425.       make real programs run any faster, so it would be pointless. 
  12426.  
  12427.       It would be different if optimization of a nonempty loop could produce an 
  12428.       empty one.  But this generally can't happen. 
  12429.  
  12430.      Making side effects happen in the same order as in some other compiler. 
  12431.  
  12432.       It is never safe to depend on the order of evaluation of side effects. 
  12433.       For example, a function call like this may very well behave differently 
  12434.       from one compiler to another: 
  12435.  
  12436.                       void func (int, int);
  12437.                       int i = 2;
  12438.                       func (i++, i++);
  12439.  
  12440.  There is no guarantee (in either the C or the C++ standard language 
  12441.  definitions) that the increments will be evaluated in any particular order. 
  12442.  Either increment might happen first.  func might get the arguments '2, 3', or 
  12443.  it might get '3, 2', or even '2, 2'. 
  12444.  
  12445.      Not allowing structures with volatile fields in registers. 
  12446.  
  12447.       Strictly speaking, there is no prohibition in the ANSI C standard against 
  12448.       allowing structures with volatile fields in registers, but it does not 
  12449.       seem to make any sense and is probably not what you wanted to do.  So the 
  12450.       compiler will give an error message in this case. 
  12451.  
  12452.  
  12453. ΓòÉΓòÉΓòÉ 9.13. Warning Messages and Error Messages ΓòÉΓòÉΓòÉ
  12454.  
  12455.  The GNU compiler can produce two kinds of diagnostics: errors and warnings. 
  12456.  Each kind has a different purpose: 
  12457.  
  12458.      Errors report problems that make it impossible to compile your program. 
  12459.       GNU CC reports errors with the source file name and line number where the 
  12460.       problem is apparent. 
  12461.  
  12462.      Warnings report other unusual conditions in your code that may indicate a 
  12463.       problem, although compilation can (and does) proceed.  Warning messages 
  12464.       also report the source file name and line number, but include the text 
  12465.       'warning:' to distinguish them from error messages. 
  12466.  
  12467.  Warnings may indicate danger points where you should check to make sure that 
  12468.  your program really does what you intend; or the use of obsolete features; or 
  12469.  the use of nonstandard features of GNU C or C++.  Many warnings are issued 
  12470.  only if you ask for them, with one of the '-W' options (for instance, '-Wall' 
  12471.  requests a variety of useful warnings). 
  12472.  
  12473.  GNU CC always tries to compile your program if possible; it never gratuitously 
  12474.  rejects a program whose meaning is clear merely because (for instance) it 
  12475.  fails to conform to a standard.  In some cases, however, the C and C++ 
  12476.  standards specify that certain extensions are forbidden, and a diagnostic must 
  12477.  be issued by a conforming compiler.  The '-pedantic' option tells GNU CC to 
  12478.  issue warnings in such cases; '-pedantic-errors' says to make them errors 
  12479.  instead. This does not mean that all non-ANSI constructs get warnings or 
  12480.  errors. 
  12481.  
  12482.  See Options to Request or Suppress Warnings, for more detail on these and 
  12483.  related command-line options. 
  12484.  
  12485.  
  12486. ΓòÉΓòÉΓòÉ 10. Reporting Bugs ΓòÉΓòÉΓòÉ
  12487.  
  12488.  Your bug reports play an essential role in making GNU CC reliable. 
  12489.  
  12490.  When you encounter a problem, the first thing to do is to see if it is already 
  12491.  known.  See Trouble.  If it isn't known, then you should report the problem. 
  12492.  
  12493.  Reporting a bug may help you by bringing a solution to your problem, or it may 
  12494.  not.  (If it does not, look in the service directory; see Service.)  In any 
  12495.  case, the principal function of a bug report is to help the entire community 
  12496.  by making the next version of GNU CC work better.  Bug reports are your 
  12497.  contribution to the maintenance of GNU CC. 
  12498.  
  12499.  Since the maintainers are very overloaded, we cannot respond to every bug 
  12500.  report.  However, if the bug has not been fixed, we are likely to send you a 
  12501.  patch and ask you to tell us whether it works. 
  12502.  
  12503.  In order for a bug report to serve its purpose, you must include the 
  12504.  information that makes for fixing the bug. 
  12505.  
  12506.  Bug Criteria                  Have you really found a bug? 
  12507.  Bug Lists                     Where to send your bug report. 
  12508.  Bug Reporting                 How to report a bug effectively. 
  12509.  Sending Patches               How to send a patch for GNU CC. 
  12510.  Trouble                       Known problems. 
  12511.  Service                       Where to ask for help. 
  12512.  
  12513.  
  12514. ΓòÉΓòÉΓòÉ 10.1. Have You Found a Bug? ΓòÉΓòÉΓòÉ
  12515.  
  12516.  If you are not sure whether you have found a bug, here are some guidelines: 
  12517.  
  12518.      If the compiler gets a fatal signal, for any input whatever, that is a 
  12519.       compiler bug.  Reliable compilers never crash. 
  12520.  
  12521.      If the compiler produces invalid assembly code, for any input whatever 
  12522.       (except an asm statement), that is a compiler bug, unless the compiler 
  12523.       reports errors (not just warnings) which would ordinarily prevent the 
  12524.       assembler from being run. 
  12525.  
  12526.      If the compiler produces valid assembly code that does not correctly 
  12527.       execute the input source code, that is a compiler bug. 
  12528.  
  12529.       However, you must double-check to make sure, because you may have run 
  12530.       into an incompatibility between GNU C and traditional C (see 
  12531.       Incompatibilities).  These incompatibilities might be considered bugs, 
  12532.       but they are inescapable consequences of valuable features. 
  12533.  
  12534.       Or you may have a program whose behavior is undefined, which happened by 
  12535.       chance to give the desired results with another C or C++ compiler. 
  12536.  
  12537.       For example, in many nonoptimizing compilers, you can write 'x;' at the 
  12538.       end of a function instead of 'return x;', with the same results.  But the 
  12539.       value of the function is undefined if return is omitted; it is not a bug 
  12540.       when GNU CC produces different results. 
  12541.  
  12542.       Problems often result from expressions with two increment operators, as 
  12543.       in f (*p++, *p++).  Your previous compiler might have interpreted that 
  12544.       expression the way you intended; GNU CC might interpret it another way. 
  12545.       Neither compiler is wrong.  The bug is in your code. 
  12546.  
  12547.       After you have localized the error to a single source line, it should be 
  12548.       easy to check for these things.  If your program is correct and well 
  12549.       defined, you have found a compiler bug. 
  12550.  
  12551.      If the compiler produces an error message for valid input, that is a 
  12552.       compiler bug. 
  12553.  
  12554.      If the compiler does not produce an error message for invalid input, that 
  12555.       is a compiler bug.  However, you should note that your idea of ``invalid 
  12556.       input'' might be my idea of ``an extension'' or ``support for traditional 
  12557.       practice''. 
  12558.  
  12559.      If you are an experienced user of C or C++ compilers, your suggestions 
  12560.       for improvement of GNU CC or GNU C++ are welcome in any case. 
  12561.  
  12562.  
  12563. ΓòÉΓòÉΓòÉ 10.2. Where to Report Bugs ΓòÉΓòÉΓòÉ
  12564.  
  12565.  Send bug reports for GNU C to 'bug-gcc@prep.ai.mit.edu'. 
  12566.  
  12567.  Send bug reports for GNU C++ to 'bug-g++@prep.ai.mit.edu'.  If your bug 
  12568.  involves the C++ class library libg++, send mail instead to the address 
  12569.  'bug-lib-g++@prep.ai.mit.edu'.  If you're not sure, you can send the bug 
  12570.  report to both lists. 
  12571.  
  12572.  Do not send bug reports to 'help-gcc@prep.ai.mit.edu' or to the newsgroup 
  12573.  'gnu.gcc.help'. Most users of GNU CC do not want to receive bug reports. 
  12574.  Those that do, have asked to be on 'bug-gcc' and/or 'bug-g++'. 
  12575.  
  12576.  The mailing lists 'bug-gcc' and 'bug-g++' both have newsgroups which serve as 
  12577.  repeaters: 'gnu.gcc.bug' and 'gnu.g++.bug'. Each mailing list and its 
  12578.  newsgroup carry exactly the same messages. 
  12579.  
  12580.  Often people think of posting bug reports to the newsgroup instead of mailing 
  12581.  them.  This appears to work, but it has one problem which can be crucial: a 
  12582.  newsgroup posting does not contain a mail path back to the sender.  Thus, if 
  12583.  maintainers need more information, they may be unable to reach you.  For this 
  12584.  reason, you should always send bug reports by mail to the proper mailing list. 
  12585.  
  12586.  As a last resort, send bug reports on paper to: 
  12587.  
  12588.                       GNU Compiler Bugs
  12589.                       Free Software Foundation
  12590.                       59 Temple Place - Suite 330
  12591.                       Boston, MA 02111-1307, USA
  12592.  
  12593.  
  12594. ΓòÉΓòÉΓòÉ 10.3. How to Report Bugs ΓòÉΓòÉΓòÉ
  12595.  
  12596.  The fundamental principle of reporting bugs usefully is this: report all the 
  12597.  facts.  If you are not sure whether to state a fact or leave it out, state it! 
  12598.  
  12599.  Often people omit facts because they think they know what causes the problem 
  12600.  and they conclude that some details don't matter.  Thus, you might assume that 
  12601.  the name of the variable you use in an example does not matter. Well, probably 
  12602.  it doesn't, but one cannot be sure.  Perhaps the bug is a stray memory 
  12603.  reference which happens to fetch from the location where that name is stored 
  12604.  in memory; perhaps, if the name were different, the contents of that location 
  12605.  would fool the compiler into doing the right thing despite the bug.  Play it 
  12606.  safe and give a specific, complete example.  That is the easiest thing for you 
  12607.  to do, and the most helpful. 
  12608.  
  12609.  Keep in mind that the purpose of a bug report is to enable someone to fix the 
  12610.  bug if it is not known.  It isn't very important what happens if the bug is 
  12611.  already known.  Therefore, always write your bug reports on the assumption 
  12612.  that the bug is not known. 
  12613.  
  12614.  Sometimes people give a few sketchy facts and ask, ``Does this ring a bell?'' 
  12615.  This cannot help us fix a bug, so it is basically useless.  We respond by 
  12616.  asking for enough details to enable us to investigate. You might as well 
  12617.  expedite matters by sending them to begin with. 
  12618.  
  12619.  Try to make your bug report self-contained.  If we have to ask you for more 
  12620.  information, it is best if you include all the previous information in your 
  12621.  response, as well as the information that was missing. 
  12622.  
  12623.  Please report each bug in a separate message.  This makes it easier for us to 
  12624.  track which bugs have been fixed and to forward your bugs reports to the 
  12625.  appropriate maintainer. 
  12626.  
  12627.  Do not compress and encode any part of your bug report using programs such as 
  12628.  'uuencode'.  If you do so it will slow down the processing of your bug.  If 
  12629.  you must submit multiple large files, use 'shar', which allows us to read your 
  12630.  message without having to run any decompression programs. 
  12631.  
  12632.  To enable someone to investigate the bug, you should include all these things: 
  12633.  
  12634.      The version of GNU CC.  You can get this by running it with the '-v' 
  12635.       option. 
  12636.  
  12637.       Without this, we won't know whether there is any point in looking for the 
  12638.       bug in the current version of GNU CC. 
  12639.  
  12640.      A complete input file that will reproduce the bug.  If the bug is in the 
  12641.       C preprocessor, send a source file and any header files that it requires. 
  12642.       If the bug is in the compiler proper ('cc1'), run your source file 
  12643.       through the C preprocessor by doing 'gcc -E sourcefile > outfile', then 
  12644.       include the contents of outfile in the bug report.  (When you do this, 
  12645.       use the same '-I', '-D' or '-U' options that you used in actual 
  12646.       compilation.) 
  12647.  
  12648.       A single statement is not enough of an example.  In order to compile it, 
  12649.       it must be embedded in a complete file of compiler input; and the bug 
  12650.       might depend on the details of how this is done. 
  12651.  
  12652.       Without a real example one can compile, all anyone can do about your bug 
  12653.       report is wish you luck.  It would be futile to try to guess how to 
  12654.       provoke the bug.  For example, bugs in register allocation and reloading 
  12655.       frequently depend on every little detail of the function they happen in. 
  12656.  
  12657.       Even if the input file that fails comes from a GNU program, you should 
  12658.       still send the complete test case.  Don't ask the GNU CC maintainers to 
  12659.       do the extra work of obtaining the program in question---they are all 
  12660.       overworked as it is.  Also, the problem may depend on what is in the 
  12661.       header files on your system; it is unreliable for the GNU CC maintainers 
  12662.       to try the problem with the header files available to them.  By sending 
  12663.       CPP output, you can eliminate this source of uncertainty and save us a 
  12664.       certain percentage of wild goose chases. 
  12665.  
  12666.      The command arguments you gave GNU CC or GNU C++ to compile that example 
  12667.       and observe the bug.  For example, did you use '-O'?  To guarantee you 
  12668.       won't omit something important, list all the options. 
  12669.  
  12670.       If we were to try to guess the arguments, we would probably guess wrong 
  12671.       and then we would not encounter the bug. 
  12672.  
  12673.      The type of machine you are using, and the operating system name and 
  12674.       version number. 
  12675.  
  12676.      The operands you gave to the configure command when you installed the 
  12677.       compiler. 
  12678.  
  12679.      A complete list of any modifications you have made to the compiler 
  12680.       source.  (We don't promise to investigate the bug unless it happens in an 
  12681.       unmodified compiler.  But if you've made modifications and don't tell us, 
  12682.       then you are sending us on a wild goose chase.) 
  12683.  
  12684.       Be precise about these changes.  A description in English is not 
  12685.       enough---send a context diff for them. 
  12686.  
  12687.       Adding files of your own (such as a machine description for a machine we 
  12688.       don't support) is a modification of the compiler source. 
  12689.  
  12690.      Details of any other deviations from the standard procedure for 
  12691.       installing GNU CC. 
  12692.  
  12693.      A description of what behavior you observe that you believe is incorrect. 
  12694.       For example, ``The compiler gets a fatal signal,'' or, ``The assembler 
  12695.       instruction at line 208 in the output is incorrect.'' 
  12696.  
  12697.       Of course, if the bug is that the compiler gets a fatal signal, then one 
  12698.       can't miss it.  But if the bug is incorrect output, the maintainer might 
  12699.       not notice unless it is glaringly wrong.  None of us has time to study 
  12700.       all the assembler code from a 50-line C program just on the chance that 
  12701.       one instruction might be wrong.  We need you to do this part! 
  12702.  
  12703.       Even if the problem you experience is a fatal signal, you should still 
  12704.       say so explicitly.  Suppose something strange is going on, such as, your 
  12705.       copy of the compiler is out of synch, or you have encountered a bug in 
  12706.       the C library on your system.  (This has happened!)  Your copy might 
  12707.       crash and the copy here would not.  If you said to expect a crash, then 
  12708.       when the compiler here fails to crash, we would know that the bug was not 
  12709.       happening.  If you don't say to expect a crash, then we would not know 
  12710.       whether the bug was happening.  We would not be able to draw any 
  12711.       conclusion from our observations. 
  12712.  
  12713.       If the problem is a diagnostic when compiling GNU CC with some other 
  12714.       compiler, say whether it is a warning or an error. 
  12715.  
  12716.       Often the observed symptom is incorrect output when your program is run. 
  12717.       Sad to say, this is not enough information unless the program is short 
  12718.       and simple.  None of us has time to study a large program to figure out 
  12719.       how it would work if compiled correctly, much less which line of it was 
  12720.       compiled wrong.  So you will have to do that.  Tell us which source line 
  12721.       it is, and what incorrect result happens when that line is executed.  A 
  12722.       person who understands the program can find this as easily as finding a 
  12723.       bug in the program itself. 
  12724.  
  12725.      If you send examples of assembler code output from GNU CC or GNU C++, 
  12726.       please use '-g' when you make them.  The debugging information includes 
  12727.       source line numbers which are essential for correlating the output with 
  12728.       the input. 
  12729.  
  12730.      If you wish to mention something in the GNU CC source, refer to it by 
  12731.       context, not by line number. 
  12732.  
  12733.       The line numbers in the development sources don't match those in your 
  12734.       sources.  Your line numbers would convey no useful information to the 
  12735.       maintainers. 
  12736.  
  12737.      Additional information from a debugger might enable someone to find a 
  12738.       problem on a machine which he does not have available.  However, you need 
  12739.       to think when you collect this information if you want it to have any 
  12740.       chance of being useful. 
  12741.  
  12742.       For example, many people send just a backtrace, but that is never useful 
  12743.       by itself.  A simple backtrace with arguments conveys little about GNU CC 
  12744.       because the compiler is largely data-driven; the same functions are 
  12745.       called over and over for different RTL insns, doing different things 
  12746.       depending on the details of the insn. 
  12747.  
  12748.       Most of the arguments listed in the backtrace are useless because they 
  12749.       are pointers to RTL list structure.  The numeric values of the pointers, 
  12750.       which the debugger prints in the backtrace, have no significance 
  12751.       whatever; all that matters is the contents of the objects they point to 
  12752.       (and most of the contents are other such pointers). 
  12753.  
  12754.       In addition, most compiler passes consist of one or more loops that scan 
  12755.       the RTL insn sequence.  The most vital piece of information about such a 
  12756.       loop---which insn it has reached---is usually in a local variable, not in 
  12757.       an argument. 
  12758.  
  12759.       What you need to provide in addition to a backtrace are the values of the 
  12760.       local variables for several stack frames up.  When a local variable or an 
  12761.       argument is an RTX, first print its value and then use the GDB command pr 
  12762.       to print the RTL expression that it points to.  (If GDB doesn't run on 
  12763.       your machine, use your debugger to call the function debug_rtx with the 
  12764.       RTX as an argument.)  In general, whenever a variable is a pointer, its 
  12765.       value is no use without the data it points to. 
  12766.  
  12767.  Here are some things that are not necessary: 
  12768.  
  12769.      A description of the envelope of the bug. 
  12770.  
  12771.       Often people who encounter a bug spend a lot of time investigating which 
  12772.       changes to the input file will make the bug go away and which changes 
  12773.       will not affect it. 
  12774.  
  12775.       This is often time consuming and not very useful, because the way we will 
  12776.       find the bug is by running a single example under the debugger with 
  12777.       breakpoints, not by pure deduction from a series of examples.  You might 
  12778.       as well save your time for something else. 
  12779.  
  12780.       Of course, if you can find a simpler example to report instead of the 
  12781.       original one, that is a convenience.  Errors in the output will be easier 
  12782.       to spot, running under the debugger will take less time, etc. Most GNU CC 
  12783.       bugs involve just one function, so the most straightforward way to 
  12784.       simplify an example is to delete all the function definitions except the 
  12785.       one where the bug occurs.  Those earlier in the file may be replaced by 
  12786.       external declarations if the crucial function depends on them. 
  12787.       (Exception: inline functions may affect compilation of functions defined 
  12788.       later in the file.) 
  12789.  
  12790.       However, simplification is not vital; if you don't want to do this, 
  12791.       report the bug anyway and send the entire test case you used. 
  12792.  
  12793.      In particular, some people insert conditionals '#ifdef BUG' around a 
  12794.       statement which, if removed, makes the bug not happen.  These are just 
  12795.       clutter; we won't pay any attention to them anyway.  Besides, you should 
  12796.       send us cpp output, and that can't have conditionals. 
  12797.  
  12798.      A patch for the bug. 
  12799.  
  12800.       A patch for the bug is useful if it is a good one.  But don't omit the 
  12801.       necessary information, such as the test case, on the assumption that a 
  12802.       patch is all we need.  We might see problems with your patch and decide 
  12803.       to fix the problem another way, or we might not understand it at all. 
  12804.  
  12805.       Sometimes with a program as complicated as GNU CC it is very hard to 
  12806.       construct an example that will make the program follow a certain path 
  12807.       through the code.  If you don't send the example, we won't be able to 
  12808.       construct one, so we won't be able to verify that the bug is fixed. 
  12809.  
  12810.       And if we can't understand what bug you are trying to fix, or why your 
  12811.       patch should be an improvement, we won't install it.  A test case will 
  12812.       help us to understand. 
  12813.  
  12814.       See Sending Patches, for guidelines on how to make it easy for us to 
  12815.       understand and install your patches. 
  12816.  
  12817.      A guess about what the bug is or what it depends on. 
  12818.  
  12819.       Such guesses are usually wrong.  Even I can't guess right about such 
  12820.       things without first using the debugger to find the facts. 
  12821.  
  12822.      A core dump file. 
  12823.  
  12824.       We have no way of examining a core dump for your type of machine unless 
  12825.       we have an identical system---and if we do have one, we should be able to 
  12826.       reproduce the crash ourselves. 
  12827.  
  12828.  
  12829. ΓòÉΓòÉΓòÉ 10.4. Sending Patches for GNU CC ΓòÉΓòÉΓòÉ
  12830.  
  12831.  If you would like to write bug fixes or improvements for the GNU C compiler, 
  12832.  that is very helpful.  Send suggested fixes to the bug report mailing list, 
  12833.  bug-gcc@prep.ai.mit.edu. 
  12834.  
  12835.  Please follow these guidelines so we can study your patches efficiently. If 
  12836.  you don't follow these guidelines, your information might still be useful, but 
  12837.  using it will take extra work.  Maintaining GNU C is a lot of work in the best 
  12838.  of circumstances, and we can't keep up unless you do your best to help. 
  12839.  
  12840.      Send an explanation with your changes of what problem they fix or what 
  12841.       improvement they bring about.  For a bug fix, just include a copy of the 
  12842.       bug report, and explain why the change fixes the bug. 
  12843.  
  12844.       (Referring to a bug report is not as good as including it, because then 
  12845.       we will have to look it up, and we have probably already deleted it if 
  12846.       we've already fixed the bug.) 
  12847.  
  12848.      Always include a proper bug report for the problem you think you have 
  12849.       fixed.  We need to convince ourselves that the change is right before 
  12850.       installing it.  Even if it is right, we might have trouble judging it if 
  12851.       we don't have a way to reproduce the problem. 
  12852.  
  12853.      Include all the comments that are appropriate to help people reading the 
  12854.       source in the future understand why this change was needed. 
  12855.  
  12856.      Don't mix together changes made for different reasons. Send them 
  12857.       individually. 
  12858.  
  12859.       If you make two changes for separate reasons, then we might not want to 
  12860.       install them both.  We might want to install just one.  If you send them 
  12861.       all jumbled together in a single set of diffs, we have to do extra work 
  12862.       to disentangle them---to figure out which parts of the change serve which 
  12863.       purpose.  If we don't have time for this, we might have to ignore your 
  12864.       changes entirely. 
  12865.  
  12866.       If you send each change as soon as you have written it, with its own 
  12867.       explanation, then the two changes never get tangled up, and we can 
  12868.       consider each one properly without any extra work to disentangle them. 
  12869.  
  12870.       Ideally, each change you send should be impossible to subdivide into 
  12871.       parts that we might want to consider separately, because each of its 
  12872.       parts gets its motivation from the other parts. 
  12873.  
  12874.      Send each change as soon as that change is finished.  Sometimes people 
  12875.       think they are helping us by accumulating many changes to send them all 
  12876.       together.  As explained above, this is absolutely the worst thing you 
  12877.       could do. 
  12878.  
  12879.       Since you should send each change separately, you might as well send it 
  12880.       right away.  That gives us the option of installing it immediately if it 
  12881.       is important. 
  12882.  
  12883.      Use 'diff -c' to make your diffs.  Diffs without context are hard for us 
  12884.       to install reliably.  More than that, they make it hard for us to study 
  12885.       the diffs to decide whether we want to install them.  Unidiff format is 
  12886.       better than contextless diffs, but not as easy to read as '-c' format. 
  12887.  
  12888.       If you have GNU diff, use 'diff -cp', which shows the name of the 
  12889.       function that each change occurs in. 
  12890.  
  12891.      Write the change log entries for your changes.  We get lots of changes, 
  12892.       and we don't have time to do all the change log writing ourselves. 
  12893.  
  12894.       Read the 'ChangeLog' file to see what sorts of information to put in, and 
  12895.       to learn the style that we use.  The purpose of the change log is to show 
  12896.       people where to find what was changed.  So you need to be specific about 
  12897.       what functions you changed; in large functions, it's often helpful to 
  12898.       indicate where within the function the change was. 
  12899.  
  12900.       On the other hand, once you have shown people where to find the change, 
  12901.       you need not explain its purpose.  Thus, if you add a new function, all 
  12902.       you need to say about it is that it is new.  If you feel that the purpose 
  12903.       needs explaining, it probably does---but the explanation will be much 
  12904.       more useful if you put it in comments in the code. 
  12905.  
  12906.       If you would like your name to appear in the header line for who made the 
  12907.       change, send us the header line. 
  12908.  
  12909.      When you write the fix, keep in mind that we can't install a change that 
  12910.       would break other systems. 
  12911.  
  12912.       People often suggest fixing a problem by changing machine-independent 
  12913.       files such as 'toplev.c' to do something special that a particular system 
  12914.       needs.  Sometimes it is totally obvious that such changes would break GNU 
  12915.       CC for almost all users.  We can't possibly make a change like that.  At 
  12916.       best it might tell us how to write another patch that would solve the 
  12917.       problem acceptably. 
  12918.  
  12919.       Sometimes people send fixes that might be an improvement in general---but 
  12920.       it is hard to be sure of this.  It's hard to install such changes because 
  12921.       we have to study them very carefully.  Of course, a good explanation of 
  12922.       the reasoning by which you concluded the change was correct can help 
  12923.       convince us. 
  12924.  
  12925.       The safest changes are changes to the configuration files for a 
  12926.       particular machine.  These are safe because they can't create new bugs on 
  12927.       other machines. 
  12928.  
  12929.       Please help us keep up with the workload by designing the patch in a form 
  12930.       that is good to install. 
  12931.  
  12932.  
  12933. ΓòÉΓòÉΓòÉ 11. How To Get Help with GNU CC ΓòÉΓòÉΓòÉ
  12934.  
  12935.  If you need help installing, using or changing GNU CC, there are two ways to 
  12936.  find it: 
  12937.  
  12938.      Send a message to a suitable network mailing list.  First try 
  12939.       bug-gcc@prep.ai.mit.edu, and if that brings no response, try 
  12940.       help-gcc@prep.ai.mit.edu. 
  12941.  
  12942.      Look in the service directory for someone who might help you for a fee. 
  12943.       The service directory is found in the file named 'SERVICE' in the GNU CC 
  12944.       distribution. 
  12945.  
  12946.  
  12947. ΓòÉΓòÉΓòÉ 12. Contributing to GNU CC Development ΓòÉΓòÉΓòÉ
  12948.  
  12949.  If you would like to help pretest GNU CC releases to assure they work well, or 
  12950.  if you would like to work on improving GNU CC, please contact the maintainers 
  12951.  at bug-gcc@gnu.ai.mit.edu.  A pretester should be willing to try to 
  12952.  investigate bugs as well as report them. 
  12953.  
  12954.  If you'd like to work on improvements, please ask for suggested projects or 
  12955.  suggest your own ideas.  If you have already written an improvement, please 
  12956.  tell us about it.  If you have not yet started work, it is useful to contact 
  12957.  bug-gcc@prep.ai.mit.edu before you start; the maintainers may be able to 
  12958.  suggest ways to make your extension fit in better with the rest of GNU CC and 
  12959.  with other development plans. 
  12960.  
  12961.  
  12962. ΓòÉΓòÉΓòÉ 13. Using GNU CC on VMS ΓòÉΓòÉΓòÉ
  12963.  
  12964.  Here is how to use GNU CC on VMS. 
  12965.  
  12966.  Include Files and VMS         Where the preprocessor looks for the include 
  12967.                                files. 
  12968.  Global Declarations           How to do globaldef, globalref and globalvalue 
  12969.                                with GNU CC. 
  12970.  VMS Misc                      Misc information. 
  12971.  
  12972.  
  12973. ΓòÉΓòÉΓòÉ 13.1. Include Files and VMS ΓòÉΓòÉΓòÉ
  12974.  
  12975.  Due to the differences between the filesystems of Unix and VMS, GNU CC 
  12976.  attempts to translate file names in '#include' into names that VMS will 
  12977.  understand.  The basic strategy is to prepend a prefix to the specification of 
  12978.  the include file, convert the whole filename to a VMS filename, and then try 
  12979.  to open the file.  GNU CC tries various prefixes one by one until one of them 
  12980.  succeeds: 
  12981.  
  12982.    1. The first prefix is the 'GNU_CC_INCLUDE:' logical name: this is where GNU 
  12983.       C header files are traditionally stored.  If you wish to store header 
  12984.       files in non-standard locations, then you can assign the logical 
  12985.       'GNU_CC_INCLUDE' to be a search list, where each element of the list is 
  12986.       suitable for use with a rooted logical. 
  12987.  
  12988.    2. The next prefix tried is 'SYS$SYSROOT:[SYSLIB.]'.  This is where VAX-C 
  12989.       header files are traditionally stored. 
  12990.  
  12991.    3. If the include file specification by itself is a valid VMS filename, the 
  12992.       preprocessor then uses this name with no prefix in an attempt to open the 
  12993.       include file. 
  12994.  
  12995.    4. If the file specification is not a valid VMS filename (i.e. does not 
  12996.       contain a device or a directory specifier, and contains a '/' character), 
  12997.       the preprocessor tries to convert it from Unix syntax to VMS syntax. 
  12998.  
  12999.       Conversion works like this: the first directory name becomes a device, 
  13000.       and the rest of the directories are converted into VMS-format directory 
  13001.       names.  For example, the name 'X11/foobar.h' is translated to 
  13002.       'X11:[000000]foobar.h' or 'X11:foobar.h', whichever one can be opened. 
  13003.       This strategy allows you to assign a logical name to point to the actual 
  13004.       location of the header files. 
  13005.  
  13006.    5. If none of these strategies succeeds, the '#include' fails. 
  13007.  
  13008.  Include directives of the form: 
  13009.  
  13010.                       #include foobar
  13011.  
  13012.  are a common source of incompatibility between VAX-C and GNU CC.  VAX-C treats 
  13013.  this much like a standard #include <foobar.h> directive. That is incompatible 
  13014.  with the ANSI C behavior implemented by GNU CC: to expand the name foobar as a 
  13015.  macro.  Macro expansion should eventually yield one of the two standard 
  13016.  formats for #include: 
  13017.  
  13018.                       #include "file"
  13019.                       #include <file>
  13020.  
  13021.  If you have this problem, the best solution is to modify the source to convert 
  13022.  the #include directives to one of the two standard forms. That will work with 
  13023.  either compiler.  If you want a quick and dirty fix, define the file names as 
  13024.  macros with the proper expansion, like this: 
  13025.  
  13026.                       #define stdio <stdio.h>
  13027.  
  13028.  This will work, as long as the name doesn't conflict with anything else in the 
  13029.  program. 
  13030.  
  13031.  Another source of incompatibility is that VAX-C assumes that: 
  13032.  
  13033.                       #include "foobar"
  13034.  
  13035.  is actually asking for the file 'foobar.h'.  GNU CC does not make this 
  13036.  assumption, and instead takes what you ask for literally; it tries to read the 
  13037.  file 'foobar'.  The best way to avoid this problem is to always specify the 
  13038.  desired file extension in your include directives. 
  13039.  
  13040.  GNU CC for VMS is distributed with a set of include files that is sufficient 
  13041.  to compile most general purpose programs.  Even though the GNU CC distribution 
  13042.  does not contain header files to define constants and structures for some VMS 
  13043.  system-specific functions, there is no reason why you cannot use GNU CC with 
  13044.  any of these functions.  You first may have to generate or create header 
  13045.  files, either by using the public domain utility UNSDL (which can be found on 
  13046.  a DECUS tape), or by extracting the relevant modules from one of the system 
  13047.  macro libraries, and using an editor to construct a C header file. 
  13048.  
  13049.  A #include file name cannot contain a DECNET node name.  The preprocessor 
  13050.  reports an I/O error if you attempt to use a node name, whether explicitly, or 
  13051.  implicitly via a logical name. 
  13052.  
  13053.  
  13054. ΓòÉΓòÉΓòÉ 13.2. Global Declarations and VMS ΓòÉΓòÉΓòÉ
  13055.  
  13056.  GNU CC does not provide the globalref, globaldef and globalvalue keywords of 
  13057.  VAX-C.  You can get the same effect with an obscure feature of GAS, the GNU 
  13058.  assembler.  (This requires GAS version 1.39 or later.)  The following macros 
  13059.  allow you to use this feature in a fairly natural way: 
  13060.  
  13061.                       #ifdef __GNUC__
  13062.                       #define GLOBALREF(TYPE,NAME)            \
  13063.                        TYPE NAME                    \
  13064.                        asm ("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME)
  13065.                       #define GLOBALDEF(TYPE,NAME,VALUE)         \
  13066.                        TYPE NAME                    \
  13067.                        asm ("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME) \
  13068.                         = VALUE
  13069.                       #define GLOBALVALUEREF(TYPE,NAME)         \
  13070.                        const TYPE NAME[1]                \
  13071.                        asm ("_$$PsectAttributes_GLOBALVALUE$$" #NAME)
  13072.                       #define GLOBALVALUEDEF(TYPE,NAME,VALUE)      \
  13073.                        const TYPE NAME[1]                \
  13074.                        asm ("_$$PsectAttributes_GLOBALVALUE$$" #NAME)  \
  13075.                         = {VALUE}
  13076.                       #else
  13077.                       #define GLOBALREF(TYPE,NAME) \
  13078.                        globalref TYPE NAME
  13079.                       #define GLOBALDEF(TYPE,NAME,VALUE) \
  13080.                        globaldef TYPE NAME = VALUE
  13081.                       #define GLOBALVALUEDEF(TYPE,NAME,VALUE) \
  13082.                        globalvalue TYPE NAME = VALUE
  13083.                       #define GLOBALVALUEREF(TYPE,NAME) \
  13084.                        globalvalue TYPE NAME
  13085.                       #endif
  13086.  
  13087.  (The _$$PsectAttributes_GLOBALSYMBOL prefix at the start of the name is 
  13088.  removed by the assembler, after it has modified the attributes of the symbol). 
  13089.  These macros are provided in the VMS binaries distribution in a header file 
  13090.  'GNU_HACKS.H'.  An example of the usage is: 
  13091.  
  13092.                       GLOBALREF (int, ijk);
  13093.                       GLOBALDEF (int, jkl, 0);
  13094.  
  13095.  The macros GLOBALREF and GLOBALDEF cannot be used straightforwardly for 
  13096.  arrays, since there is no way to insert the array dimension into the 
  13097.  declaration at the right place.  However, you can declare an array with these 
  13098.  macros if you first define a typedef for the array type, like this: 
  13099.  
  13100.                       typedef int intvector[10];
  13101.                       GLOBALREF (intvector, foo);
  13102.  
  13103.  Array and structure initializers will also break the macros; you can define 
  13104.  the initializer to be a macro of its own, or you can expand the GLOBALDEF 
  13105.  macro by hand.  You may find a case where you wish to use the GLOBALDEF macro 
  13106.  with a large array, but you are not interested in explicitly initializing each 
  13107.  element of the array.  In such cases you can use an initializer like: {0,}, 
  13108.  which will initialize the entire array to 0. 
  13109.  
  13110.  A shortcoming of this implementation is that a variable declared with 
  13111.  GLOBALVALUEREF or GLOBALVALUEDEF is always an array.  For example, the 
  13112.  declaration: 
  13113.  
  13114.                       GLOBALVALUEREF(int, ijk);
  13115.  
  13116.  declares the variable ijk as an array of type int [1]. This is done because a 
  13117.  globalvalue is actually a constant; its ``value'' is what the linker would 
  13118.  normally consider an address.  That is not how an integer value works in C, 
  13119.  but it is how an array works.  So treating the symbol as an array name gives 
  13120.  consistent results---with the exception that the value seems to have the wrong 
  13121.  type.  Don't try to access an element of the array.  It doesn't have any 
  13122.  elements. The array ``address'' may not be the address of actual storage. 
  13123.  
  13124.  The fact that the symbol is an array may lead to warnings where the variable 
  13125.  is used.  Insert type casts to avoid the warnings.  Here is an example; it 
  13126.  takes advantage of the ANSI C feature allowing macros that expand to use the 
  13127.  same name as the macro itself. 
  13128.  
  13129.                       GLOBALVALUEREF (int, ss$_normal);
  13130.                       GLOBALVALUEDEF (int, xyzzy,123);
  13131.                       #ifdef __GNUC__
  13132.                       #define ss$_normal ((int) ss$_normal)
  13133.                       #define xyzzy ((int) xyzzy)
  13134.                       #endif
  13135.  
  13136.  Don't use globaldef or globalref with a variable whose type is an enumeration 
  13137.  type; this is not implemented.  Instead, make the variable an integer, and use 
  13138.  a globalvaluedef for each of the enumeration values.  An example of this would 
  13139.  be: 
  13140.  
  13141.                       #ifdef __GNUC__
  13142.                       GLOBALDEF (int, color, 0);
  13143.                       GLOBALVALUEDEF (int, RED, 0);
  13144.                       GLOBALVALUEDEF (int, BLUE, 1);
  13145.                       GLOBALVALUEDEF (int, GREEN, 3);
  13146.                       #else
  13147.                       enum globaldef color {RED, BLUE, GREEN = 3};
  13148.                       #endif
  13149.  
  13150.  
  13151. ΓòÉΓòÉΓòÉ 13.3. Other VMS Issues ΓòÉΓòÉΓòÉ
  13152.  
  13153.  GNU CC automatically arranges for main to return 1 by default if you fail to 
  13154.  specify an explicit return value.  This will be interpreted by VMS as a status 
  13155.  code indicating a normal successful completion. Version 1 of GNU CC did not 
  13156.  provide this default. 
  13157.  
  13158.  GNU CC on VMS works only with the GNU assembler, GAS.  You need version 1.37 
  13159.  or later of GAS in order to produce value debugging information for the VMS 
  13160.  debugger.  Use the ordinary VMS linker with the object files produced by GAS. 
  13161.  
  13162.  Under previous versions of GNU CC, the generated code would occasionally give 
  13163.  strange results when linked to the sharable 'VAXCRTL' library. Now this should 
  13164.  work. 
  13165.  
  13166.  A caveat for use of const global variables: the const modifier must be 
  13167.  specified in every external declaration of the variable in all of the source 
  13168.  files that use that variable.  Otherwise the linker will issue warnings about 
  13169.  conflicting attributes for the variable.  Your program will still work despite 
  13170.  the warnings, but the variable will be placed in writable storage. 
  13171.  
  13172.  Although the VMS linker does distinguish between upper and lower case letters 
  13173.  in global symbols, most VMS compilers convert all such symbols into upper case 
  13174.  and most run-time library routines also have upper case names.  To be able to 
  13175.  reliably call such routines, GNU CC (by means of the assembler GAS) converts 
  13176.  global symbols into upper case like other VMS compilers.  However, since the 
  13177.  usual practice in C is to distinguish case, GNU CC (via GAS) tries to preserve 
  13178.  usual C behavior by augmenting each name that is not all lower case.  This 
  13179.  means truncating the name to at most 23 characters and then adding more 
  13180.  characters at the end which encode the case pattern of those 23.  Names which 
  13181.  contain at least one dollar sign are an exception; they are converted directly 
  13182.  into upper case without augmentation. 
  13183.  
  13184.  Name augmentation yields bad results for programs that use precompiled 
  13185.  libraries (such as Xlib) which were generated by another compiler.  You can 
  13186.  use the compiler option '/NOCASE_HACK' to inhibit augmentation; it makes 
  13187.  external C functions and variables case-independent as is usual on VMS. 
  13188.  Alternatively, you could write all references to the functions and variables 
  13189.  in such libraries using lower case; this will work on VMS, but is not portable 
  13190.  to other systems.  The compiler option '/NAMES' also provides control over 
  13191.  global name handling. 
  13192.  
  13193.  Function and variable names are handled somewhat differently with GNU C++. 
  13194.  The GNU C++ compiler performs name mangling on function names, which means 
  13195.  that it adds information to the function name to describe the data types of 
  13196.  the arguments that the function takes.  One result of this is that the name of 
  13197.  a function can become very long. Since the VMS linker only recognizes the 
  13198.  first 31 characters in a name, special action is taken to ensure that each 
  13199.  function and variable has a unique name that can be represented in 31 
  13200.  characters. 
  13201.  
  13202.  If the name (plus a name augmentation, if required) is less than 32 characters 
  13203.  in length, then no special action is performed.  If the name is longer than 31 
  13204.  characters, the assembler (GAS) will generate a hash string based upon the 
  13205.  function name, truncate the function name to 23 characters, and append the 
  13206.  hash string to the truncated name.  If the '/VERBOSE' compiler option is used, 
  13207.  the assembler will print both the full and truncated names of each symbol that 
  13208.  is truncated. 
  13209.  
  13210.  The '/NOCASE_HACK' compiler option should not be used when you are compiling 
  13211.  programs that use libg++.  libg++ has several instances of objects (i.e. 
  13212.  Filebuf and filebuf) which become indistinguishable in a case-insensitive 
  13213.  environment.  This leads to cases where you need to inhibit augmentation 
  13214.  selectively (if you were using libg++ and Xlib in the same program, for 
  13215.  example).  There is no special feature for doing this, but you can get the 
  13216.  result by defining a macro for each mixed case symbol for which you wish to 
  13217.  inhibit augmentation.  The macro should expand into the lower case equivalent 
  13218.  of itself.  For example: 
  13219.  
  13220.                       #define StuDlyCapS studlycaps
  13221.  
  13222.  These macro definitions can be placed in a header file to minimize the number 
  13223.  of changes to your source code. 
  13224.  
  13225.  Here is a list of all the passes of the compiler and their source files. Also 
  13226.  included is a description of where debugging dumps can be requested with '-d' 
  13227.  options. 
  13228.  
  13229.      Parsing.  This pass reads the entire text of a function definition, 
  13230.       constructing partial syntax trees.  This and RTL generation are no longer 
  13231.       truly separate passes (formerly they were), but it is easier to think of 
  13232.       them as separate. 
  13233.  
  13234.       The tree representation does not entirely follow C syntax, because it is 
  13235.       intended to support other languages as well. 
  13236.  
  13237.       Language-specific data type analysis is also done in this pass, and every 
  13238.       tree node that represents an expression has a data type attached. 
  13239.       Variables are represented as declaration nodes. 
  13240.  
  13241.       Constant folding and some arithmetic simplifications are also done during 
  13242.       this pass. 
  13243.  
  13244.       The language-independent source files for parsing are 'stor-layout.c', 
  13245.       'fold-const.c', and 'tree.c'. There are also header files 'tree.h' and 
  13246.       'tree.def' which define the format of the tree representation. 
  13247.  
  13248.       The source files to parse C are 'c-parse.in', 'c-decl.c', 'c-typeck.c', 
  13249.       'c-aux-info.c', 'c-convert.c', and 'c-lang.c' along with header files 
  13250.       'c-lex.h', and 'c-tree.h'. 
  13251.  
  13252.       The source files for parsing C++ are 'cp-parse.y', 'cp-class.c', 
  13253.       'cp-cvt.c', 'cp-decl.c', 'cp-decl2.c', 'cp-dem.c', 'cp-except.c', 
  13254.       'cp-expr.c', 'cp-init.c', 'cp-lex.c', 'cp-method.c', 'cp-ptree.c', 
  13255.       'cp-search.c', 'cp-tree.c', 'cp-type2.c', and 'cp-typeck.c', along with 
  13256.       header files 'cp-tree.def', 'cp-tree.h', and 'cp-decl.h'. 
  13257.  
  13258.       The special source files for parsing Objective C are 'objc-parse.y', 
  13259.       'objc-actions.c', 'objc-tree.def', and 'objc-actions.h'.  Certain 
  13260.       C-specific files are used for this as well. 
  13261.  
  13262.       The file 'c-common.c' is also used for all of the above languages. 
  13263.  
  13264.      RTL generation.  This is the conversion of syntax tree into RTL code. It 
  13265.       is actually done statement-by-statement during parsing, but for most 
  13266.       purposes it can be thought of as a separate pass. 
  13267.  
  13268.       This is where the bulk of target-parameter-dependent code is found, since 
  13269.       often it is necessary for strategies to apply only when certain standard 
  13270.       kinds of instructions are available.  The purpose of named instruction 
  13271.       patterns is to provide this information to the RTL generation pass. 
  13272.  
  13273.       Optimization is done in this pass for if-conditions that are comparisons, 
  13274.       boolean operations or conditional expressions.  Tail recursion is 
  13275.       detected at this time also.  Decisions are made about how best to arrange 
  13276.       loops and how to output switch statements. 
  13277.  
  13278.       The source files for RTL generation include 'stmt.c', 'calls.c', 
  13279.       'expr.c', 'explow.c', 'expmed.c', 'function.c', 'optabs.c' and 
  13280.       'emit-rtl.c'. Also, the file 'insn-emit.c', generated from the machine 
  13281.       description by the program genemit, is used in this pass.  The header 
  13282.       file 'expr.h' is used for communication within this pass. 
  13283.  
  13284.       The header files 'insn-flags.h' and 'insn-codes.h', generated from the 
  13285.       machine description by the programs genflags and gencodes, tell this pass 
  13286.       which standard names are available for use and which patterns correspond 
  13287.       to them. 
  13288.  
  13289.       Aside from debugging information output, none of the following passes 
  13290.       refers to the tree structure representation of the function (only part of 
  13291.       which is saved). 
  13292.  
  13293.       The decision of whether the function can and should be expanded inline in 
  13294.       its subsequent callers is made at the end of rtl generation.  The 
  13295.       function must meet certain criteria, currently related to the size of the 
  13296.       function and the types and number of parameters it has.  Note that this 
  13297.       function may contain loops, recursive calls to itself (tail-recursive 
  13298.       functions can be inlined!), gotos, in short, all constructs supported by 
  13299.       GNU CC.  The file 'integrate.c' contains the code to save a function's 
  13300.       rtl for later inlining and to inline that rtl when the function is 
  13301.       called.  The header file 'integrate.h' is also used for this purpose. 
  13302.  
  13303.       The option '-dr' causes a debugging dump of the RTL code after this pass. 
  13304.       This dump file's name is made by appending '.rtl' to the input file name. 
  13305.  
  13306.      Jump optimization.  This pass simplifies jumps to the following 
  13307.       instruction, jumps across jumps, and jumps to jumps.  It deletes 
  13308.       unreferenced labels and unreachable code, except that unreachable code 
  13309.       that contains a loop is not recognized as unreachable in this pass. (Such 
  13310.       loops are deleted later in the basic block analysis.)  It also converts 
  13311.       some code originally written with jumps into sequences of instructions 
  13312.       that directly set values from the results of comparisons, if the machine 
  13313.       has such instructions. 
  13314.  
  13315.       Jump optimization is performed two or three times.  The first time is 
  13316.       immediately following RTL generation.  The second time is after CSE, but 
  13317.       only if CSE says repeated jump optimization is needed.  The last time is 
  13318.       right before the final pass.  That time, cross-jumping and deletion of 
  13319.       no-op move instructions are done together with the optimizations 
  13320.       described above. 
  13321.  
  13322.       The source file of this pass is 'jump.c'. 
  13323.  
  13324.       The option '-dj' causes a debugging dump of the RTL code after this pass 
  13325.       is run for the first time.  This dump file's name is made by appending 
  13326.       '.jump' to the input file name. 
  13327.  
  13328.      Register scan.  This pass finds the first and last use of each register, 
  13329.       as a guide for common subexpression elimination.  Its source is in 
  13330.       'regclass.c'. 
  13331.  
  13332.      Jump threading.  This pass detects a condition jump that branches to an 
  13333.       identical or inverse test.  Such jumps can be 'threaded' through the 
  13334.       second conditional test.  The source code for this pass is in 'jump.c'. 
  13335.       This optimization is only performed if '-fthread-jumps' is enabled. 
  13336.  
  13337.      Common subexpression elimination.  This pass also does constant 
  13338.       propagation.  Its source file is 'cse.c'.  If constant propagation causes 
  13339.       conditional jumps to become unconditional or to become no-ops, jump 
  13340.       optimization is run again when CSE is finished. 
  13341.  
  13342.       The option '-ds' causes a debugging dump of the RTL code after this pass. 
  13343.       This dump file's name is made by appending '.cse' to the input file name. 
  13344.  
  13345.      Loop optimization.  This pass moves constant expressions out of loops, 
  13346.       and optionally does strength-reduction and loop unrolling as well. Its 
  13347.       source files are 'loop.c' and 'unroll.c', plus the header 'loop.h' used 
  13348.       for communication between them.  Loop unrolling uses some functions in 
  13349.       'integrate.c' and the header 'integrate.h'. 
  13350.  
  13351.       The option '-dL' causes a debugging dump of the RTL code after this pass. 
  13352.       This dump file's name is made by appending '.loop' to the input file 
  13353.       name. 
  13354.  
  13355.      If '-frerun-cse-after-loop' was enabled, a second common subexpression 
  13356.       elimination pass is performed after the loop optimization pass.  Jump 
  13357.       threading is also done again at this time if it was specified. 
  13358.  
  13359.       The option '-dt' causes a debugging dump of the RTL code after this pass. 
  13360.       This dump file's name is made by appending '.cse2' to the input file 
  13361.       name. 
  13362.  
  13363.      Stupid register allocation is performed at this point in a nonoptimizing 
  13364.       compilation.  It does a little data flow analysis as well.  When stupid 
  13365.       register allocation is in use, the next pass executed is the reloading 
  13366.       pass; the others in between are skipped. The source file is 'stupid.c'. 
  13367.  
  13368.      Data flow analysis ('flow.c').  This pass divides the program into basic 
  13369.       blocks (and in the process deletes unreachable loops); then it computes 
  13370.       which pseudo-registers are live at each point in the program, and makes 
  13371.       the first instruction that uses a value point at the instruction that 
  13372.       computed the value. 
  13373.  
  13374.       This pass also deletes computations whose results are never used, and 
  13375.       combines memory references with add or subtract instructions to make 
  13376.       autoincrement or autodecrement addressing. 
  13377.  
  13378.       The option '-df' causes a debugging dump of the RTL code after this pass. 
  13379.       This dump file's name is made by appending '.flow' to the input file 
  13380.       name.  If stupid register allocation is in use, this dump file reflects 
  13381.       the full results of such allocation. 
  13382.  
  13383.      Instruction combination ('combine.c').  This pass attempts to combine 
  13384.       groups of two or three instructions that are related by data flow into 
  13385.       single instructions.  It combines the RTL expressions for the 
  13386.       instructions by substitution, simplifies the result using algebra, and 
  13387.       then attempts to match the result against the machine description. 
  13388.  
  13389.       The option '-dc' causes a debugging dump of the RTL code after this pass. 
  13390.       This dump file's name is made by appending '.combine' to the input file 
  13391.       name. 
  13392.  
  13393.      Instruction scheduling ('sched.c').  This pass looks for instructions 
  13394.       whose output will not be available by the time that it is used in 
  13395.       subsequent instructions.  (Memory loads and floating point instructions 
  13396.       often have this behavior on RISC machines).  It re-orders instructions 
  13397.       within a basic block to try to separate the definition and use of items 
  13398.       that otherwise would cause pipeline stalls. 
  13399.  
  13400.       Instruction scheduling is performed twice.  The first time is immediately 
  13401.       after instruction combination and the second is immediately after reload. 
  13402.  
  13403.       The option '-dS' causes a debugging dump of the RTL code after this pass 
  13404.       is run for the first time.  The dump file's name is made by appending 
  13405.       '.sched' to the input file name. 
  13406.  
  13407.      Register class preferencing.  The RTL code is scanned to find out which 
  13408.       register class is best for each pseudo register.  The source file is 
  13409.       'regclass.c'. 
  13410.  
  13411.      Local register allocation ('local-alloc.c').  This pass allocates hard 
  13412.       registers to pseudo registers that are used only within one basic block. 
  13413.       Because the basic block is linear, it can use fast and powerful 
  13414.       techniques to do a very good job. 
  13415.  
  13416.       The option '-dl' causes a debugging dump of the RTL code after this pass. 
  13417.       This dump file's name is made by appending '.lreg' to the input file 
  13418.       name. 
  13419.  
  13420.      Global register allocation ('global.c').  This pass allocates hard 
  13421.       registers for the remaining pseudo registers (those whose life spans are 
  13422.       not contained in one basic block). 
  13423.  
  13424.      Reloading.  This pass renumbers pseudo registers with the hardware 
  13425.       registers numbers they were allocated.  Pseudo registers that did not get 
  13426.       hard registers are replaced with stack slots.  Then it finds instructions 
  13427.       that are invalid because a value has failed to end up in a register, or 
  13428.       has ended up in a register of the wrong kind.  It fixes up these 
  13429.       instructions by reloading the problematical values temporarily into 
  13430.       registers.  Additional instructions are generated to do the copying. 
  13431.  
  13432.       The reload pass also optionally eliminates the frame pointer and inserts 
  13433.       instructions to save and restore call-clobbered registers around calls. 
  13434.  
  13435.       Source files are 'reload.c' and 'reload1.c', plus the header 'reload.h' 
  13436.       used for communication between them. 
  13437.  
  13438.       The option '-dg' causes a debugging dump of the RTL code after this pass. 
  13439.       This dump file's name is made by appending '.greg' to the input file 
  13440.       name. 
  13441.  
  13442.      Instruction scheduling is repeated here to try to avoid pipeline stalls 
  13443.       due to memory loads generated for spilled pseudo registers. 
  13444.  
  13445.       The option '-dR' causes a debugging dump of the RTL code after this pass. 
  13446.       This dump file's name is made by appending '.sched2' to the input file 
  13447.       name. 
  13448.  
  13449.      Jump optimization is repeated, this time including cross-jumping and 
  13450.       deletion of no-op move instructions. 
  13451.  
  13452.       The option '-dJ' causes a debugging dump of the RTL code after this pass. 
  13453.       This dump file's name is made by appending '.jump2' to the input file 
  13454.       name. 
  13455.  
  13456.      Delayed branch scheduling.  This optional pass attempts to find 
  13457.       instructions that can go into the delay slots of other instructions, 
  13458.       usually jumps and calls.  The source file name is 'reorg.c'. 
  13459.  
  13460.       The option '-dd' causes a debugging dump of the RTL code after this pass. 
  13461.       This dump file's name is made by appending '.dbr' to the input file name. 
  13462.  
  13463.      Conversion from usage of some hard registers to usage of a register stack 
  13464.       may be done at this point.  Currently, this is supported only for the 
  13465.       floating-point registers of the Intel 80387 coprocessor.  The source file 
  13466.       name is 'reg-stack.c'. 
  13467.  
  13468.       The options '-dk' causes a debugging dump of the RTL code after this 
  13469.       pass.  This dump file's name is made by appending '.stack' to the input 
  13470.       file name. 
  13471.  
  13472.      Final.  This pass outputs the assembler code for the function.  It is 
  13473.       also responsible for identifying spurious test and compare instructions. 
  13474.       Machine-specific peephole optimizations are performed at the same time. 
  13475.       The function entry and exit sequences are generated directly as assembler 
  13476.       code in this pass; they never exist as RTL. 
  13477.  
  13478.       The source files are 'final.c' plus 'insn-output.c'; the latter is 
  13479.       generated automatically from the machine description by the tool 
  13480.       'genoutput'.  The header file 'conditions.h' is used for communication 
  13481.       between these files. 
  13482.  
  13483.      Debugging information output.  This is run after final because it must 
  13484.       output the stack slot offsets for pseudo registers that did not get hard 
  13485.       registers.  Source files are 'dbxout.c' for DBX symbol table format, ' 
  13486.       sdbout.c' for SDB symbol table format, and 'dwarfout.c' for DWARF symbol 
  13487.       table format. 
  13488.  
  13489.  Some additional files are used by all or many passes: 
  13490.  
  13491.      Every pass uses 'machmode.def' and 'machmode.h' which define the machine 
  13492.       modes. 
  13493.  
  13494.      Several passes use 'real.h', which defines the default representation of 
  13495.       floating point constants and how to operate on them. 
  13496.  
  13497.      All the passes that work with RTL use the header files 'rtl.h' and 
  13498.       'rtl.def', and subroutines in file 'rtl.c'.  The tools gen* also use 
  13499.       these files to read and work with the machine description RTL. 
  13500.  
  13501.      Several passes refer to the header file 'insn-config.h' which contains a 
  13502.       few parameters (C macro definitions) generated automatically from the 
  13503.       machine description RTL by the tool genconfig. 
  13504.  
  13505.      Several passes use the instruction recognizer, which consists of 
  13506.       'recog.c' and 'recog.h', plus the files 'insn-recog.c' and 
  13507.       'insn-extract.c' that are generated automatically from the machine 
  13508.       description by the tools 'genrecog' and 'genextract'. 
  13509.  
  13510.      Several passes use the header files 'regs.h' which defines the 
  13511.       information recorded about pseudo register usage, and 'basic-block.h' 
  13512.       which defines the information recorded about basic blocks. 
  13513.  
  13514.      'hard-reg-set.h' defines the type HARD_REG_SET, a bit-vector with a bit 
  13515.       for each hard register, and some macros to manipulate it. This type is 
  13516.       just int if the machine has few enough hard registers; otherwise it is an 
  13517.       array of int and some of the macros expand into loops. 
  13518.  
  13519.      Several passes use instruction attributes.  A definition of the 
  13520.       attributes defined for a particular machine is in file 'insn-attr.h', 
  13521.       which is generated from the machine description by the program 'genattr'. 
  13522.       The file 'insn-attrtab.c' contains subroutines to obtain the attribute 
  13523.       values for insns.  It is generated from the machine description by the 
  13524.       program 'genattrtab'. 
  13525.  
  13526.  
  13527. ΓòÉΓòÉΓòÉ 14. Index ΓòÉΓòÉΓòÉ
  13528.  
  13529.  #pragma implementation, implied                   Declarations and Definitions 
  13530.                                                    in One Header 
  13531.  #pragma, reason for not using                     Declaring Attributes of 
  13532.                                                    Functions 
  13533.  $                                                 Dollar Signs in Identifier 
  13534.                                                    Names 
  13535.  '!' in constraint                                 Multiple Alternative 
  13536.                                                    Constraints 
  13537.  '#' in constraint                                 Constraint Modifier 
  13538.                                                    Characters 
  13539.  '%' in constraint                                 Constraint Modifier 
  13540.                                                    Characters 
  13541.  '&' in constraint                                 Constraint Modifier 
  13542.                                                    Characters 
  13543.  '+' in constraint                                 Constraint Modifier 
  13544.                                                    Characters 
  13545.  '0' in constraint                                 Simple Constraints 
  13546.  '<' in constraint                                 Simple Constraints 
  13547.  '=' in constraint                                 Constraint Modifier 
  13548.                                                    Characters 
  13549.  '>' in constraint                                 Simple Constraints 
  13550.  '?' in constraint                                 Multiple Alternative 
  13551.                                                    Constraints 
  13552.  'd' in constraint                                 Simple Constraints 
  13553.  'E' in constraint                                 Simple Constraints 
  13554.  'F' in constraint                                 Simple Constraints 
  13555.  'G' in constraint                                 Simple Constraints 
  13556.                                                    Simple Constraints 
  13557.  'H' in constraint                                 Simple Constraints 
  13558.  'i' in constraint                                 Simple Constraints 
  13559.                                                    Simple Constraints 
  13560.  'm' in constraint                                 Simple Constraints 
  13561.  'n' in constraint                                 Simple Constraints 
  13562.  'o' in constraint                                 Simple Constraints 
  13563.  'p' in constraint                                 Simple Constraints 
  13564.  'Q', in constraint                                Simple Constraints 
  13565.  'r' in constraint                                 Simple Constraints 
  13566.  's' in constraint                                 Simple Constraints 
  13567.  'stdarg.h' and RT PC                              IBM RT Options 
  13568.  'V' in constraint                                 Simple Constraints 
  13569.  'varargs.h' and RT PC                             IBM RT Options 
  13570.  'VAXCRTL'                                         Other VMS Issues 
  13571.  'X' in constraint                                 Simple Constraints 
  13572.  '_' in variables in macros                        Naming an Expression's Type 
  13573.  ┬╖sdata/.sdata2 references (PowerPC)               IBM RS/6000 and PowerPC 
  13574.                                                    Options 
  13575.  '                                                 Incompatibilities of GNU CC 
  13576.  -lgcc, use with -nodefaultlibs                    Options for Linking 
  13577.  -lgcc, use with -nostdlib                         Options for Linking 
  13578.  -nodefaultlibs and unresolved references          Options for Linking 
  13579.  -nostdlib and unresolved references               Options for Linking 
  13580.  //                                                C++ Style Comments 
  13581.  ?: extensions                                     Generalized Lvalues 
  13582.                                                    Conditionals with Omitted 
  13583.                                                    Operands 
  13584.  ?: side effect                                    Conditionals with Omitted 
  13585.                                                    Operands 
  13586.  address constraints                               Simple Constraints 
  13587.  address of a label                                Labels as Values 
  13588.  alias attribute                                   Declaring Attributes of 
  13589.                                                    Functions 
  13590.  aligned attribute                                 Specifying Attributes of 
  13591.                                                    Variables 
  13592.                                                    Specifying Attributes of 
  13593.                                                    Types 
  13594.  alignment                                         Inquiring on Alignment of 
  13595.                                                    Types or Variables 
  13596.  Alliant                                           Interoperation 
  13597.  alloca and SunOS                                  Installing GNU CC 
  13598.  alloca vs variable-length arrays                  Arrays of Variable Length 
  13599.  alloca, for SunOS                                 Installing GNU CC on the Sun 
  13600.  alloca, for Unos                                  Configurations Supported by 
  13601.                                                    GNU CC 
  13602.  alternate keywords                                Alternate Keywords 
  13603.  AMD29K options                                    AMD29K Options 
  13604.  analysis, data flow                               Other VMS Issues 
  13605.  ANSI support                                      Options Controlling C 
  13606.                                                    Dialect 
  13607.  apostrophes                                       Incompatibilities of GNU CC 
  13608.  arguments in frame (88k)                          M88K Options 
  13609.  arithmetic simplifications                        Other VMS Issues 
  13610.  ARM options                                       ARM Options 
  13611.  arrays of length zero                             Arrays of Length Zero 
  13612.  arrays of variable length                         Arrays of Variable Length 
  13613.  arrays, non-lvalue                                Non-Lvalue Arrays May Have 
  13614.                                                    Subscripts 
  13615.  asm constraints                                   Constraints for asm Operands 
  13616.  asm expressions                                   Assembler Instructions with 
  13617.                                                    C Expression Operands 
  13618.  assembler instructions                            Assembler Instructions with 
  13619.                                                    C Expression Operands 
  13620.  assembler names for identifiers                   Controlling Names Used in 
  13621.                                                    Assembler Code 
  13622.  assembler syntax, 88k                             M88K Options 
  13623.  assembly code, invalid                            Have You Found a Bug? 
  13624.  attribute of types                                Specifying Attributes of 
  13625.                                                    Types 
  13626.  attribute of variables                            Specifying Attributes of 
  13627.                                                    Variables 
  13628.  autoincrement/decrement addressing                Simple Constraints 
  13629.  autoincrement/decrement analysis                  Other VMS Issues 
  13630.  automatic inline for C++ member fns               An Inline Function is As 
  13631.                                                    Fast As a Macro 
  13632.  backtrace for bug reports                         How to Report Bugs 
  13633.  basic blocks                                      Other VMS Issues 
  13634.  Bison parser generator                            Installing GNU CC 
  13635.  bit shift overflow (88k)                          M88K Options 
  13636.  bug criteria                                      Have You Found a Bug? 
  13637.  bug report mailing lists                          Where to Report Bugs 
  13638.  bugs                                              Reporting Bugs 
  13639.  bugs, known                                       Known Causes of Trouble with 
  13640.                                                    GNU CC 
  13641.  builtin functions                                 Options Controlling C 
  13642.                                                    Dialect 
  13643.  byte writes (29k)                                 AMD29K Options 
  13644.  C compilation options                             GNU CC Command Options 
  13645.  C intermediate output, nonexistent                Compile C, C++, or Objective 
  13646.                                                    C 
  13647.  C language extensions                             Extensions to the C Language 
  13648.                                                    Family 
  13649.  C language, traditional                           Options Controlling C 
  13650.                                                    Dialect 
  13651.  C++                                               Compile C, C++, or Objective 
  13652.                                                    C 
  13653.  C++ comments                                      C++ Style Comments 
  13654.  C++ compilation options                           GNU CC Command Options 
  13655.  C++ interface and implementation headers          Declarations and Definitions 
  13656.                                                    in One Header 
  13657.  C++ language extensions                           Extensions to the C++ 
  13658.                                                    Language 
  13659.  C++ member fns, automatically inline              An Inline Function is As 
  13660.                                                    Fast As a Macro 
  13661.  C++ misunderstandings                             Common Misunderstandings 
  13662.                                                    with GNU C++ 
  13663.  C++ named return value                            Named Return Values in C++ 
  13664.  C++ options, command line                         Options Controlling C++ 
  13665.                                                    Dialect 
  13666.  C++ pragmas, effect on inlining                   Declarations and Definitions 
  13667.                                                    in One Header 
  13668.  C++ runtime library                               Installing GNU CC 
  13669.  C++ signatures                                    Type Abstraction using 
  13670.                                                    Signatures 
  13671.  C++ source file suffixes                          Compiling C++ Programs 
  13672.  C++ static data, declaring and defining           Declare and Define Static 
  13673.                                                    Members 
  13674.  C++ subtype polymorphism                          Type Abstraction using 
  13675.                                                    Signatures 
  13676.  C++ type abstraction                              Type Abstraction using 
  13677.                                                    Signatures 
  13678.  calling functions through the function vector on the H8/300 processors 
  13679.                                                    Declaring Attributes of 
  13680.                                                    Functions 
  13681.  case labels in initializers                       Labeled Elements in 
  13682.                                                    Initializers 
  13683.  case ranges                                       Case Ranges 
  13684.  case sensitivity and VMS                          Other VMS Issues 
  13685.  cast to a union                                   Cast to a Union Type 
  13686.  casts as lvalues                                  Generalized Lvalues 
  13687.  code generation conventions                       Options for Code Generation 
  13688.                                                    Conventions 
  13689.  code motion                                       Other VMS Issues 
  13690.  command options                                   GNU CC Command Options 
  13691.  comments, C++ style                               C++ Style Comments 
  13692.  common subexpression elimination                  Other VMS Issues 
  13693.  comparison of signed and unsigned values, warning Options to Request or 
  13694.                                                    Suppress Warnings 
  13695.  compilation in a separate directory               Compilation in a Separate 
  13696.                                                    Directory 
  13697.  compiler bugs, reporting                          How to Report Bugs 
  13698.  compiler compared to C++ preprocessor             Compile C, C++, or Objective 
  13699.                                                    C 
  13700.  compiler options, C++                             Options Controlling C++ 
  13701.                                                    Dialect 
  13702.  compiler version, specifying                      Specifying Target Machine 
  13703.                                                    and Compiler Version 
  13704.  complex numbers                                   Complex Numbers 
  13705.  compound expressions as lvalues                   Generalized Lvalues 
  13706.  computed gotos                                    Labels as Values 
  13707.  conditional expressions as lvalues                Generalized Lvalues 
  13708.  conditional expressions, extensions               Conditionals with Omitted 
  13709.                                                    Operands 
  13710.  configurations supported by GNU CC                Configurations Supported by 
  13711.                                                    GNU CC 
  13712.  conflicting types                                 Disappointments and 
  13713.                                                    Misunderstandings 
  13714.  const applied to function                         Declaring Attributes of 
  13715.                                                    Functions 
  13716.  const function attribute                          Declaring Attributes of 
  13717.                                                    Functions 
  13718.  constant folding                                  Other VMS Issues 
  13719.  constant propagation                              Other VMS Issues 
  13720.  constants in constraints                          Simple Constraints 
  13721.  constraint modifier characters                    Constraint Modifier 
  13722.                                                    Characters 
  13723.  constraint, matching                              Simple Constraints 
  13724.  constraints, asm                                  Constraints for asm Operands 
  13725.  constraints, machine specific                     Constraints for Particular 
  13726.                                                    Machines 
  13727.  constructing calls                                Constructing Function Calls 
  13728.  constructor expressions                           Constructor Expressions 
  13729.  constructor function attribute                    Declaring Attributes of 
  13730.                                                    Functions 
  13731.  constructors vs goto                              goto and Destructors in GNU 
  13732.                                                    C++ 
  13733.  constructors, automatic calls                     collect2 
  13734.  Convex options                                    Convex Options 
  13735.  core dump                                         Have You Found a Bug? 
  13736.  cross compiling                                   Specifying Target Machine 
  13737.                                                    and Compiler Version 
  13738.  cross-compiler, installation                      Building and Installing a 
  13739.                                                    Cross-Compiler 
  13740.  cross-jumping                                     Other VMS Issues 
  13741.  data flow analysis                                Other VMS Issues 
  13742.  DBX                                               Interoperation 
  13743.  dead code                                         Other VMS Issues 
  13744.  deallocating variable length arrays               Arrays of Variable Length 
  13745.  debugging information generation                  Other VMS Issues 
  13746.  debugging information options                     Options for Debugging Your 
  13747.                                                    Program or GNU CC 
  13748.  debugging, 88k OCS                                M88K Options 
  13749.  declaration scope                                 Incompatibilities of GNU CC 
  13750.  declarations inside expressions                   Statements and Declarations 
  13751.                                                    in Expressions 
  13752.  declaring attributes of functions                 Declaring Attributes of 
  13753.                                                    Functions 
  13754.  declaring static data in C++                      Declare and Define Static 
  13755.                                                    Members 
  13756.  default implementation, signature member function Type Abstraction using 
  13757.                                                    Signatures 
  13758.  defining static data in C++                       Declare and Define Static 
  13759.                                                    Members 
  13760.  delayed branch scheduling                         Other VMS Issues 
  13761.  dependencies for make as output                   Environment Variables 
  13762.                                                    Affecting GNU CC 
  13763.  dependencies, make                                Options Controlling the 
  13764.                                                    Preprocessor 
  13765.  destructor function attribute                     Declaring Attributes of 
  13766.                                                    Functions 
  13767.  destructors vs goto                               goto and Destructors in GNU 
  13768.                                                    C++ 
  13769.  detecting '-traditional'                          Options Controlling C 
  13770.                                                    Dialect 
  13771.  dialect options                                   Options Controlling C 
  13772.                                                    Dialect 
  13773.  digits in constraint                              Simple Constraints 
  13774.  directory options                                 Options for Directory Search 
  13775.  divide instruction, 88k                           M88K Options 
  13776.  dollar signs in identifier names                  Dollar Signs in Identifier 
  13777.                                                    Names 
  13778.  double-word arithmetic                            Double-Word Integers 
  13779.  downward funargs                                  Nested Functions 
  13780.  DW bit (29k)                                      AMD29K Options 
  13781.  earlyclobber operand                              Constraint Modifier 
  13782.                                                    Characters 
  13783.  eight bit data on the H8/300 and H8/300H          Declaring Attributes of 
  13784.                                                    Functions 
  13785.  environment variables                             Environment Variables 
  13786.                                                    Affecting GNU CC 
  13787.  error messages                                    Warning Messages and Error 
  13788.                                                    Messages 
  13789.  escape sequences, traditional                     Options Controlling C 
  13790.                                                    Dialect 
  13791.  exclamation point                                 Multiple Alternative 
  13792.                                                    Constraints 
  13793.  exit status and VMS                               Other VMS Issues 
  13794.  explicit register variables                       Variables in Specified 
  13795.                                                    Registers 
  13796.  expressions containing statements                 Statements and Declarations 
  13797.                                                    in Expressions 
  13798.  expressions, compound, as lvalues                 Generalized Lvalues 
  13799.  expressions, conditional, as lvalues              Generalized Lvalues 
  13800.  expressions, constructor                          Constructor Expressions 
  13801.  extended asm                                      Assembler Instructions with 
  13802.                                                    C Expression Operands 
  13803.  extensible constraints                            Simple Constraints 
  13804.  extensions, ?:                                    Generalized Lvalues 
  13805.                                                    Conditionals with Omitted 
  13806.                                                    Operands 
  13807.  extensions, C language                            Extensions to the C Language 
  13808.                                                    Family 
  13809.  extensions, C++ language                          Extensions to the C++ 
  13810.                                                    Language 
  13811.  external declaration scope                        Incompatibilities of GNU CC 
  13812.  fatal signal                                      Have You Found a Bug? 
  13813.  file name suffix                                  Options Controlling the Kind 
  13814.                                                    of Output 
  13815.  file names                                        Options for Linking 
  13816.  final pass                                        Other VMS Issues 
  13817.  float as function value type                      Incompatibilities of GNU CC 
  13818.  floating point precision                          Options That Control 
  13819.                                                    Optimization 
  13820.                                                    Disappointments and 
  13821.                                                    Misunderstandings 
  13822.  format function attribute                         Declaring Attributes of 
  13823.                                                    Functions 
  13824.  format_arg function attribute                     Declaring Attributes of 
  13825.                                                    Functions 
  13826.  forwarding calls                                  Constructing Function Calls 
  13827.  fscanf, and constant strings                      Incompatibilities of GNU CC 
  13828.  function addressability on the M32R/D             Declaring Attributes of 
  13829.                                                    Functions 
  13830.  function attributes                               Declaring Attributes of 
  13831.                                                    Functions 
  13832.  function pointers, arithmetic                     Arithmetic on void- and 
  13833.                                                    Function-Pointers 
  13834.  function prototype declarations                   Prototypes and Old-Style 
  13835.                                                    Function Definitions 
  13836.  function, size of pointer to                      Arithmetic on void- and 
  13837.                                                    Function-Pointers 
  13838.  functions called via pointer on the RS/6000 and PowerPC M32R/D Options 
  13839.                                                    Declaring Attributes of 
  13840.                                                    Functions 
  13841.                                                    Declaring Attributes of 
  13842.                                                    Functions 
  13843.  functions in arbitrary sections                   Declaring Attributes of 
  13844.                                                    Functions 
  13845.  functions that are passed arguments in registers on the 386 Declaring 
  13846.                                                    Attributes of Functions 
  13847.                                                    Declaring Attributes of 
  13848.                                                    Functions 
  13849.  functions that do not pop the argument stack on the 386 Declaring Attributes 
  13850.                                                    of Functions 
  13851.  functions that do pop the argument stack on the 386 Declaring Attributes of 
  13852.                                                    Functions 
  13853.  functions that have no side effects               Declaring Attributes of 
  13854.                                                    Functions 
  13855.  functions that never return                       Declaring Attributes of 
  13856.                                                    Functions 
  13857.  functions that pop the argument stack on the 386  Declaring Attributes of 
  13858.                                                    Functions 
  13859.                                                    Declaring Attributes of 
  13860.                                                    Functions 
  13861.  functions which are exported from a dll on PowerPC Windows NT Declaring 
  13862.                                                    Attributes of Functions 
  13863.  functions which are imported from a dll on PowerPC Windows NT Declaring 
  13864.                                                    Attributes of Functions 
  13865.  functions which specify exception handling on PowerPC Windows NT Declaring 
  13866.                                                    Attributes of Functions 
  13867.  functions with printf or scanf style arguments    Declaring Attributes of 
  13868.                                                    Functions 
  13869.  G++                                               Compile C, C++, or Objective 
  13870.                                                    C 
  13871.  g++ 1.xx                                          Compiling C++ Programs 
  13872.  g++ older version                                 Compiling C++ Programs 
  13873.  g++, separate compiler                            Compiling C++ Programs 
  13874.  GCC                                               Compile C, C++, or Objective 
  13875.                                                    C 
  13876.  generalized lvalues                               Generalized Lvalues 
  13877.  genflags, crash on Sun 4                          Installation Problems 
  13878.  global offset table                               Options for Code Generation 
  13879.                                                    Conventions 
  13880.  global register after longjmp                     Defining Global Register 
  13881.                                                    Variables 
  13882.  global register allocation                        Other VMS Issues 
  13883.  global register variables                         Defining Global Register 
  13884.                                                    Variables 
  13885.  GNU CC command options                            GNU CC Command Options 
  13886.  goto in C++                                       goto and Destructors in GNU 
  13887.                                                    C++ 
  13888.  goto with computed label                          Labels as Values 
  13889.  gp-relative references (MIPS)                     MIPS Options 
  13890.  gprof                                             Options for Debugging Your 
  13891.                                                    Program or GNU CC 
  13892.  grouping options                                  GNU CC Command Options 
  13893.  hardware models and configurations, specifying    Hardware Models and 
  13894.                                                    Configurations 
  13895.  header files and VMS                              Include Files and VMS 
  13896.  hosted environment                                Options Controlling C 
  13897.                                                    Dialect 
  13898.                                                    Options Controlling C 
  13899.                                                    Dialect 
  13900.  HPPA Options                                      HPPA Options 
  13901.  i386 Options                                      Intel 386 Options 
  13902.  IBM RS/6000 and PowerPC Options                   IBM RS/6000 and PowerPC 
  13903.                                                    Options 
  13904.  IBM RT options                                    IBM RT Options 
  13905.  IBM RT PC                                         Interoperation 
  13906.  identifier names, dollar signs in                 Dollar Signs in Identifier 
  13907.                                                    Names 
  13908.  identifiers, names in assembler code              Controlling Names Used in 
  13909.                                                    Assembler Code 
  13910.  identifying source, compiler (88k)                M88K Options 
  13911.  implicit argument: return value                   Named Return Values in C++ 
  13912.  implied #pragma implementation                    Declarations and Definitions 
  13913.                                                    in One Header 
  13914.  include files and VMS                             Include Files and VMS 
  13915.  incompatibilities of GNU CC                       Incompatibilities of GNU CC 
  13916.  increment operators                               Have You Found a Bug? 
  13917.  initializations in expressions                    Constructor Expressions 
  13918.  initializers with labeled elements                Labeled Elements in 
  13919.                                                    Initializers 
  13920.  initializers, non-constant                        Non-Constant Initializers 
  13921.  inline automatic for C++ member fns               An Inline Function is As 
  13922.                                                    Fast As a Macro 
  13923.  inline functions                                  An Inline Function is As 
  13924.                                                    Fast As a Macro 
  13925.  inline functions, omission of                     An Inline Function is As 
  13926.                                                    Fast As a Macro 
  13927.  inline, automatic                                 Other VMS Issues 
  13928.  inlining and C++ pragmas                          Declarations and Definitions 
  13929.                                                    in One Header 
  13930.  installation trouble                              Known Causes of Trouble with 
  13931.                                                    GNU CC 
  13932.  installing GNU CC                                 Installing GNU CC 
  13933.  installing GNU CC on the Sun                      Installing GNU CC on the Sun 
  13934.  installing GNU CC on VMS                          Installing GNU CC on VMS 
  13935.  instruction combination                           Other VMS Issues 
  13936.  instruction recognizer                            Other VMS Issues 
  13937.  instruction scheduling                            Other VMS Issues 
  13938.                                                    Other VMS Issues 
  13939.  integrating function code                         An Inline Function is As 
  13940.                                                    Fast As a Macro 
  13941.  Intel 386 Options                                 Intel 386 Options 
  13942.  interface and implementation headers, C++         Declarations and Definitions 
  13943.                                                    in One Header 
  13944.  intermediate C version, nonexistent               Compile C, C++, or Objective 
  13945.                                                    C 
  13946.  interrupt handler functions on the H8/300 processors Declaring Attributes of 
  13947.                                                    Functions 
  13948.  interrupt handlers on the M32R/D                  Declaring Attributes of 
  13949.                                                    Functions 
  13950.  introduction                                      Introduction 
  13951.  invalid assembly code                             Have You Found a Bug? 
  13952.  invalid input                                     Have You Found a Bug? 
  13953.  invoking g++                                      Compiling C++ Programs 
  13954.  jump optimization                                 Other VMS Issues 
  13955.  jump threading                                    Other VMS Issues 
  13956.  kernel and user registers (29k)                   AMD29K Options 
  13957.  keywords, alternate                               Alternate Keywords 
  13958.  known causes of trouble                           Known Causes of Trouble with 
  13959.                                                    GNU CC 
  13960.  labeled elements in initializers                  Labeled Elements in 
  13961.                                                    Initializers 
  13962.  labels as values                                  Labels as Values 
  13963.  language dialect options                          Options Controlling C 
  13964.                                                    Dialect 
  13965.  large bit shifts (88k)                            M88K Options 
  13966.  length-zero arrays                                Arrays of Length Zero 
  13967.  Libraries                                         Options for Linking 
  13968.  libstdc++                                         Installing GNU CC 
  13969.  link options                                      Options for Linking 
  13970.  load address instruction                          Simple Constraints 
  13971.  local labels                                      Locally Declared Labels 
  13972.  local register allocation                         Other VMS Issues 
  13973.  local variables in macros                         Naming an Expression's Type 
  13974.  local variables, specifying registers             Specifying Registers for 
  13975.                                                    Local Variables 
  13976.  long long data types                              Double-Word Integers 
  13977.  longjmp and automatic variables                   Options Controlling C 
  13978.                                                    Dialect 
  13979.  longjmp incompatibilities                         Incompatibilities of GNU CC 
  13980.  longjmp warnings                                  Options to Request or 
  13981.                                                    Suppress Warnings 
  13982.  loop optimization                                 Other VMS Issues 
  13983.  lvalues, generalized                              Generalized Lvalues 
  13984.  M32R/D options                                    M32R/D Options 
  13985.  M680x0 options                                    M680x0 Options 
  13986.  M88k options                                      M88K Options 
  13987.  machine dependent options                         Hardware Models and 
  13988.                                                    Configurations 
  13989.  machine specific constraints                      Constraints for Particular 
  13990.                                                    Machines 
  13991.  macro with variable arguments                     Macros with Variable Numbers 
  13992.                                                    of Arguments 
  13993.  macros containing asm                             Assembler Instructions with 
  13994.                                                    C Expression Operands 
  13995.  macros, inline alternative                        An Inline Function is As 
  13996.                                                    Fast As a Macro 
  13997.  macros, local labels                              Locally Declared Labels 
  13998.  macros, local variables in                        Naming an Expression's Type 
  13999.  macros, statements in expressions                 Statements and Declarations 
  14000.                                                    in Expressions 
  14001.  macros, types of arguments                        Referring to a Type with 
  14002.                                                    typeof 
  14003.  main and the exit status                          Other VMS Issues 
  14004.  make                                              Options Controlling the 
  14005.                                                    Preprocessor 
  14006.  matching constraint                               Simple Constraints 
  14007.  maximum operator                                  Minimum and Maximum 
  14008.                                                    Operators in C++ 
  14009.  member fns, automatically inline                  An Inline Function is As 
  14010.                                                    Fast As a Macro 
  14011.  memory model (29k)                                AMD29K Options 
  14012.  memory references in constraints                  Simple Constraints 
  14013.  messages, warning                                 Options to Request or 
  14014.                                                    Suppress Warnings 
  14015.  messages, warning and error                       Warning Messages and Error 
  14016.                                                    Messages 
  14017.  middle-operands, omitted                          Conditionals with Omitted 
  14018.                                                    Operands 
  14019.  minimum operator                                  Minimum and Maximum 
  14020.                                                    Operators in C++ 
  14021.  MIPS options                                      MIPS Options 
  14022.  misunderstandings in C++                          Common Misunderstandings 
  14023.                                                    with GNU C++ 
  14024.  mktemp, and constant strings                      Incompatibilities of GNU CC 
  14025.  MN10300 options                                   MN10300 Options 
  14026.  mode attribute                                    Specifying Attributes of 
  14027.                                                    Variables 
  14028.  modifiers in constraints                          Constraint Modifier 
  14029.                                                    Characters 
  14030.  multiple alternative constraints                  Multiple Alternative 
  14031.                                                    Constraints 
  14032.  multiprecision arithmetic                         Double-Word Integers 
  14033.  name augmentation                                 Other VMS Issues 
  14034.  named return value in C++                         Named Return Values in C++ 
  14035.  names used in assembler code                      Controlling Names Used in 
  14036.                                                    Assembler Code 
  14037.  naming convention, implementation headers         Declarations and Definitions 
  14038.                                                    in One Header 
  14039.  naming types                                      Naming an Expression's Type 
  14040.  nested functions                                  Nested Functions 
  14041.  newline vs string constants                       Options Controlling C 
  14042.                                                    Dialect 
  14043.  no-op move instructions                           Other VMS Issues 
  14044.  nocommon attribute                                Specifying Attributes of 
  14045.                                                    Variables 
  14046.  non-constant initializers                         Non-Constant Initializers 
  14047.  non-static inline function                        An Inline Function is As 
  14048.                                                    Fast As a Macro 
  14049.  noreturn function attribute                       Declaring Attributes of 
  14050.                                                    Functions 
  14051.  Objective C                                       Compile C, C++, or Objective 
  14052.                                                    C 
  14053.  Objective C threads                               Installing GNU CC 
  14054.  OCS (88k)                                         M88K Options 
  14055.  offsettable address                               Simple Constraints 
  14056.  old-style function definitions                    Prototypes and Old-Style 
  14057.                                                    Function Definitions 
  14058.  omitted middle-operands                           Conditionals with Omitted 
  14059.                                                    Operands 
  14060.  open coding                                       An Inline Function is As 
  14061.                                                    Fast As a Macro 
  14062.  operand constraints, asm                          Constraints for asm Operands 
  14063.  optimize options                                  Options That Control 
  14064.                                                    Optimization 
  14065.  options to control warnings                       Options to Request or 
  14066.                                                    Suppress Warnings 
  14067.  options, C++                                      Options Controlling C++ 
  14068.                                                    Dialect 
  14069.  options, code generation                          Options for Code Generation 
  14070.                                                    Conventions 
  14071.  options, debugging                                Options for Debugging Your 
  14072.                                                    Program or GNU CC 
  14073.  options, dialect                                  Options Controlling C 
  14074.                                                    Dialect 
  14075.  options, directory search                         Options for Directory Search 
  14076.  options, GNU CC command                           GNU CC Command Options 
  14077.  options, grouping                                 GNU CC Command Options 
  14078.  options, linking                                  Options for Linking 
  14079.  options, optimization                             Options That Control 
  14080.                                                    Optimization 
  14081.  options, order                                    GNU CC Command Options 
  14082.  options, preprocessor                             Options Controlling the 
  14083.                                                    Preprocessor 
  14084.  order of evaluation, side effects                 Certain Changes We Don't 
  14085.                                                    Want to Make 
  14086.  order of options                                  GNU CC Command Options 
  14087.  other directory, compilation in                   Compilation in a Separate 
  14088.                                                    Directory 
  14089.  output file option                                Options Controlling the Kind 
  14090.                                                    of Output 
  14091.  overloaded virtual fn, warning                    Options to Request or 
  14092.                                                    Suppress Warnings 
  14093.  packed attribute                                  Specifying Attributes of 
  14094.                                                    Variables 
  14095.  parameter forward declaration                     Arrays of Variable Length 
  14096.  parser generator, Bison                           Installing GNU CC 
  14097.  peephole optimization                             Other VMS Issues 
  14098.  PIC                                               Options for Code Generation 
  14099.                                                    Conventions 
  14100.  pointer arguments                                 Declaring Attributes of 
  14101.                                                    Functions 
  14102.  portions of temporary objects, pointers to        Temporaries May Vanish 
  14103.                                                    Before You Expect 
  14104.  pragma, reason for not using                      Declaring Attributes of 
  14105.                                                    Functions 
  14106.  pragmas in C++, effect on inlining                Declarations and Definitions 
  14107.                                                    in One Header 
  14108.  pragmas, interface and implementation             Declarations and Definitions 
  14109.                                                    in One Header 
  14110.  preprocessing numbers                             Incompatibilities of GNU CC 
  14111.  preprocessing tokens                              Incompatibilities of GNU CC 
  14112.  preprocessor options                              Options Controlling the 
  14113.                                                    Preprocessor 
  14114.  processor selection (29k)                         AMD29K Options 
  14115.  prof                                              Options for Debugging Your 
  14116.                                                    Program or GNU CC 
  14117.  promotion of formal parameters                    Prototypes and Old-Style 
  14118.                                                    Function Definitions 
  14119.  push address instruction                          Simple Constraints 
  14120.  qsort, and global register variables              Defining Global Register 
  14121.                                                    Variables 
  14122.  question mark                                     Multiple Alternative 
  14123.                                                    Constraints 
  14124.  r0-relative references (88k)                      M88K Options 
  14125.  ranges in case statements                         Case Ranges 
  14126.  read-only strings                                 Incompatibilities of GNU CC 
  14127.  register allocation                               Other VMS Issues 
  14128.  register allocation, stupid                       Other VMS Issues 
  14129.  register class preference pass                    Other VMS Issues 
  14130.  register positions in frame (88k)                 M88K Options 
  14131.                                                    M88K Options 
  14132.  register use analysis                             Other VMS Issues 
  14133.  register variable after longjmp                   Defining Global Register 
  14134.                                                    Variables 
  14135.  register-to-stack conversion                      Other VMS Issues 
  14136.  registers                                         Assembler Instructions with 
  14137.                                                    C Expression Operands 
  14138.  registers for local variables                     Specifying Registers for 
  14139.                                                    Local Variables 
  14140.  registers in constraints                          Simple Constraints 
  14141.  registers, global allocation                      Variables in Specified 
  14142.                                                    Registers 
  14143.  registers, global variables in                    Defining Global Register 
  14144.                                                    Variables 
  14145.  reloading                                         Other VMS Issues 
  14146.  reordering, warning                               Options to Request or 
  14147.                                                    Suppress Warnings 
  14148.  reporting bugs                                    Reporting Bugs 
  14149.  rest argument (in macro)                          Macros with Variable Numbers 
  14150.                                                    of Arguments 
  14151.  return value of main                              Other VMS Issues 
  14152.  return value, named, in C++                       Named Return Values in C++ 
  14153.  return, in C++ function header                    Named Return Values in C++ 
  14154.  RS/6000 and PowerPC Options                       IBM RS/6000 and PowerPC 
  14155.                                                    Options 
  14156.  RT options                                        IBM RT Options 
  14157.  RT PC                                             Interoperation 
  14158.  RTL generation                                    Other VMS Issues 
  14159.  run-time options                                  Options for Code Generation 
  14160.                                                    Conventions 
  14161.  scanf, and constant strings                       Incompatibilities of GNU CC 
  14162.  scheduling, delayed branch                        Other VMS Issues 
  14163.  scheduling, instruction                           Other VMS Issues 
  14164.                                                    Other VMS Issues 
  14165.  scope of a variable length array                  Arrays of Variable Length 
  14166.  scope of declaration                              Disappointments and 
  14167.                                                    Misunderstandings 
  14168.  scope of external declarations                    Incompatibilities of GNU CC 
  14169.  search path                                       Options for Directory Search 
  14170.  second include path                               Options Controlling the 
  14171.                                                    Preprocessor 
  14172.  section function attribute                        Declaring Attributes of 
  14173.                                                    Functions 
  14174.  section variable attribute                        Specifying Attributes of 
  14175.                                                    Variables 
  14176.  separate directory, compilation in                Compilation in a Separate 
  14177.                                                    Directory 
  14178.  sequential consistency on 88k                     M88K Options 
  14179.  setjmp incompatibilities                          Incompatibilities of GNU CC 
  14180.  shared strings                                    Incompatibilities of GNU CC 
  14181.  shared VMS run time system                        Other VMS Issues 
  14182.  side effect in ?:                                 Conditionals with Omitted 
  14183.                                                    Operands 
  14184.  side effects, macro argument                      Statements and Declarations 
  14185.                                                    in Expressions 
  14186.  side effects, order of evaluation                 Certain Changes We Don't 
  14187.                                                    Want to Make 
  14188.  signature in C++, advantages                      Type Abstraction using 
  14189.                                                    Signatures 
  14190.  signature member function default implementation  Type Abstraction using 
  14191.                                                    Signatures 
  14192.  signatures, C++                                   Type Abstraction using 
  14193.                                                    Signatures 
  14194.  signed and unsigned values, comparison warning    Options to Request or 
  14195.                                                    Suppress Warnings 
  14196.  simple constraints                                Simple Constraints 
  14197.  simplifications, arithmetic                       Other VMS Issues 
  14198.  smaller data references                           M32R/D Options 
  14199.  smaller data references (88k)                     M88K Options 
  14200.  smaller data references (MIPS)                    MIPS Options 
  14201.  smaller data references (PowerPC)                 IBM RS/6000 and PowerPC 
  14202.                                                    Options 
  14203.  SPARC options                                     SPARC Options 
  14204.  specified registers                               Variables in Specified 
  14205.                                                    Registers 
  14206.  specifying compiler version and target machine    Specifying Target Machine 
  14207.                                                    and Compiler Version 
  14208.  specifying hardware config                        Hardware Models and 
  14209.                                                    Configurations 
  14210.  specifying machine version                        Specifying Target Machine 
  14211.                                                    and Compiler Version 
  14212.  specifying registers for local variables          Specifying Registers for 
  14213.                                                    Local Variables 
  14214.  sscanf, and constant strings                      Incompatibilities of GNU CC 
  14215.  stack checks (29k)                                AMD29K Options 
  14216.  stage1                                            Installing GNU CC 
  14217.  start files                                       Tools and Libraries for a 
  14218.                                                    Cross-Compiler 
  14219.  statements inside expressions                     Statements and Declarations 
  14220.                                                    in Expressions 
  14221.  static data in C++, declaring and defining        Declare and Define Static 
  14222.                                                    Members 
  14223.  storem bug (29k)                                  AMD29K Options 
  14224.  strength-reduction                                Other VMS Issues 
  14225.  string constants                                  Incompatibilities of GNU CC 
  14226.  string constants vs newline                       Options Controlling C 
  14227.                                                    Dialect 
  14228.  structure passing (88k)                           M88K Options 
  14229.  structures                                        Incompatibilities of GNU CC 
  14230.  structures, constructor expression                Constructor Expressions 
  14231.  stupid register allocation                        Other VMS Issues 
  14232.  submodel options                                  Hardware Models and 
  14233.                                                    Configurations 
  14234.  subscripting                                      Non-Lvalue Arrays May Have 
  14235.                                                    Subscripts 
  14236.  subscripting and function values                  Non-Lvalue Arrays May Have 
  14237.                                                    Subscripts 
  14238.  subtype polymorphism, C++                         Type Abstraction using 
  14239.                                                    Signatures 
  14240.  suffixes for C++ source                           Compiling C++ Programs 
  14241.  Sun installation                                  Installing GNU CC on the Sun 
  14242.  suppressing warnings                              Options to Request or 
  14243.                                                    Suppress Warnings 
  14244.  surprises in C++                                  Common Misunderstandings 
  14245.                                                    with GNU C++ 
  14246.  SVr4                                              M88K Options 
  14247.  syntax checking                                   Options to Request or 
  14248.                                                    Suppress Warnings 
  14249.  synthesized methods, warning                      Options to Request or 
  14250.                                                    Suppress Warnings 
  14251.  tail recursion optimization                       Other VMS Issues 
  14252.  target machine, specifying                        Specifying Target Machine 
  14253.                                                    and Compiler Version 
  14254.  target options                                    Specifying Target Machine 
  14255.                                                    and Compiler Version 
  14256.  target-parameter-dependent code                   Other VMS Issues 
  14257.  tcov                                              Options for Debugging Your 
  14258.                                                    Program or GNU CC 
  14259.  template debugging                                Options to Request or 
  14260.                                                    Suppress Warnings 
  14261.  template instantiation                            Where's the Template? 
  14262.  temporaries, lifetime of                          Temporaries May Vanish 
  14263.                                                    Before You Expect 
  14264.  threads, Objective C                              Installing GNU CC 
  14265.  thunks                                            Nested Functions 
  14266.  tiny data section on the H8/300H                  Declaring Attributes of 
  14267.                                                    Functions 
  14268.  traditional C language                            Options Controlling C 
  14269.                                                    Dialect 
  14270.  type abstraction, C++                             Type Abstraction using 
  14271.                                                    Signatures 
  14272.  type alignment                                    Inquiring on Alignment of 
  14273.                                                    Types or Variables 
  14274.  type attributes                                   Specifying Attributes of 
  14275.                                                    Types 
  14276.  typedef names as function parameters              Incompatibilities of GNU CC 
  14277.  Ultrix calling convention                         Interoperation 
  14278.  undefined behavior                                Have You Found a Bug? 
  14279.  undefined function value                          Have You Found a Bug? 
  14280.  underscores in variables in macros                Naming an Expression's Type 
  14281.  underscores, avoiding (88k)                       M88K Options 
  14282.  union, casting to a                               Cast to a Union Type 
  14283.  unions                                            Incompatibilities of GNU CC 
  14284.  unreachable code                                  Other VMS Issues 
  14285.  unresolved references and -nodefaultlibs          Options for Linking 
  14286.  unresolved references and -nostdlib               Options for Linking 
  14287.  V850 Options                                      V850 Options 
  14288.  value after longjmp                               Defining Global Register 
  14289.                                                    Variables 
  14290.  variable addressability on the M32R/D             Specifying Attributes of 
  14291.                                                    Variables 
  14292.  variable alignment                                Inquiring on Alignment of 
  14293.                                                    Types or Variables 
  14294.  variable attributes                               Specifying Attributes of 
  14295.                                                    Variables 
  14296.  variable number of arguments                      Macros with Variable Numbers 
  14297.                                                    of Arguments 
  14298.  variable-length array scope                       Arrays of Variable Length 
  14299.  variable-length arrays                            Arrays of Variable Length 
  14300.  variables in specified registers                  Variables in Specified 
  14301.                                                    Registers 
  14302.  variables, local, in macros                       Naming an Expression's Type 
  14303.  Vax calling convention                            Interoperation 
  14304.  VAX options                                       VAX Options 
  14305.  VMS and case sensitivity                          Other VMS Issues 
  14306.  VMS and include files                             Include Files and VMS 
  14307.  VMS installation                                  Installing GNU CC on VMS 
  14308.  void pointers, arithmetic                         Arithmetic on void- and 
  14309.                                                    Function-Pointers 
  14310.  void, size of pointer to                          Arithmetic on void- and 
  14311.                                                    Function-Pointers 
  14312.  volatile applied to function                      Declaring Attributes of 
  14313.                                                    Functions 
  14314.  warning for comparison of signed and unsigned values Options to Request or 
  14315.                                                    Suppress Warnings 
  14316.  warning for overloaded virtual fn                 Options to Request or 
  14317.                                                    Suppress Warnings 
  14318.  warning for reordering of member initializers     Options to Request or 
  14319.                                                    Suppress Warnings 
  14320.  warning for synthesized methods                   Options to Request or 
  14321.                                                    Suppress Warnings 
  14322.  warning messages                                  Options to Request or 
  14323.                                                    Suppress Warnings 
  14324.  warnings vs errors                                Warning Messages and Error 
  14325.                                                    Messages 
  14326.  weak attribute                                    Declaring Attributes of 
  14327.                                                    Functions 
  14328.  whitespace                                        Incompatibilities of GNU CC 
  14329.  zero division on 88k                              M88K Options 
  14330.  zero-length arrays                                Arrays of Length Zero 
  14331.  
  14332.  
  14333. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  14334.  
  14335. Prior to release 2 of the compiler, there was a separate g++ compiler.  That 
  14336. version was based on GNU CC, but not integrated with it.  Versions of g++ with 
  14337. a '1.xx' version number---for example, g++ version 1.37 or 1.42---are much less 
  14338. reliable than the versions integrated with GCC 2.  Moreover, combining G++ 
  14339. '1.xx' with a version 2 GCC will simply not work.
  14340.  
  14341.  
  14342. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  14343.  
  14344. The analogous feature in Fortran is called an assigned goto, but that name 
  14345. seems inappropriate in C, where one can do more than simply store label 
  14346. addresses in label variables.
  14347.  
  14348.  
  14349. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  14350.  
  14351. A file's basename was the name stripped of all leading path information and of 
  14352. trailing suffixes, such as '.h' or '.C' or