source: trunk/third/gcc/gcc.1 @ 8834

Revision 8834, 104.7 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8833, which included commits to RCS files with non-trunk default branches.
Line 
1.\" Copyright (c) 1991, 1992, 1993, 1994 Free Software Foundation    -*-Text-*-
2.\" See section COPYING for conditions for redistribution
3.\"
4.\" Set up \*(lq, \*(rq if -man hasn't already set it up.
5.if @@\*(lq@ \{\
6.       ds lq "
7.       if t .ds lq ``
8.       if !@@\(lq@ .ds lq "\(lq
9.\}
10.if @@\*(rq@ \{\
11.       ds rq "
12.       if t .ds rq ''
13.       if !@@\(rq@ .ds rq "\(rq
14.\}
15.de Id
16.ds Rv \\$3
17.ds Dt \\$4
18..
19.de Sp
20.if n .sp
21.if t .sp 0.4
22..
23.Id $Id: gcc.1,v 1.1.1.1 1996-09-18 03:10:48 ghudson Exp $
24.TH GCC 1 "\*(Dt" "GNU Tools" "GNU Tools"
25.SH NAME
26gcc, g++ \- GNU project C and C++ Compiler (v2.7)
27.SH SYNOPSIS
28.B gcc
29.RI "[ " option " | " filename " ].\|.\|."
30.br
31.B g++
32.RI "[ " option " | " filename " ].\|.\|."
33.SH WARNING
34The information in this man page is an extract from the full
35documentation of the GNU C compiler, and is limited to the meaning of
36the options.
37.PP
38This man page is not kept up to date except when volunteers want to
39maintain it.  If you find a discrepancy between the man page and the
40software, please check the Info file, which is the authoritative
41documentation.
42.PP
43If we find that the things in this man page that are out of date cause
44significant confusion or complaints, we will stop distributing the man
45page.  The alternative, updating the man page when we update the Info
46file, is impossible because the rest of the work of maintaining GNU CC
47leaves us no time for that.  The GNU project regards man pages as
48obsolete and should not let them take time away from other things.
49.PP
50For complete and current documentation, refer to the Info file `\|\c
51.B gcc\c
52\&\|' or the manual
53.I
54Using and Porting GNU CC (for version 2.0)\c
55\&.  Both are made from the Texinfo source file
56.BR gcc.texinfo .
57.SH DESCRIPTION
58The C and C++ compilers are integrated.  Both process input files
59through one or more of four stages: preprocessing, compilation,
60assembly, and linking.  Source filename suffixes identify the source
61language, but which name you use for the compiler governs default
62assumptions:
63.TP
64.B gcc
65assumes preprocessed (\c
66.B .i\c
67\&) files are C and assumes C style linking.
68.TP
69.B g++
70assumes preprocessed (\c
71.B .i\c
72\&) files are C++ and assumes C++ style linking.
73.PP
74Suffixes of source file names indicate the language and kind of
75processing to be done:
76.Sp
77.nf
78.ta \w'\fB.cxx\fP  'u
79\&\fB.c\fP      C source; preprocess, compile, assemble
80\&\fB.C\fP      C++ source; preprocess, compile, assemble
81\&\fB.cc\fP     C++ source; preprocess, compile, assemble
82\&\fB.cxx\fP    C++ source; preprocess, compile, assemble
83\&\fB.m\fP      Objective-C source; preprocess, compile, assemble
84\&\fB.i\fP      preprocessed C; compile, assemble
85\&\fB.ii\fP     preprocessed C++; compile, assemble
86\&\fB.s\fP      Assembler source; assemble
87\&\fB.S\fP      Assembler source; preprocess, assemble
88\&\fB.h\fP      Preprocessor file; not usually named on command line
89.Sp
90.fi
91Files with other suffixes are passed to the linker.  Common cases include:
92.Sp
93.nf
94\&\fB.o\fP      Object file
95\&\fB.a\fP      Archive file
96.br
97.fi
98.Sp
99Linking is always the last stage unless you use one of the
100.BR \-c ,
101.BR \-S ,
102or
103.B \-E
104options to avoid it (or unless compilation errors stop the whole
105process).  For the link stage, all
106.B .o
107files corresponding to source files,
108.B \-l
109libraries, unrecognized filenames (including named
110.B .o
111object files and
112.B .a
113archives)
114are passed to the linker in command-line order.
115.SH OPTIONS
116Options must be separate: `\|\c
117.B \-dr\c
118\&\|' is quite different from `\|\c
119.B \-d \-r
120\&\|'.
121.PP
122Most `\|\c
123.B \-f\c
124\&\|' and `\|\c
125.B \-W\c
126\&\|' options have two contrary forms:
127.BI \-f name
128and
129.BI \-fno\- name\c
130\& (or
131.BI \-W name
132and
133.BI \-Wno\- name\c
134\&).  Only the non-default forms are shown here.
135.PP
136Here is a summary of all the options, grouped by type.  Explanations are
137in the following sections.
138.hy 0
139.na
140.TP
141.B Overall Options
142.br
143\-c
144\-S
145\-E
146.RI "\-o " file
147\-pipe
148\-v
149.RI "\-x " language
150.TP
151.B Language Options
152\-ansi
153\-fall\-virtual
154\-fcond\-mismatch
155\-fdollars\-in\-identifiers
156\-fenum\-int\-equiv
157\-fexternal\-templates
158\-fno\-asm
159\-fno\-builtin
160\-fno\-strict\-prototype
161\-fsigned\-bitfields
162\-fsigned\-char
163\-fthis\-is\-variable
164\-funsigned\-bitfields
165\-funsigned\-char
166\-fwritable\-strings
167\-traditional
168\-traditional\-cpp
169\-trigraphs
170.TP
171.B Warning Options
172\-fsyntax\-only
173\-pedantic
174\-pedantic\-errors
175\-w
176\-W
177\-Wall
178\-Waggregate\-return
179\-Wcast\-align
180\-Wcast\-qual
181\-Wchar\-subscript
182\-Wcomment
183\-Wconversion
184\-Wenum\-clash
185\-Werror
186\-Wformat
187.RI \-Wid\-clash\- len
188\-Wimplicit
189\-Winline
190\-Wmissing\-prototypes
191\-Wmissing\-declarations
192\-Wnested\-externs
193\-Wno\-import
194\-Wparentheses
195\-Wpointer\-arith
196\-Wredundant\-decls
197\-Wreturn\-type
198\-Wshadow
199\-Wstrict\-prototypes
200\-Wswitch
201\-Wtemplate\-debugging
202\-Wtraditional
203\-Wtrigraphs
204\-Wuninitialized
205\-Wunused
206\-Wwrite\-strings
207.TP
208.B Debugging Options
209\-a
210.RI \-d letters
211\-fpretend\-float
212\-g
213.RI \-g level
214\-gcoff
215\-gxcoff
216\-gxcoff+
217\-gdwarf
218\-gdwarf+
219\-gstabs
220\-gstabs+
221\-ggdb
222\-p
223\-pg
224\-save\-temps
225.RI \-print\-file\-name= library
226\-print\-libgcc\-file\-name
227.RI \-print\-prog\-name= program
228.TP
229.B Optimization Options
230\-fcaller\-saves
231\-fcse\-follow\-jumps
232\-fcse\-skip\-blocks
233\-fdelayed\-branch
234\-felide\-constructors
235\-fexpensive\-optimizations
236\-ffast\-math
237\-ffloat\-store
238\-fforce\-addr
239\-fforce\-mem
240\-finline\-functions
241\-fkeep\-inline\-functions
242\-fmemoize\-lookups
243\-fno\-default\-inline
244\-fno\-defer\-pop
245\-fno\-function\-cse
246\-fno\-inline
247\-fno\-peephole
248\-fomit\-frame\-pointer
249\-frerun\-cse\-after\-loop
250\-fschedule\-insns
251\-fschedule\-insns2
252\-fstrength\-reduce
253\-fthread\-jumps
254\-funroll\-all\-loops
255\-funroll\-loops
256\-O
257\-O2
258.TP
259.B Preprocessor Options
260.RI \-A assertion
261\-C
262\-dD
263\-dM
264\-dN
265.RI \-D macro [\|= defn \|]
266\-E
267\-H
268.RI "\-idirafter " dir
269.RI "\-include " file
270.RI "\-imacros " file
271.RI "\-iprefix " file
272.RI "\-iwithprefix " dir
273\-M
274\-MD
275\-MM
276\-MMD
277\-nostdinc
278\-P
279.RI \-U macro
280\-undef
281.TP
282.B Assembler Option
283.RI \-Wa, option
284.TP
285.B Linker Options
286.RI \-l library
287\-nostartfiles
288\-nostdlib
289\-static
290\-shared
291\-symbolic
292.RI "\-Xlinker\ " option
293.RI \-Wl, option
294.RI "\-u " symbol
295.TP
296.B Directory Options
297.RI \-B prefix
298.RI \-I dir
299\-I\-
300.RI \-L dir
301.TP
302.B Target Options
303.RI "\-b  " machine
304.RI "\-V " version
305.TP
306.B Configuration Dependent Options
307.I M680x0\ Options
308.br
309\-m68000
310\-m68020
311\-m68020\-40
312\-m68030
313\-m68040
314\-m68881
315\-mbitfield
316\-mc68000
317\-mc68020
318\-mfpa
319\-mnobitfield
320\-mrtd
321\-mshort
322\-msoft\-float
323.Sp
324.I VAX Options
325.br
326\-mg
327\-mgnu
328\-munix
329.Sp
330.I SPARC Options
331.br
332\-mepilogue
333\-mfpu
334\-mhard\-float
335\-mno\-fpu
336\-mno\-epilogue
337\-msoft\-float
338\-msparclite
339\-mv8
340\-msupersparc
341\-mcypress
342.Sp
343.I Convex Options
344.br
345\-margcount
346\-mc1
347\-mc2
348\-mnoargcount
349.Sp
350.I AMD29K Options
351.br
352\-m29000
353\-m29050
354\-mbw
355\-mdw
356\-mkernel\-registers
357\-mlarge
358\-mnbw
359\-mnodw
360\-msmall
361\-mstack\-check
362\-muser\-registers
363.Sp
364.I M88K Options
365.br
366\-m88000
367\-m88100
368\-m88110
369\-mbig\-pic
370\-mcheck\-zero\-division
371\-mhandle\-large\-shift
372\-midentify\-revision
373\-mno\-check\-zero\-division
374\-mno\-ocs\-debug\-info
375\-mno\-ocs\-frame\-position
376\-mno\-optimize\-arg\-area
377\-mno\-serialize\-volatile
378\-mno\-underscores
379\-mocs\-debug\-info
380\-mocs\-frame\-position
381\-moptimize\-arg\-area
382\-mserialize\-volatile
383.RI \-mshort\-data\- num
384\-msvr3
385\-msvr4
386\-mtrap\-large\-shift
387\-muse\-div\-instruction
388\-mversion\-03.00
389\-mwarn\-passed\-structs
390.Sp
391.I RS6000 Options
392.br
393\-mfp\-in\-toc
394\-mno\-fop\-in\-toc
395.Sp
396.I RT Options
397.br
398\-mcall\-lib\-mul
399\-mfp\-arg\-in\-fpregs
400\-mfp\-arg\-in\-gregs
401\-mfull\-fp\-blocks
402\-mhc\-struct\-return
403\-min\-line\-mul
404\-mminimum\-fp\-blocks
405\-mnohc\-struct\-return
406.Sp
407.I MIPS Options
408.br
409\-mcpu=\fIcpu type\fP
410\-mips2
411\-mips3
412\-mint64
413\-mlong64
414\-mlonglong128
415\-mmips\-as
416\-mgas
417\-mrnames
418\-mno\-rnames
419\-mgpopt
420\-mno\-gpopt
421\-mstats
422\-mno\-stats
423\-mmemcpy
424\-mno\-memcpy
425\-mno\-mips\-tfile
426\-mmips\-tfile
427\-msoft\-float
428\-mhard\-float
429\-mabicalls
430\-mno\-abicalls
431\-mhalf\-pic
432\-mno\-half\-pic
433\-G \fInum\fP
434\-nocpp
435.Sp
436.I i386 Options
437.br
438\-m486
439\-mno\-486
440\-msoft\-float
441\-mno\-fp\-ret\-in\-387
442.Sp
443.I HPPA Options
444.br
445\-mpa\-risc\-1\-0
446\-mpa\-risc\-1\-1
447\-mkernel
448\-mshared\-libs
449\-mno\-shared\-libs
450\-mlong\-calls
451\-mdisable\-fpregs
452\-mdisable\-indexing
453\-mtrailing\-colon
454.Sp
455.I i960 Options
456.br
457\-m\fIcpu-type\fP
458\-mnumerics
459\-msoft\-float
460\-mleaf\-procedures
461\-mno\-leaf\-procedures
462\-mtail\-call
463\-mno\-tail\-call
464\-mcomplex\-addr
465\-mno\-complex\-addr
466\-mcode\-align
467\-mno\-code\-align
468\-mic\-compat
469\-mic2.0\-compat
470\-mic3.0\-compat
471\-masm\-compat
472\-mintel\-asm
473\-mstrict\-align
474\-mno\-strict\-align
475\-mold\-align
476\-mno\-old\-align
477.Sp
478.I DEC Alpha Options
479.br
480\-mfp\-regs
481\-mno\-fp\-regs
482\-mno\-soft\-float
483\-msoft\-float
484.Sp
485.I System V Options
486.br
487\-G
488\-Qy
489\-Qn
490.RI \-YP, paths
491.RI \-Ym, dir
492.TP
493.B Code Generation Options
494.RI \-fcall\-saved\- reg
495.RI \-fcall\-used\- reg
496.RI \-ffixed\- reg
497\-finhibit\-size\-directive
498\-fnonnull\-objects
499\-fno\-common
500\-fno\-ident
501\-fno\-gnu\-linker
502\-fpcc\-struct\-return
503\-fpic
504\-fPIC
505\-freg\-struct\-return
506\-fshared\-data
507\-fshort\-enums
508\-fshort\-double
509\-fvolatile
510\-fvolatile\-global
511\-fverbose\-asm
512.ad b
513.hy 1
514.SH OVERALL OPTIONS
515.TP
516.BI "\-x " "language"
517Specify explicitly the
518.I language\c
519\& for the following input files (rather than choosing a default based
520on the file name suffix) .  This option applies to all following input
521files until the next `\|\c
522.B \-x\c
523\&\|' option.  Possible values of \c
524.I language\c
525\& are
526`\|\c
527.B c\c
528\&\|', `\|\c
529.B objective\-c\c
530\&\|', `\|\c
531.B c\-header\c
532\&\|', `\|\c
533.B c++\c
534\&\|',
535`\|\c
536.B cpp\-output\c
537\&\|', `\|\c
538.B assembler\c
539\&\|', and `\|\c
540.B assembler\-with\-cpp\c
541\&\|'.
542.TP
543.B \-x none
544Turn off any specification of a language, so that subsequent files are
545handled according to their file name suffixes (as they are if `\|\c
546.B \-x\c
547\&\|'
548has not been used at all).
549.PP
550If you want only some of the four stages (preprocess, compile,
551assemble, link), you can use
552`\|\c
553.B \-x\c
554\&\|' (or filename suffixes) to tell \c
555.B gcc\c
556\& where to start, and
557one of the options `\|\c
558.B \-c\c
559\&\|', `\|\c
560.B \-S\c
561\&\|', or `\|\c
562.B \-E\c
563\&\|' to say where
564.B gcc\c
565\& is to stop.  Note that some combinations (for example,
566`\|\c
567.B \-x cpp\-output \-E\c
568\&\|') instruct \c
569.B gcc\c
570\& to do nothing at all.
571.TP
572.B \-c
573Compile or assemble the source files, but do not link.  The compiler
574output is an object file corresponding to each source file.
575.Sp
576By default, GCC makes the object file name for a source file by replacing
577the suffix `\|\c
578.B .c\c
579\&\|', `\|\c
580.B .i\c
581\&\|', `\|\c
582.B .s\c
583\&\|', etc., with `\|\c
584.B .o\c
585\&\|'.  Use
586.B \-o\c
587\& to select another name.
588.Sp
589GCC ignores any unrecognized input files (those that do not require
590compilation or assembly) with the
591.B \-c
592option.
593.TP
594.B \-S
595Stop after the stage of compilation proper; do not assemble.  The output
596is an assembler code file for each non-assembler input
597file specified.
598.Sp
599By default, GCC makes the assembler file name for a source file by
600replacing the suffix `\|\c
601.B .c\c
602\&\|', `\|\c
603.B .i\c
604\&\|', etc., with `\|\c
605.B .s\c
606\&\|'.  Use
607.B \-o\c
608\& to select another name.
609.Sp
610GCC ignores any input files that don't require compilation.
611.TP
612.B \-E
613Stop after the preprocessing stage; do not run the compiler proper.  The
614output is preprocessed source code, which is sent to the
615standard output.
616.Sp
617GCC ignores input files which don't require preprocessing.
618.TP
619.BI "\-o " file
620Place output in file \c
621.I file\c
622\&.  This applies regardless to whatever
623sort of output GCC is producing, whether it be an executable file,
624an object file, an assembler file or preprocessed C code.
625.Sp
626Since only one output file can be specified, it does not make sense to
627use `\|\c
628.B \-o\c
629\&\|' when compiling more than one input file, unless you are
630producing an executable file as output.
631.Sp
632If you do not specify `\|\c
633.B \-o\c
634\&\|', the default is to put an executable file
635in `\|\c
636.B a.out\c
637\&\|', the object file for `\|\c
638.I source\c
639.B \&.\c
640.I suffix\c
641\&\c
642\&\|' in
643`\|\c
644.I source\c
645.B \&.o\c
646\&\|', its assembler file in `\|\c
647.I source\c
648.B \&.s\c
649\&\|', and
650all preprocessed C source on standard output.
651.TP
652.B \-v
653Print (on standard error output) the commands executed to run the stages
654of compilation.  Also print the version number of the compiler driver
655program and of the preprocessor and the compiler proper.
656.TP
657.B \-pipe
658Use pipes rather than temporary files for communication between the
659various stages of compilation.  This fails to work on some systems where
660the assembler cannot read from a pipe; but the GNU assembler has
661no trouble.
662.PP
663.SH LANGUAGE OPTIONS
664The following options control the dialect of C that the compiler
665accepts:
666.TP
667.B \-ansi
668Support all ANSI standard C programs.
669.Sp
670This turns off certain features of GNU C that are incompatible with
671ANSI C, such as the \c
672.B asm\c
673\&, \c
674.B inline\c
675\& and \c
676.B typeof
677keywords, and predefined macros such as \c
678.B unix\c
679\& and \c
680.B vax
681that identify the type of system you are using.  It also enables the
682undesirable and rarely used ANSI trigraph feature, and disallows `\|\c
683.B $\c
684\&\|' as part of identifiers.
685.Sp
686The alternate keywords \c
687.B _\|_asm_\|_\c
688\&, \c
689.B _\|_extension_\|_\c
690\&,
691.B _\|_inline_\|_\c
692\& and \c
693.B _\|_typeof_\|_\c
694\& continue to work despite
695`\|\c
696.B \-ansi\c
697\&\|'.  You would not want to use them in an ANSI C program, of
698course, but it is useful to put them in header files that might be included
699in compilations done with `\|\c
700.B \-ansi\c
701\&\|'.  Alternate predefined macros
702such as \c
703.B _\|_unix_\|_\c
704\& and \c
705.B _\|_vax_\|_\c
706\& are also available, with or
707without `\|\c
708.B \-ansi\c
709\&\|'.
710.Sp
711The `\|\c
712.B \-ansi\c
713\&\|' option does not cause non-ANSI programs to be
714rejected gratuitously.  For that, `\|\c
715.B \-pedantic\c
716\&\|' is required in
717addition to `\|\c
718.B \-ansi\c
719\&\|'.
720.Sp
721The preprocessor predefines a macro \c
722.B _\|_STRICT_ANSI_\|_\c
723\& when you use the `\|\c
724.B \-ansi\c
725\&\|'
726option.  Some header files may notice this macro and refrain
727from declaring certain functions or defining certain macros that the
728ANSI standard doesn't call for; this is to avoid interfering with any
729programs that might use these names for other things.
730.TP
731.B \-fno\-asm
732Do not recognize \c
733.B asm\c
734\&, \c
735.B inline\c
736\& or \c
737.B typeof\c
738\& as a
739keyword.  These words may then be used as identifiers.  You can
740use \c
741.B _\|_asm_\|_\c
742\&, \c
743.B _\|_inline_\|_\c
744\& and \c
745.B _\|_typeof_\|_\c
746\& instead.
747`\|\c
748.B \-ansi\c
749\&\|' implies `\|\c
750.B \-fno\-asm\c
751\&\|'.
752.TP
753.B \-fno\-builtin
754Don't recognize built-in functions that do not begin with two leading
755underscores.  Currently, the functions affected include \c
756.B _exit\c
757\&,
758.B abort\c
759\&, \c
760.B abs\c
761\&, \c
762.B alloca\c
763\&, \c
764.B cos\c
765\&, \c
766.B exit\c
767\&,
768.B fabs\c
769\&, \c
770.B labs\c
771\&, \c
772.B memcmp\c
773\&, \c
774.B memcpy\c
775\&, \c
776.B sin\c
777\&,
778.B sqrt\c
779\&, \c
780.B strcmp\c
781\&, \c
782.B strcpy\c
783\&, and \c
784.B strlen\c
785\&.
786.Sp
787The `\|\c
788.B \-ansi\c
789\&\|' option prevents \c
790.B alloca\c
791\& and \c
792.B _exit\c
793\& from
794being builtin functions.
795.TP
796.B \-fno\-strict\-prototype
797Treat a function declaration with no arguments, such as `\|\c
798.B int foo
799();\c
800\&\|', as C would treat it\(em\&as saying nothing about the number of
801arguments or their types (C++ only).  Normally, such a declaration in
802C++ means that the function \c
803.B foo\c
804\& takes no arguments.
805.TP
806.B \-trigraphs
807Support ANSI C trigraphs.  The `\|\c
808.B \-ansi\c
809\&\|' option implies `\|\c
810.B \-trigraphs\c
811\&\|'.
812.TP
813.B \-traditional
814Attempt to support some aspects of traditional C compilers.
815For details, see the GNU C Manual; the duplicate list here
816has been deleted so that we won't get complaints when it
817is out of date.
818.Sp
819But one note about C++ programs only (not C).  `\|\c
820.B \-traditional\c
821\&\|' has one additional effect for C++: assignment to
822.B this
823is permitted.  This is the same as the effect of `\|\c
824.B \-fthis\-is\-variable\c
825\&\|'.
826.TP
827.B \-traditional\-cpp
828Attempt to support some aspects of traditional C preprocessors.
829This includes the items that specifically mention the preprocessor above,
830but none of the other effects of `\|\c
831.B \-traditional\c
832\&\|'.
833.TP
834.B \-fdollars\-in\-identifiers
835Permit the use of `\|\c
836.B $\c
837\&\|' in identifiers (C++ only).  You can also use
838`\|\c
839.B \-fno\-dollars\-in\-identifiers\c
840\&\|' to explicitly prohibit use of
841`\|\c
842.B $\c
843\&\|'.  (GNU C++ allows `\|\c
844.B $\c
845\&\|' by default on some target systems
846but not others.)
847.TP
848.B \-fenum\-int\-equiv
849Permit implicit conversion of \c
850.B int\c
851\& to enumeration types (C++
852only).  Normally GNU C++ allows conversion of \c
853.B enum\c
854\& to \c
855.B int\c
856\&,
857but not the other way around.
858.TP
859.B \-fexternal\-templates
860Produce smaller code for template declarations, by generating only a
861single copy of each template function where it is defined (C++ only).
862To use this option successfully, you must also mark all files that
863use templates with either `\|\c
864.B #pragma implementation\c
865\&\|' (the definition) or
866`\|\c
867.B #pragma interface\c
868\&\|' (declarations).
869
870When your code is compiled with `\|\c
871.B \-fexternal\-templates\c
872\&\|', all
873template instantiations are external.  You must arrange for all
874necessary instantiations to appear in the implementation file; you can
875do this with a \c
876.B typedef\c
877\& that references each instantiation needed.
878Conversely, when you compile using the default option
879`\|\c
880.B \-fno\-external\-templates\c
881\&\|', all template instantiations are
882explicitly internal.
883.TP
884.B \-fall\-virtual
885Treat all possible member functions as virtual, implicitly.  All
886member functions (except for constructor functions and
887.B new
888or
889.B delete
890member operators) are treated as virtual functions of the class where
891they appear.
892.Sp
893This does not mean that all calls to these member functions will be
894made through the internal table of virtual functions.  Under some
895circumstances, the compiler can determine that a call to a given
896virtual function can be made directly; in these cases the calls are
897direct in any case.
898.TP
899.B \-fcond\-mismatch
900Allow conditional expressions with mismatched types in the second and
901third arguments.  The value of such an expression is void.
902.TP
903.B \-fthis\-is\-variable
904Permit assignment to \c
905.B this\c
906\& (C++ only).  The incorporation of
907user-defined free store management into C++ has made assignment to
908`\|\c
909.B this\c
910\&\|' an anachronism.  Therefore, by default it is invalid to
911assign to \c
912.B this\c
913\& within a class member function.  However, for
914backwards compatibility, you can make it valid with
915`\|\c
916.B \-fthis-is-variable\c
917\&\|'.
918.TP
919.B \-funsigned\-char
920Let the type \c
921.B char\c
922\& be unsigned, like \c
923.B unsigned char\c
924\&.
925.Sp
926Each kind of machine has a default for what \c
927.B char\c
928\& should
929be.  It is either like \c
930.B unsigned char\c
931\& by default or like
932.B signed char\c
933\& by default.
934.Sp
935Ideally, a portable program should always use \c
936.B signed char\c
937\& or
938.B unsigned char\c
939\& when it depends on the signedness of an object.
940But many programs have been written to use plain \c
941.B char\c
942\& and
943expect it to be signed, or expect it to be unsigned, depending on the
944machines they were written for.  This option, and its inverse, let you
945make such a program work with the opposite default.
946.Sp
947The type \c
948.B char\c
949\& is always a distinct type from each of
950.B signed char\c
951\& and \c
952.B unsigned char\c
953\&, even though its behavior
954is always just like one of those two.
955.TP
956.B \-fsigned\-char
957Let the type \c
958.B char\c
959\& be signed, like \c
960.B signed char\c
961\&.
962.Sp
963Note that this is equivalent to `\|\c
964.B \-fno\-unsigned\-char\c
965\&\|', which is
966the negative form of `\|\c
967.B \-funsigned\-char\c
968\&\|'.  Likewise,
969`\|\c
970.B \-fno\-signed\-char\c
971\&\|' is equivalent to `\|\c
972.B \-funsigned\-char\c
973\&\|'.
974.TP
975.B \-fsigned\-bitfields
976.TP
977.B \-funsigned\-bitfields
978.TP
979.B \-fno\-signed\-bitfields
980.TP
981.B \-fno\-unsigned\-bitfields
982These options control whether a bitfield is
983signed or unsigned, when declared with no explicit `\|\c
984.B signed\c
985\&\|' or `\|\c
986.B unsigned\c
987\&\|' qualifier.  By default, such a bitfield is
988signed, because this is consistent: the basic integer types such as
989.B int\c
990\& are signed types.
991.Sp
992However, when you specify `\|\c
993.B \-traditional\c
994\&\|', bitfields are all unsigned
995no matter what.
996.TP
997.B \-fwritable\-strings
998Store string constants in the writable data segment and don't uniquize
999them.  This is for compatibility with old programs which assume they
1000can write into string constants.  `\|\c
1001.B \-traditional\c
1002\&\|' also has this
1003effect.
1004.Sp
1005Writing into string constants is a very bad idea; \*(lqconstants\*(rq should
1006be constant.
1007.SH PREPROCESSOR OPTIONS
1008These options control the C preprocessor, which is run on each C source
1009file before actual compilation.
1010.PP
1011If you use the `\|\c
1012.B \-E\c
1013\&\|' option, GCC does nothing except preprocessing.
1014Some of these options make sense only together with `\|\c
1015.B \-E\c
1016\&\|' because
1017they cause the preprocessor output to be unsuitable for actual
1018compilation.
1019.TP
1020.BI "\-include " "file"
1021Process \c
1022.I file\c
1023\& as input before processing the regular input file.
1024In effect, the contents of \c
1025.I file\c
1026\& are compiled first.  Any `\|\c
1027.B \-D\c
1028\&\|'
1029and `\|\c
1030.B \-U\c
1031\&\|' options on the command line are always processed before
1032`\|\c
1033.B \-include \c
1034.I file\c
1035\&\c
1036\&\|', regardless of the order in which they are
1037written.  All the `\|\c
1038.B \-include\c
1039\&\|' and `\|\c
1040.B \-imacros\c
1041\&\|' options are
1042processed in the order in which they are written.
1043.TP
1044.BI "\-imacros " file
1045Process \c
1046.I file\c
1047\& as input, discarding the resulting output, before
1048processing the regular input file.  Because the output generated from
1049.I file\c
1050\& is discarded, the only effect of `\|\c
1051.B \-imacros \c
1052.I file\c
1053\&\c
1054\&\|' is to
1055make the macros defined in \c
1056.I file\c
1057\& available for use in the main
1058input.  The preprocessor evaluates any `\|\c
1059.B \-D\c
1060\&\|' and `\|\c
1061.B \-U\c
1062\&\|' options
1063on the command line before processing `\|\c
1064.B \-imacros\c
1065.I file\c
1066\&\|', regardless of the order in
1067which they are written.  All the `\|\c
1068.B \-include\c
1069\&\|' and `\|\c
1070.B \-imacros\c
1071\&\|'
1072options are processed in the order in which they are written.
1073.TP
1074.BI "\-idirafter " "dir"
1075Add the directory \c
1076.I dir\c
1077\& to the second include path.  The directories
1078on the second include path are searched when a header file is not found
1079in any of the directories in the main include path (the one that
1080`\|\c
1081.B \-I\c
1082\&\|' adds to).
1083.TP
1084.BI "\-iprefix " "prefix"
1085Specify \c
1086.I prefix\c
1087\& as the prefix for subsequent `\|\c
1088.B \-iwithprefix\c
1089\&\|'
1090options.
1091.TP
1092.BI "\-iwithprefix " "dir"
1093Add a directory to the second include path.  The directory's name is
1094made by concatenating \c
1095.I prefix\c
1096\& and \c
1097.I dir\c
1098\&, where \c
1099.I prefix
1100was specified previously with `\|\c
1101.B \-iprefix\c
1102\&\|'.
1103.TP
1104.B \-nostdinc
1105Do not search the standard system directories for header files.  Only
1106the directories you have specified with `\|\c
1107.B \-I\c
1108\&\|' options (and the
1109current directory, if appropriate) are searched.
1110.Sp
1111By using both `\|\c
1112.B \-nostdinc\c
1113\&\|' and `\|\c
1114.B \-I\-\c
1115\&\|', you can limit the include-file search file to only those
1116directories you specify explicitly.
1117.TP
1118.B \-nostdinc++
1119Do not search for header files in the C++\-specific standard directories,
1120but do still search the other standard directories.
1121(This option is used when building `\|\c
1122.B libg++\c
1123\&\|'.)
1124.TP
1125.B \-undef
1126Do not predefine any nonstandard macros.  (Including architecture flags).
1127.TP
1128.B \-E
1129Run only the C preprocessor.  Preprocess all the C source files
1130specified and output the results to standard output or to the
1131specified output file.
1132.TP
1133.B \-C
1134Tell the preprocessor not to discard comments.  Used with the
1135`\|\c
1136.B \-E\c
1137\&\|' option.
1138.TP
1139.B \-P
1140Tell the preprocessor not to generate `\|\c
1141.B #line\c
1142\&\|' commands.
1143Used with the `\|\c
1144.B \-E\c
1145\&\|' option.
1146.TP
1147.B \-M\  [ \-MG ]
1148Tell the preprocessor to output a rule suitable for \c
1149.B make
1150describing the dependencies of each object file.  For each source file,
1151the preprocessor outputs one \c
1152.B make\c
1153\&-rule whose target is the object
1154file name for that source file and whose dependencies are all the files
1155`\|\c
1156.B #include\c
1157\&\|'d in it.  This rule may be a single line or may be
1158continued with `\|\c
1159.B \e\c
1160\&\|'-newline if it is long.  The list of rules is
1161printed on standard output instead of the preprocessed C program.
1162.Sp
1163`\|\c
1164.B \-M\c
1165\&\|' implies `\|\c
1166.B \-E\c
1167\&\|'.
1168.Sp
1169`\|\c
1170.B \-MG\c
1171\&\|' says to treat missing header files as generated files and assume \c
1172they live in the same directory as the source file.  It must be specified \c
1173in addition to `\|\c
1174.B \-M\c
1175\&\|'.
1176.TP
1177.B \-MM\  [ \-MG ]
1178Like `\|\c
1179.B \-M\c
1180\&\|' but the output mentions only the user header files
1181included with `\|\c
1182.B #include "\c
1183.I file\c
1184\&"\c
1185\&\|'.  System header files
1186included with `\|\c
1187.B #include <\c
1188.I file\c
1189\&>\c
1190\&\|' are omitted.
1191.TP
1192.B \-MD
1193Like `\|\c
1194.B \-M\c
1195\&\|' but the dependency information is written to files with
1196names made by replacing `\|\c
1197.B .o\c
1198\&\|' with `\|\c
1199.B .d\c
1200\&\|' at the end of the
1201output file names.  This is in addition to compiling the file as
1202specified\(em\&`\|\c
1203.B \-MD\c
1204\&\|' does not inhibit ordinary compilation the way
1205`\|\c
1206.B \-M\c
1207\&\|' does.
1208.Sp
1209The Mach utility `\|\c
1210.B md\c
1211\&\|' can be used to merge the `\|\c
1212.B .d\c
1213\&\|' files
1214into a single dependency file suitable for using with the `\|\c
1215.B make\c
1216\&\|'
1217command.
1218.TP
1219.B \-MMD
1220Like `\|\c
1221.B \-MD\c
1222\&\|' except mention only user header files, not system
1223header files.
1224.TP
1225.B \-H
1226Print the name of each header file used, in addition to other normal
1227activities.
1228.TP
1229.BI "\-A" "question" ( answer )
1230Assert the answer
1231.I answer
1232for
1233.I question\c
1234\&, in case it is tested
1235with a preprocessor conditional such as `\|\c
1236.BI "#if #" question ( answer )\c
1237\&\|'.  `\|\c
1238.B \-A\-\c
1239\&\|' disables the standard
1240assertions that normally describe the target machine.
1241.TP
1242.BI "\-A" "question"\c
1243\&(\c
1244.I answer\c
1245\&)
1246Assert the answer \c
1247.I answer\c
1248\& for \c
1249.I question\c
1250\&, in case it is tested
1251with a preprocessor conditional such as `\|\c
1252.B #if
1253#\c
1254.I question\c
1255\&(\c
1256.I answer\c
1257\&)\c
1258\&\|'.  `\|\c
1259.B \-A-\c
1260\&\|' disables the standard
1261assertions that normally describe the target machine.
1262.TP
1263.BI \-D macro
1264Define macro \c
1265.I macro\c
1266\& with the string `\|\c
1267.B 1\c
1268\&\|' as its definition.
1269.TP
1270.BI \-D macro = defn
1271Define macro \c
1272.I macro\c
1273\& as \c
1274.I defn\c
1275\&.    All instances of `\|\c
1276.B \-D\c
1277\&\|' on
1278the command line are processed before any `\|\c
1279.B \-U\c
1280\&\|' options.
1281.TP
1282.BI \-U macro
1283Undefine macro \c
1284.I macro\c
1285\&.  `\|\c
1286.B \-U\c
1287\&\|' options are evaluated after all `\|\c
1288.B \-D\c
1289\&\|' options, but before any `\|\c
1290.B \-include\c
1291\&\|' and `\|\c
1292.B \-imacros\c
1293\&\|' options.
1294.TP
1295.B \-dM
1296Tell the preprocessor to output only a list of the macro definitions
1297that are in effect at the end of preprocessing.  Used with the `\|\c
1298.B \-E\c
1299\&\|'
1300option.
1301.TP
1302.B \-dD
1303Tell the preprocessor to pass all macro definitions into the output, in
1304their proper sequence in the rest of the output.
1305.TP
1306.B \-dN
1307Like `\|\c
1308.B \-dD\c
1309\&\|' except that the macro arguments and contents are omitted.
1310Only `\|\c
1311.B #define \c
1312.I name\c
1313\&\c
1314\&\|' is included in the output.
1315.SH ASSEMBLER OPTION
1316.TP
1317.BI "\-Wa," "option"
1318Pass \c
1319.I option\c
1320\& as an option to the assembler.  If \c
1321.I option
1322contains commas, it is split into multiple options at the commas.
1323.SH LINKER OPTIONS
1324These options come into play when the compiler links object files into
1325an executable output file.  They are meaningless if the compiler is
1326not doing a link step.
1327.TP
1328.I object-file-name
1329A file name that does not end in a special recognized suffix is
1330considered to name an object file or library.  (Object files are
1331distinguished from libraries by the linker according to the file
1332contents.)  If GCC does a link step, these object files are used as input
1333to the linker.
1334.TP
1335.BI \-l library
1336Use the library named \c
1337.I library\c
1338\& when linking.
1339.Sp
1340The linker searches a standard list of directories for the library,
1341which is actually a file named `\|\c
1342.B lib\c
1343.I library\c
1344\&.a\c
1345\&\|'.  The linker
1346then uses this file as if it had been specified precisely by name.
1347.Sp
1348The directories searched include several standard system directories
1349plus any that you specify with `\|\c
1350.B \-L\c
1351\&\|'.
1352.Sp
1353Normally the files found this way are library files\(em\&archive files
1354whose members are object files.  The linker handles an archive file by
1355scanning through it for members which define symbols that have so far
1356been referenced but not defined.  However, if the linker finds an
1357ordinary object file rather than a library, the object file is linked
1358in the usual fashion.  The only difference between using an `\|\c
1359.B \-l\c
1360\&\|' option and specifying a file
1361name is that `\|\c
1362.B \-l\c
1363\&\|' surrounds
1364.I library
1365with `\|\c
1366.B lib\c
1367\&\|' and `\|\c
1368.B .a\c
1369\&\|' and searches several directories.
1370.TP
1371.B \-lobjc
1372You need this special case of the
1373.B \-l
1374option in order to link an Objective C program.
1375.TP
1376.B \-nostartfiles
1377Do not use the standard system startup files when linking.
1378The standard libraries are used normally.
1379.TP
1380.B \-nostdlib
1381Don't use the standard system libraries and startup files when linking.
1382Only the files you specify will be passed to the linker.
1383.TP
1384.B \-static
1385On systems that support dynamic linking, this prevents linking with the shared
1386libraries.  On other systems, this option has no effect.
1387.TP
1388.B \-shared
1389Produce a shared object which can then be linked with other objects to
1390form an executable.  Only a few systems support this option.
1391.TP
1392.B \-symbolic
1393Bind references to global symbols when building a shared object.  Warn
1394about any unresolved references (unless overridden by the link editor
1395option `\|\c
1396.B
1397\-Xlinker \-z \-Xlinker defs\c
1398\&\|').  Only a few systems support
1399this option.
1400.TP
1401.BI "\-Xlinker " "option"
1402Pass \c
1403.I option
1404as an option to the linker.  You can use this to
1405supply system-specific linker options which GNU CC does not know how to
1406recognize.
1407.Sp
1408If you want to pass an option that takes an argument, you must use
1409`\|\c
1410.B \-Xlinker\c
1411\&\|' twice, once for the option and once for the argument.
1412For example, to pass `\|\c
1413.B
1414\-assert definitions\c
1415\&\|', you must write
1416`\|\c
1417.B
1418\-Xlinker \-assert \-Xlinker definitions\c
1419\&\|'.  It does not work to write
1420`\|\c
1421.B
1422\-Xlinker "\-assert definitions"\c
1423\&\|', because this passes the entire
1424string as a single argument, which is not what the linker expects.
1425.TP
1426.BI "\-Wl," "option"
1427Pass \c
1428.I option\c
1429\& as an option to the linker.  If \c
1430.I option\c
1431\& contains
1432commas, it is split into multiple options at the commas.
1433.TP
1434.BI "\-u " "symbol"
1435Pretend the symbol
1436.I symbol
1437is undefined, to force linking of
1438library modules to define it.  You can use `\|\c
1439.B \-u\c
1440\&\|' multiple times with
1441different symbols to force loading of additional library modules.
1442.SH DIRECTORY OPTIONS
1443These options specify directories to search for header files, for
1444libraries and for parts of the compiler:
1445.TP
1446.BI "\-I" "dir"
1447Append directory \c
1448.I dir\c
1449\& to the list of directories searched for include files.
1450.TP
1451.B \-I\-
1452Any directories you specify with `\|\c
1453.B \-I\c
1454\&\|' options before the `\|\c
1455.B \-I\-\c
1456\&\|'
1457option are searched only for the case of `\|\c
1458.B
1459#include "\c
1460.I file\c
1461.B
1462\&"\c
1463\&\|';
1464they are not searched for `\|\c
1465.B #include <\c
1466.I file\c
1467\&>\c
1468\&\|'.
1469.Sp
1470If additional directories are specified with `\|\c
1471.B \-I\c
1472\&\|' options after
1473the `\|\c
1474.B \-I\-\c
1475\&\|', these directories are searched for all `\|\c
1476.B #include\c
1477\&\|'
1478directives.  (Ordinarily \c
1479.I all\c
1480\& `\|\c
1481.B \-I\c
1482\&\|' directories are used
1483this way.)
1484.Sp
1485In addition, the `\|\c
1486.B \-I\-\c
1487\&\|' option inhibits the use of the current
1488directory (where the current input file came from) as the first search
1489directory for `\|\c
1490.B
1491#include "\c
1492.I file\c
1493.B
1494\&"\c
1495\&\|'.  There is no way to
1496override this effect of `\|\c
1497.B \-I\-\c
1498\&\|'.  With `\|\c
1499.B \-I.\c
1500\&\|' you can specify
1501searching the directory which was current when the compiler was
1502invoked.  That is not exactly the same as what the preprocessor does
1503by default, but it is often satisfactory.
1504.Sp
1505`\|\c
1506.B \-I\-\c
1507\&\|' does not inhibit the use of the standard system directories
1508for header files.  Thus, `\|\c
1509.B \-I\-\c
1510\&\|' and `\|\c
1511.B \-nostdinc\c
1512\&\|' are
1513independent.
1514.TP
1515.BI "\-L" "dir"
1516Add directory \c
1517.I dir\c
1518\& to the list of directories to be searched
1519for `\|\c
1520.B \-l\c
1521\&\|'.
1522.TP
1523.BI "\-B" "prefix"
1524This option specifies where to find the executables, libraries and
1525data files of the compiler itself.
1526.Sp
1527The compiler driver program runs one or more of the subprograms
1528`\|\c
1529.B cpp\c
1530\&\|', `\|\c
1531.B cc1\c
1532\&\|' (or, for C++, `\|\c
1533.B cc1plus\c
1534\&\|'), `\|\c
1535.B as\c
1536\&\|' and `\|\c
1537.B ld\c
1538\&\|'.  It tries
1539.I prefix\c
1540\& as a prefix for each program it tries to run, both with and
1541without `\|\c
1542.I machine\c
1543.B /\c
1544.I version\c
1545.B /\c
1546\&\|'.
1547.Sp
1548For each subprogram to be run, the compiler driver first tries the
1549`\|\c
1550.B \-B\c
1551\&\|' prefix, if any.  If that name is not found, or if `\|\c
1552.B \-B\c
1553\&\|'
1554was not specified, the driver tries two standard prefixes, which are
1555`\|\c
1556.B /usr/lib/gcc/\c
1557\&\|' and `\|\c
1558.B /usr/local/lib/gcc-lib/\c
1559\&\|'.  If neither of
1560those results in a file name that is found, the compiler driver
1561searches for the unmodified program
1562name, using the directories specified in your
1563`\|\c
1564.B PATH\c
1565\&\|' environment variable.
1566.Sp
1567The run-time support file `\|\c
1568.B libgcc.a\c
1569\&\|' is also searched for using the
1570`\|\c
1571.B \-B\c
1572\&\|' prefix, if needed.  If it is not found there, the two
1573standard prefixes above are tried, and that is all.  The file is left
1574out of the link if it is not found by those means.  Most of the time,
1575on most machines, `\|\c
1576.B libgcc.a\c
1577\&\|' is not actually necessary.
1578.Sp
1579You can get a similar result from the environment variable
1580.B GCC_EXEC_PREFIX\c
1581\&; if it is defined, its value is used as a prefix
1582in the same way.  If both the `\|\c
1583.B \-B\c
1584\&\|' option and the
1585.B GCC_EXEC_PREFIX\c
1586\& variable are present, the `\|\c
1587.B \-B\c
1588\&\|' option is
1589used first and the environment variable value second.
1590.SH WARNING OPTIONS
1591Warnings are diagnostic messages that report constructions which
1592are not inherently erroneous but which are risky or suggest there
1593may have been an error.
1594.Sp
1595These options control the amount and kinds of warnings produced by GNU
1596CC:
1597.TP
1598.B \-fsyntax\-only
1599Check the code for syntax errors, but don't emit any output.
1600.TP
1601.B \-w
1602Inhibit all warning messages.
1603.TP
1604.B \-Wno\-import
1605Inhibit warning messages about the use of
1606.BR #import .
1607.TP
1608.B \-pedantic
1609Issue all the warnings demanded by strict ANSI standard C; reject
1610all programs that use forbidden extensions.
1611.Sp
1612Valid ANSI standard C programs should compile properly with or without
1613this option (though a rare few will require `\|\c
1614.B \-ansi\c
1615\&\|').  However,
1616without this option, certain GNU extensions and traditional C features
1617are supported as well.  With this option, they are rejected.  There is
1618no reason to \c
1619.I use\c
1620\& this option; it exists only to satisfy pedants.
1621.Sp
1622`\|\c
1623.B \-pedantic\c
1624\&\|' does not cause warning messages for use of the
1625alternate keywords whose names begin and end with `\|\c
1626.B _\|_\c
1627\&\|'.  Pedantic
1628warnings are also disabled in the expression that follows
1629.B _\|_extension_\|_\c
1630\&.  However, only system header files should use
1631these escape routes; application programs should avoid them.
1632.TP
1633.B \-pedantic\-errors
1634Like `\|\c
1635.B \-pedantic\c
1636\&\|', except that errors are produced rather than
1637warnings.
1638.TP
1639.B \-W
1640Print extra warning messages for these events:
1641.TP
1642\ \ \ \(bu
1643A nonvolatile automatic variable might be changed by a call to
1644.B longjmp\c
1645\&.  These warnings are possible only in
1646optimizing compilation.
1647.Sp
1648The compiler sees only the calls to \c
1649.B setjmp\c
1650\&.  It cannot know
1651where \c
1652.B longjmp\c
1653\& will be called; in fact, a signal handler could
1654call it at any point in the code.  As a result, you may get a warning
1655even when there is in fact no problem because \c
1656.B longjmp\c
1657\& cannot
1658in fact be called at the place which would cause a problem.
1659.TP
1660\ \ \ \(bu
1661A function can return either with or without a value.  (Falling
1662off the end of the function body is considered returning without
1663a value.)  For example, this function would evoke such a
1664warning:
1665.Sp
1666.nf
1667foo (a)
1668{
1669  if (a > 0)
1670    return a;
1671}
1672.Sp
1673.fi
1674Spurious warnings can occur because GNU CC does not realize that
1675certain functions (including \c
1676.B abort\c
1677\& and \c
1678.B longjmp\c
1679\&)
1680will never return.
1681.TP
1682\ \ \ \(bu
1683An expression-statement or the left-hand side of a comma expression
1684contains no side effects.
1685To suppress the warning, cast the unused expression to void.
1686For example, an expression such as `\|\c
1687.B x[i,j]\c
1688\&\|' will cause a warning,
1689but `\|\c
1690.B x[(void)i,j]\c
1691\&\|' will not.
1692.TP
1693\ \ \ \(bu
1694An unsigned value is compared against zero with `\|\c
1695.B >\c
1696\&\|' or `\|\c
1697.B <=\c
1698\&\|'.
1699.PP
1700.TP
1701.B \-Wimplicit
1702Warn whenever a function or parameter is implicitly declared.
1703.TP
1704.B \-Wreturn\-type
1705Warn whenever a function is defined with a return-type that defaults
1706to \c
1707.B int\c
1708\&.  Also warn about any \c
1709.B return\c
1710\& statement with no
1711return-value in a function whose return-type is not \c
1712.B void\c
1713\&.
1714.TP
1715.B \-Wunused
1716Warn whenever a local variable is unused aside from its declaration,
1717whenever a function is declared static but never defined, and whenever
1718a statement computes a result that is explicitly not used.
1719.TP
1720.B \-Wswitch
1721Warn whenever a \c
1722.B switch\c
1723\& statement has an index of enumeral type
1724and lacks a \c
1725.B case\c
1726\& for one or more of the named codes of that
1727enumeration.  (The presence of a \c
1728.B default\c
1729\& label prevents this
1730warning.)  \c
1731.B case\c
1732\& labels outside the enumeration range also
1733provoke warnings when this option is used.
1734.TP
1735.B \-Wcomment
1736Warn whenever a comment-start sequence `\|\c
1737.B /\(**\c
1738\&\|' appears in a comment.
1739.TP
1740.B \-Wtrigraphs
1741Warn if any trigraphs are encountered (assuming they are enabled).
1742.TP
1743.B \-Wformat
1744Check calls to \c
1745.B printf\c
1746\& and \c
1747.B scanf\c
1748\&, etc., to make sure that
1749the arguments supplied have types appropriate to the format string
1750specified.
1751.TP
1752.B \-Wchar\-subscripts
1753Warn if an array subscript has type
1754.BR char .
1755This is a common cause of error, as programmers often forget that this
1756type is signed on some machines.
1757.TP
1758.B \-Wuninitialized
1759An automatic variable is used without first being initialized.
1760.Sp
1761These warnings are possible only in optimizing compilation,
1762because they require data flow information that is computed only
1763when optimizing.  If you don't specify `\|\c
1764.B \-O\c
1765\&\|', you simply won't
1766get these warnings.
1767.Sp
1768These warnings occur only for variables that are candidates for
1769register allocation.  Therefore, they do not occur for a variable that
1770is declared \c
1771.B volatile\c
1772\&, or whose address is taken, or whose size
1773is other than 1, 2, 4 or 8 bytes.  Also, they do not occur for
1774structures, unions or arrays, even when they are in registers.
1775.Sp
1776Note that there may be no warning about a variable that is used only
1777to compute a value that itself is never used, because such
1778computations may be deleted by data flow analysis before the warnings
1779are printed.
1780.Sp
1781These warnings are made optional because GNU CC is not smart
1782enough to see all the reasons why the code might be correct
1783despite appearing to have an error.  Here is one example of how
1784this can happen:
1785.Sp
1786.nf
1787{
1788  int x;
1789  switch (y)
1790    {
1791    case 1: x = 1;
1792      break;
1793    case 2: x = 4;
1794      break;
1795    case 3: x = 5;
1796    }
1797  foo (x);
1798}
1799.Sp
1800.fi
1801If the value of \c
1802.B y\c
1803\& is always 1, 2 or 3, then \c
1804.B x\c
1805\& is
1806always initialized, but GNU CC doesn't know this.  Here is
1807another common case:
1808.Sp
1809.nf
1810{
1811  int save_y;
1812  if (change_y) save_y = y, y = new_y;
1813  .\|.\|.
1814  if (change_y) y = save_y;
1815}
1816.Sp
1817.fi
1818This has no bug because \c
1819.B save_y\c
1820\& is used only if it is set.
1821.Sp
1822Some spurious warnings can be avoided if you declare as
1823.B volatile\c
1824\& all the functions you use that never return.
1825.TP
1826.B \-Wparentheses
1827Warn if parentheses are omitted in certain contexts.
1828.TP
1829.B \-Wtemplate\-debugging
1830When using templates in a C++ program, warn if debugging is not yet
1831fully available (C++ only).
1832.TP
1833.B \-Wall
1834All of the above `\|\c
1835.B \-W\c
1836\&\|' options combined.  These are all the
1837options which pertain to usage that we recommend avoiding and that we
1838believe is easy to avoid, even in conjunction with macros.
1839.PP
1840The remaining `\|\c
1841.B \-W.\|.\|.\c
1842\&\|' options are not implied by `\|\c
1843.B \-Wall\c
1844\&\|'
1845because they warn about constructions that we consider reasonable to
1846use, on occasion, in clean programs.
1847.TP
1848.B \-Wtraditional
1849Warn about certain constructs that behave differently in traditional and
1850ANSI C.
1851.TP
1852\ \ \ \(bu
1853Macro arguments occurring within string constants in the macro body.
1854These would substitute the argument in traditional C, but are part of
1855the constant in ANSI C.
1856.TP
1857\ \ \ \(bu
1858A function declared external in one block and then used after the end of
1859the block.
1860.TP
1861\ \ \ \(bu
1862A \c
1863.B switch\c
1864\& statement has an operand of type \c
1865.B long\c
1866\&.
1867.PP
1868.TP
1869.B \-Wshadow
1870Warn whenever a local variable shadows another local variable.
1871.TP
1872.BI "\-Wid\-clash\-" "len"
1873Warn whenever two distinct identifiers match in the first \c
1874.I len
1875characters.  This may help you prepare a program that will compile
1876with certain obsolete, brain-damaged compilers.
1877.TP
1878.B \-Wpointer\-arith
1879Warn about anything that depends on the \*(lqsize of\*(rq a function type or
1880of \c
1881.B void\c
1882\&.  GNU C assigns these types a size of 1, for
1883convenience in calculations with \c
1884.B void \(**\c
1885\& pointers and pointers
1886to functions.
1887.TP
1888.B \-Wcast\-qual
1889Warn whenever a pointer is cast so as to remove a type qualifier from
1890the target type.  For example, warn if a \c
1891.B const char \(**\c
1892\& is cast
1893to an ordinary \c
1894.B char \(**\c
1895\&.
1896.TP
1897.B \-Wcast\-align
1898Warn whenever a pointer is cast such that the required alignment of the
1899target is increased.  For example, warn if a \c
1900.B char \(**\c
1901\& is cast to
1902an \c
1903.B int \(**\c
1904\& on machines where integers can only be accessed at
1905two- or four-byte boundaries.
1906.TP
1907.B \-Wwrite\-strings
1908Give string constants the type \c
1909.B const char[\c
1910.I length\c
1911.B ]\c
1912\& so that
1913copying the address of one into a non-\c
1914.B const\c
1915\& \c
1916.B char \(**
1917pointer will get a warning.  These warnings will help you find at
1918compile time code that can try to write into a string constant, but
1919only if you have been very careful about using \c
1920.B const\c
1921\& in
1922declarations and prototypes.  Otherwise, it will just be a nuisance;
1923this is why we did not make `\|\c
1924.B \-Wall\c
1925\&\|' request these warnings.
1926.TP
1927.B \-Wconversion
1928Warn if a prototype causes a type conversion that is different from what
1929would happen to the same argument in the absence of a prototype.  This
1930includes conversions of fixed point to floating and vice versa, and
1931conversions changing the width or signedness of a fixed point argument
1932except when the same as the default promotion.
1933.TP
1934.B \-Waggregate\-return
1935Warn if any functions that return structures or unions are defined or
1936called.  (In languages where you can return an array, this also elicits
1937a warning.)
1938.TP
1939.B \-Wstrict\-prototypes
1940Warn if a function is declared or defined without specifying the
1941argument types.  (An old-style function definition is permitted without
1942a warning if preceded by a declaration which specifies the argument
1943types.)
1944.TP
1945.B \-Wmissing\-prototypes
1946Warn if a global function is defined without a previous prototype
1947declaration.  This warning is issued even if the definition itself
1948provides a prototype.  The aim is to detect global functions that fail
1949to be declared in header files.
1950.TP
1951.B \-Wmissing\-declarations
1952Warn if a global function is defined without a previous declaration.
1953Do so even if the definition itself provides a prototype.
1954Use this option to detect global functions that are not declared in
1955header files.
1956.TP
1957.B \-Wredundant-decls
1958Warn if anything is declared more than once in the same scope, even in
1959cases where multiple declaration is valid and changes nothing.
1960.TP
1961.B \-Wnested-externs
1962Warn if an \c
1963.B extern\c
1964\& declaration is encountered within an function.
1965.TP
1966.B \-Wenum\-clash
1967Warn about conversion between different enumeration types (C++ only).
1968.TP
1969.B \-Woverloaded\-virtual
1970(C++ only.)
1971In a derived class, the definitions of virtual functions must match
1972the type signature of a virtual function declared in the base class.
1973Use this option to request warnings when a derived class declares a
1974function that may be an erroneous attempt to define a virtual
1975function: that is, warn when a function with the same name as a
1976virtual function in the base class, but with a type signature that
1977doesn't match any virtual functions from the base class.
1978.TP
1979.B \-Winline
1980Warn if a function can not be inlined, and either it was declared as inline,
1981or else the
1982.B \-finline\-functions
1983option was given.
1984.TP
1985.B \-Werror
1986Treat warnings as errors; abort compilation after any warning.
1987.SH DEBUGGING OPTIONS
1988GNU CC has various special options that are used for debugging
1989either your program or GCC:
1990.TP
1991.B \-g
1992Produce debugging information in the operating system's native format
1993(stabs, COFF, XCOFF, or DWARF).  GDB can work with this debugging
1994information.
1995.Sp
1996On most systems that use stabs format, `\|\c
1997.B \-g\c
1998\&\|' enables use of extra
1999debugging information that only GDB can use; this extra information
2000makes debugging work better in GDB but will probably make other debuggers
2001crash or
2002refuse to read the program.  If you want to control for certain whether
2003to generate the extra information, use `\|\c
2004.B \-gstabs+\c
2005\&\|', `\|\c
2006.B \-gstabs\c
2007\&\|',
2008`\|\c
2009.B \-gxcoff+\c
2010\&\|', `\|\c
2011.B \-gxcoff\c
2012\&\|', `\|\c
2013.B \-gdwarf+\c
2014\&\|', or `\|\c
2015.B \-gdwarf\c
2016\&\|'
2017(see below).
2018.Sp
2019Unlike most other C compilers, GNU CC allows you to use `\|\c
2020.B \-g\c
2021\&\|' with
2022`\|\c
2023.B \-O\c
2024\&\|'.  The shortcuts taken by optimized code may occasionally
2025produce surprising results: some variables you declared may not exist
2026at all; flow of control may briefly move where you did not expect it;
2027some statements may not be executed because they compute constant
2028results or their values were already at hand; some statements may
2029execute in different places because they were moved out of loops.
2030.Sp
2031Nevertheless it proves possible to debug optimized output.  This makes
2032it reasonable to use the optimizer for programs that might have bugs.
2033.PP
2034The following options are useful when GNU CC is generated with the
2035capability for more than one debugging format.
2036.TP
2037.B \-ggdb
2038Produce debugging information in the native format (if that is supported),
2039including GDB extensions if at all possible.
2040.TP
2041.B \-gstabs
2042Produce debugging information in stabs format (if that is supported),
2043without GDB extensions.  This is the format used by DBX on most BSD
2044systems.
2045.TP
2046.B \-gstabs+
2047Produce debugging information in stabs format (if that is supported),
2048using GNU extensions understood only by the GNU debugger (GDB).  The
2049use of these extensions is likely to make other debuggers crash or
2050refuse to read the program.
2051.TP
2052.B \-gcoff
2053Produce debugging information in COFF format (if that is supported).
2054This is the format used by SDB on most System V systems prior to
2055System V Release 4.
2056.TP
2057.B \-gxcoff
2058Produce debugging information in XCOFF format (if that is supported).
2059This is the format used by the DBX debugger on IBM RS/6000 systems.
2060.TP
2061.B \-gxcoff+
2062Produce debugging information in XCOFF format (if that is supported),
2063using GNU extensions understood only by the GNU debugger (GDB).  The
2064use of these extensions is likely to make other debuggers crash or
2065refuse to read the program.
2066.TP
2067.B \-gdwarf
2068Produce debugging information in DWARF format (if that is supported).
2069This is the format used by SDB on most System V Release 4 systems.
2070.TP
2071.B \-gdwarf+
2072Produce debugging information in DWARF format (if that is supported),
2073using GNU extensions understood only by the GNU debugger (GDB).  The
2074use of these extensions is likely to make other debuggers crash or
2075refuse to read the program.
2076.PP
2077.BI "\-g" "level"
2078.br
2079.BI "\-ggdb" "level"
2080.br
2081.BI "\-gstabs" "level"
2082.br
2083.BI "\-gcoff" "level"
2084.BI "\-gxcoff" "level"
2085.TP
2086.BI "\-gdwarf" "level"
2087Request debugging information and also use \c
2088.I level\c
2089\& to specify how
2090much information.  The default level is 2.
2091.Sp
2092Level 1 produces minimal information, enough for making backtraces in
2093parts of the program that you don't plan to debug.  This includes
2094descriptions of functions and external variables, but no information
2095about local variables and no line numbers.
2096.Sp
2097Level 3 includes extra information, such as all the macro definitions
2098present in the program.  Some debuggers support macro expansion when
2099you use `\|\c
2100.B \-g3\c
2101\&\|'.
2102.TP
2103.B \-p
2104Generate extra code to write profile information suitable for the
2105analysis program \c
2106.B prof\c
2107\&.
2108.TP
2109.B \-pg
2110Generate extra code to write profile information suitable for the
2111analysis program \c
2112.B gprof\c
2113\&.
2114.TP
2115.B \-a
2116Generate extra code to write profile information for basic blocks,
2117which will record the number of times each basic block is executed.
2118This data could be analyzed by a program like \c
2119.B tcov\c
2120\&.  Note,
2121however, that the format of the data is not what \c
2122.B tcov\c
2123\& expects.
2124Eventually GNU \c
2125.B gprof\c
2126\& should be extended to process this data.
2127.TP
2128.BI "\-d" "letters"
2129Says to make debugging dumps during compilation at times specified by
2130.I letters\c
2131\&.  This is used for debugging the compiler.  The file names
2132for most of the dumps are made by appending a word to the source file
2133name (e.g.  `\|\c
2134.B foo.c.rtl\c
2135\&\|' or `\|\c
2136.B foo.c.jump\c
2137\&\|').
2138.TP
2139.B \-dM
2140Dump all macro definitions, at the end of preprocessing, and write no
2141output.
2142.TP
2143.B \-dN
2144Dump all macro names, at the end of preprocessing.
2145.TP
2146.B \-dD
2147Dump all macro definitions, at the end of preprocessing, in addition to
2148normal output.
2149.TP
2150.B \-dy
2151Dump debugging information during parsing, to standard error.
2152.TP
2153.B \-dr
2154Dump after RTL generation, to `\|\c
2155.I file\c
2156.B \&.rtl\c
2157\&\|'.
2158.TP
2159.B \-dx
2160Just generate RTL for a function instead of compiling it.  Usually used
2161with `\|\c
2162.B r\c
2163\&\|'.
2164.TP
2165.B \-dj
2166Dump after first jump optimization, to `\|\c
2167.I file\c
2168.B \&.jump\c
2169\&\|'.
2170.TP
2171.B \-ds
2172Dump after CSE (including the jump optimization that sometimes
2173follows CSE), to `\|\c
2174.I file\c
2175.B \&.cse\c
2176\&\|'.
2177.TP
2178.B \-dL
2179Dump after loop optimization, to `\|\c
2180.I file\c
2181.B \&.loop\c
2182\&\|'.
2183.TP
2184.B \-dt
2185Dump after the second CSE pass (including the jump optimization that
2186sometimes follows CSE), to `\|\c
2187.I file\c
2188.B \&.cse2\c
2189\&\|'.
2190.TP
2191.B \-df
2192Dump after flow analysis, to `\|\c
2193.I file\c
2194.B \&.flow\c
2195\&\|'.
2196.TP
2197.B \-dc
2198Dump after instruction combination, to `\|\c
2199.I file\c
2200.B \&.combine\c
2201\&\|'.
2202.TP
2203.B \-dS
2204Dump after the first instruction scheduling pass, to
2205`\|\c
2206.I file\c
2207.B \&.sched\c
2208\&\|'.
2209.TP
2210.B \-dl
2211Dump after local register allocation, to `\|\c
2212.I file\c
2213.B \&.lreg\c
2214\&\|'.
2215.TP
2216.B \-dg
2217Dump after global register allocation, to `\|\c
2218.I file\c
2219.B \&.greg\c
2220\&\|'.
2221.TP
2222.B \-dR
2223Dump after the second instruction scheduling pass, to
2224`\|\c
2225.I file\c
2226.B \&.sched2\c
2227\&\|'.
2228.TP
2229.B \-dJ
2230Dump after last jump optimization, to `\|\c
2231.I file\c
2232.B \&.jump2\c
2233\&\|'.
2234.TP
2235.B \-dd
2236Dump after delayed branch scheduling, to `\|\c
2237.I file\c
2238.B \&.dbr\c
2239\&\|'.
2240.TP
2241.B \-dk
2242Dump after conversion from registers to stack, to `\|\c
2243.I file\c
2244.B \&.stack\c
2245\&\|'.
2246.TP
2247.B \-da
2248Produce all the dumps listed above.
2249.TP
2250.B \-dm
2251Print statistics on memory usage, at the end of the run, to
2252standard error.
2253.TP
2254.B \-dp
2255Annotate the assembler output with a comment indicating which
2256pattern and alternative was used.
2257.TP
2258.B \-fpretend\-float
2259When running a cross-compiler, pretend that the target machine uses the
2260same floating point format as the host machine.  This causes incorrect
2261output of the actual floating constants, but the actual instruction
2262sequence will probably be the same as GNU CC would make when running on
2263the target machine.
2264.TP
2265.B \-save\-temps
2266Store the usual \*(lqtemporary\*(rq intermediate files permanently; place them
2267in the current directory and name them based on the source file.  Thus,
2268compiling `\|\c
2269.B foo.c\c
2270\&\|' with `\|\c
2271.B \-c \-save\-temps\c
2272\&\|' would produce files
2273`\|\c
2274.B foo.cpp\c
2275\&\|' and `\|\c
2276.B foo.s\c
2277\&\|', as well as `\|\c
2278.B foo.o\c
2279\&\|'.
2280.TP
2281.BI "\-print\-file\-name=" "library"
2282Print the full absolute name of the library file \|\c
2283.nh
2284.I library
2285.hy
2286\&\| that
2287would be used when linking\(em\&and do not do anything else.  With this
2288option, GNU CC does not compile or link anything; it just prints the
2289file name.
2290.TP
2291.B \-print\-libgcc\-file\-name
2292Same as `\|\c
2293.B \-print\-file\-name=libgcc.a\c
2294\&\|'.
2295.TP
2296.BI "\-print\-prog\-name=" "program"
2297Like `\|\c
2298.B \-print\-file\-name\c
2299\&\|', but searches for a program such as `\|\c
2300cpp\c
2301\&\|'.
2302.SH OPTIMIZATION OPTIONS
2303These options control various sorts of optimizations:
2304.TP
2305.B \-O
2306.TP
2307.B \-O1
2308Optimize.  Optimizing compilation takes somewhat more time, and a lot
2309more memory for a large function.
2310.Sp
2311Without `\|\c
2312.B \-O\c
2313\&\|', the compiler's goal is to reduce the cost of
2314compilation and to make debugging produce the expected results.
2315Statements are independent: if you stop the program with a breakpoint
2316between statements, you can then assign a new value to any variable or
2317change the program counter to any other statement in the function and
2318get exactly the results you would expect from the source code.
2319.Sp
2320Without `\|\c
2321.B \-O\c
2322\&\|', only variables declared \c
2323.B register\c
2324\& are
2325allocated in registers.  The resulting compiled code is a little worse
2326than produced by PCC without `\|\c
2327.B \-O\c
2328\&\|'.
2329.Sp
2330With `\|\c
2331.B \-O\c
2332\&\|', the compiler tries to reduce code size and execution
2333time.
2334.Sp
2335When you specify `\|\c
2336.B \-O\c
2337\&\|', the two options `\|\c
2338.B \-fthread\-jumps\c
2339\&\|' and `\|\c
2340.B \-fdefer\-pop\c
2341\&\|' are turned on.  On machines that have delay slots, the `\|\c
2342.B \-fdelayed\-branch\c
2343\&\|' option is turned on.  For those machines that can support debugging even
2344without a frame pointer, the `\|\c
2345.B \-fomit\-frame\-pointer\c
2346\&\|' option is turned on.  On some machines other flags may also be turned on.
2347.TP
2348.B \-O2
2349Optimize even more.  Nearly all supported optimizations that do not
2350involve a space-speed tradeoff are performed.  Loop unrolling and function
2351inlining are not done, for example.  As compared to
2352.B \-O\c
2353\&,
2354this option increases both compilation time and the performance of the
2355generated code.
2356.TP
2357.B \-O3
2358Optimize yet more. This turns on everything
2359.B \-O2
2360does, along with also turning on
2361.B \-finline\-functions.
2362.TP
2363.B \-O0
2364Do not optimize.
2365.Sp
2366If you use multiple
2367.B \-O
2368options, with or without level numbers, the last such option is the
2369one that is effective.
2370.PP
2371Options of the form `\|\c
2372.B \-f\c
2373.I flag\c
2374\&\c
2375\&\|' specify machine-independent
2376flags.  Most flags have both positive and negative forms; the negative
2377form of `\|\c
2378.B \-ffoo\c
2379\&\|' would be `\|\c
2380.B \-fno\-foo\c
2381\&\|'.  The following list shows
2382only one form\(em\&the one which is not the default.
2383You can figure out the other form by either removing `\|\c
2384.B no\-\c
2385\&\|' or
2386adding it.
2387.TP
2388.B \-ffloat\-store
2389Do not store floating point variables in registers.  This
2390prevents undesirable excess precision on machines such as the
239168000 where the floating registers (of the 68881) keep more
2392precision than a \c
2393.B double\c
2394\& is supposed to have.
2395.Sp
2396For most programs, the excess precision does only good, but a few
2397programs rely on the precise definition of IEEE floating point.
2398Use `\|\c
2399.B \-ffloat\-store\c
2400\&\|' for such programs.
2401.TP
2402.B \-fmemoize\-lookups
2403.TP
2404.B \-fsave\-memoized
2405Use heuristics to compile faster (C++ only).  These heuristics are not
2406enabled by default, since they are only effective for certain input
2407files.  Other input files compile more slowly.
2408.Sp
2409The first time the compiler must build a call to a member function (or
2410reference to a data member), it must (1) determine whether the class
2411implements member functions of that name; (2) resolve which member
2412function to call (which involves figuring out what sorts of type
2413conversions need to be made); and (3) check the visibility of the member
2414function to the caller.  All of this adds up to slower compilation.
2415Normally, the second time a call is made to that member function (or
2416reference to that data member), it must go through the same lengthy
2417process again.  This means that code like this
2418.Sp
2419\&  cout << "This " << p << " has " << n << " legs.\en";
2420.Sp
2421makes six passes through all three steps.  By using a software cache,
2422a \*(lqhit\*(rq significantly reduces this cost.  Unfortunately, using the
2423cache introduces another layer of mechanisms which must be implemented,
2424and so incurs its own overhead.  `\|\c
2425.B \-fmemoize\-lookups\c
2426\&\|' enables
2427the software cache.
2428.Sp
2429Because access privileges (visibility) to members and member functions
2430may differ from one function context to the next,
2431.B g++
2432may need to flush the cache.  With the `\|\c
2433.B \-fmemoize\-lookups\c
2434\&\|' flag, the cache is flushed after every
2435function that is compiled.  The `\|\c
2436\-fsave\-memoized\c
2437\&\|' flag enables the same software cache, but when the compiler
2438determines that the context of the last function compiled would yield
2439the same access privileges of the next function to compile, it
2440preserves the cache.
2441This is most helpful when defining many member functions for the same
2442class: with the exception of member functions which are friends of
2443other classes, each member function has exactly the same access
2444privileges as every other, and the cache need not be flushed.
2445.TP
2446.B \-fno\-default\-inline
2447Don't make member functions inline by default merely because they are
2448defined inside the class scope (C++ only).
2449.TP
2450.B \-fno\-defer\-pop
2451Always pop the arguments to each function call as soon as that
2452function returns.  For machines which must pop arguments after a
2453function call, the compiler normally lets arguments accumulate on the
2454stack for several function calls and pops them all at once.
2455.TP
2456.B \-fforce\-mem
2457Force memory operands to be copied into registers before doing
2458arithmetic on them.  This may produce better code by making all
2459memory references potential common subexpressions.  When they are
2460not common subexpressions, instruction combination should
2461eliminate the separate register-load.  I am interested in hearing
2462about the difference this makes.
2463.TP
2464.B \-fforce\-addr
2465Force memory address constants to be copied into registers before
2466doing arithmetic on them.  This may produce better code just as
2467`\|\c
2468.B \-fforce\-mem\c
2469\&\|' may.  I am interested in hearing about the
2470difference this makes.
2471.TP
2472.B \-fomit\-frame\-pointer
2473Don't keep the frame pointer in a register for functions that
2474don't need one.  This avoids the instructions to save, set up and
2475restore frame pointers; it also makes an extra register available
2476in many functions.  \c
2477.I It also makes debugging impossible on most machines\c
2478\&.
2479.Sp
2480On some machines, such as the Vax, this flag has no effect, because
2481the standard calling sequence automatically handles the frame pointer
2482and nothing is saved by pretending it doesn't exist.  The
2483machine-description macro \c
2484.B FRAME_POINTER_REQUIRED\c
2485\& controls
2486whether a target machine supports this flag.
2487.TP
2488.B \-finline\-functions
2489Integrate all simple functions into their callers.  The compiler
2490heuristically decides which functions are simple enough to be worth
2491integrating in this way.
2492.Sp
2493If all calls to a given function are integrated, and the function is
2494declared \c
2495.B static\c
2496\&, then GCC normally does not output the function as
2497assembler code in its own right.
2498.TP
2499.B \-fcaller\-saves
2500Enable values to be allocated in registers that will be clobbered by
2501function calls, by emitting extra instructions to save and restore the
2502registers around such calls.  Such allocation is done only when it
2503seems to result in better code than would otherwise be produced.
2504.Sp
2505This option is enabled by default on certain machines, usually those
2506which have no call-preserved registers to use instead.
2507.TP
2508.B \-fkeep\-inline\-functions
2509Even if all calls to a given function are integrated, and the function
2510is declared \c
2511.B static\c
2512\&, nevertheless output a separate run-time
2513callable version of the function.
2514.TP
2515.B \-fno\-function\-cse
2516Do not put function addresses in registers; make each instruction that
2517calls a constant function contain the function's address explicitly.
2518.Sp
2519This option results in less efficient code, but some strange hacks
2520that alter the assembler output may be confused by the optimizations
2521performed when this option is not used.
2522.TP
2523.B \-fno\-peephole
2524Disable any machine-specific peephole optimizations.
2525.TP
2526.B \-ffast-math
2527This option allows GCC to violate some ANSI or IEEE rules/specifications
2528in the interest of optimizing code for speed.  For example, it allows
2529the compiler to assume arguments to the \c
2530.B sqrt\c
2531\& function are
2532non-negative numbers.
2533.Sp
2534This option should never be turned on by any `\|\c
2535.B \-O\c
2536\&\|' option since
2537it can result in incorrect output for programs which depend on
2538an exact implementation of IEEE or ANSI rules/specifications for
2539math functions.
2540.PP
2541The following options control specific optimizations.  The `\|\c
2542.B \-O2\c
2543\&\|'
2544option turns on all of these optimizations except `\|\c
2545.B \-funroll\-loops\c
2546\&\|'
2547and `\|\c
2548.B \-funroll\-all\-loops\c
2549\&\|'.
2550.PP
2551The `\|\c
2552.B \-O\c
2553\&\|' option usually turns on
2554the `\|\c
2555.B \-fthread\-jumps\c
2556\&\|' and `\|\c
2557.B \-fdelayed\-branch\c
2558\&\|' options, but
2559specific machines may change the default optimizations.
2560.PP
2561You can use the following flags in the rare cases when \*(lqfine-tuning\*(rq
2562of optimizations to be performed is desired.
2563.TP
2564.B \-fstrength\-reduce
2565Perform the optimizations of loop strength reduction and
2566elimination of iteration variables.
2567.TP
2568.B \-fthread\-jumps
2569Perform optimizations where we check to see if a jump branches to a
2570location where another comparison subsumed by the first is found.  If
2571so, the first branch is redirected to either the destination of the
2572second branch or a point immediately following it, depending on whether
2573the condition is known to be true or false.
2574.TP
2575.B \-funroll\-loops
2576Perform the optimization of loop unrolling.  This is only done for loops
2577whose number of iterations can be determined at compile time or run time.
2578.TP
2579.B \-funroll\-all\-loops
2580Perform the optimization of loop unrolling.  This is done for all loops.
2581This usually makes programs run more slowly.
2582.TP
2583.B \-fcse\-follow\-jumps
2584In common subexpression elimination, scan through jump instructions
2585when the target of the jump is not reached by any other path.  For
2586example, when CSE encounters an \c
2587.B if\c
2588\& statement with an
2589.B else\c
2590\& clause, CSE will follow the jump when the condition
2591tested is false.
2592.TP
2593.B \-fcse\-skip\-blocks
2594This is similar to `\|\c
2595.B \-fcse\-follow\-jumps\c
2596\&\|', but causes CSE to
2597follow jumps which conditionally skip over blocks.  When CSE
2598encounters a simple \c
2599.B if\c
2600\& statement with no else clause,
2601`\|\c
2602.B \-fcse\-skip\-blocks\c
2603\&\|' causes CSE to follow the jump around the
2604body of the \c
2605.B if\c
2606\&.
2607.TP
2608.B \-frerun\-cse\-after\-loop
2609Re-run common subexpression elimination after loop optimizations has been
2610performed.
2611.TP
2612.B \-felide\-constructors
2613Elide constructors when this seems plausible (C++ only).  With this
2614flag, GNU C++ initializes \c
2615.B y\c
2616\& directly from the call to \c
2617.B foo
2618without going through a temporary in the following code:
2619.Sp
2620A foo ();
2621A y = foo ();
2622.Sp
2623Without this option, GNU C++ first initializes \c
2624.B y\c
2625\& by calling the
2626appropriate constructor for type \c
2627.B A\c
2628\&; then assigns the result of
2629.B foo\c
2630\& to a temporary; and, finally, replaces the initial value of
2631`\|\c
2632.B y\c
2633\&\|' with the temporary.
2634.Sp
2635The default behavior (`\|\c
2636.B \-fno\-elide\-constructors\c
2637\&\|') is specified by
2638the draft ANSI C++ standard.  If your program's constructors have side
2639effects, using `\|\c
2640.B \-felide-constructors\c
2641\&\|' can make your program act
2642differently, since some constructor calls may be omitted.
2643.TP
2644.B \-fexpensive\-optimizations
2645Perform a number of minor optimizations that are relatively expensive.
2646.TP
2647.B \-fdelayed\-branch
2648If supported for the target machine, attempt to reorder instructions
2649to exploit instruction slots available after delayed branch
2650instructions.
2651.TP
2652.B \-fschedule\-insns
2653If supported for the target machine, attempt to reorder instructions to
2654eliminate execution stalls due to required data being unavailable.  This
2655helps machines that have slow floating point or memory load instructions
2656by allowing other instructions to be issued until the result of the load
2657or floating point instruction is required.
2658.TP
2659.B \-fschedule\-insns2
2660Similar to `\|\c
2661.B \-fschedule\-insns\c
2662\&\|', but requests an additional pass of
2663instruction scheduling after register allocation has been done.  This is
2664especially useful on machines with a relatively small number of
2665registers and where memory load instructions take more than one cycle.
2666.SH TARGET OPTIONS
2667By default, GNU CC compiles code for the same type of machine that you
2668are using.  However, it can also be installed as a cross-compiler, to
2669compile for some other type of machine.  In fact, several different
2670configurations of GNU CC, for different target machines, can be
2671installed side by side.  Then you specify which one to use with the
2672`\|\c
2673.B \-b\c
2674\&\|' option.
2675.PP
2676In addition, older and newer versions of GNU CC can be installed side
2677by side.  One of them (probably the newest) will be the default, but
2678you may sometimes wish to use another.
2679.TP
2680.BI "\-b " "machine"
2681The argument \c
2682.I machine\c
2683\& specifies the target machine for compilation.
2684This is useful when you have installed GNU CC as a cross-compiler.
2685.Sp
2686The value to use for \c
2687.I machine\c
2688\& is the same as was specified as the
2689machine type when configuring GNU CC as a cross-compiler.  For
2690example, if a cross-compiler was configured with `\|\c
2691.B configure
2692i386v\c
2693\&\|', meaning to compile for an 80386 running System V, then you
2694would specify `\|\c
2695.B \-b i386v\c
2696\&\|' to run that cross compiler.
2697.Sp
2698When you do not specify `\|\c
2699.B \-b\c
2700\&\|', it normally means to compile for
2701the same type of machine that you are using.
2702.TP
2703.BI "\-V " "version"
2704The argument \c
2705.I version\c
2706\& specifies which version of GNU CC to run.
2707This is useful when multiple versions are installed.  For example,
2708.I version\c
2709\& might be `\|\c
2710.B 2.0\c
2711\&\|', meaning to run GNU CC version 2.0.
2712.Sp
2713The default version, when you do not specify `\|\c
2714.B \-V\c
2715\&\|', is controlled
2716by the way GNU CC is installed.  Normally, it will be a version that
2717is recommended for general use.
2718.SH MACHINE DEPENDENT OPTIONS
2719Each of the target machine types can have its own special options,
2720starting with `\|\c
2721.B \-m\c
2722\&\|', to choose among various hardware models or
2723configurations\(em\&for example, 68010 vs 68020, floating coprocessor or
2724none.  A single installed version of the compiler can compile for any
2725model or configuration, according to the options specified.
2726.PP
2727Some configurations of the compiler also support additional special
2728options, usually for command-line compatibility with other compilers on
2729the same platform.
2730.PP
2731These are the `\|\c
2732.B \-m\c
2733\&\|' options defined for the 68000 series:
2734.TP
2735.B \-m68000
2736.TP
2737.B \-mc68000
2738Generate output for a 68000.  This is the default when the compiler is
2739configured for 68000-based systems.
2740.TP
2741.B \-m68020
2742.TP
2743.B \-mc68020
2744Generate output for a 68020 (rather than a 68000).  This is the
2745default when the compiler is configured for 68020-based systems.
2746.TP
2747.B \-m68881
2748Generate output containing 68881 instructions for floating point.
2749This is the default for most 68020-based systems unless
2750.B \-nfp
2751was specified when the compiler was configured.
2752.TP
2753.B \-m68030
2754Generate output for a 68030.  This is the default when the compiler is
2755configured for 68030-based systems.
2756.TP
2757.B \-m68040
2758Generate output for a 68040.  This is the default when the compiler is
2759configured for 68040-based systems.
2760.TP
2761.B \-m68020\-40
2762Generate output for a 68040, without using any of the new instructions.
2763This results in code which can run relatively efficiently on either a
276468020/68881 or a 68030 or a 68040.
2765.TP
2766.B \-mfpa
2767Generate output containing Sun FPA instructions for floating point.
2768.TP
2769.B \-msoft\-float
2770Generate output containing library calls for floating point.
2771.I
2772WARNING:
2773the requisite libraries are not part of GNU CC.  Normally the
2774facilities of the machine's usual C compiler are used, but this can't
2775be done directly in cross-compilation.  You must make your own
2776arrangements to provide suitable library functions for cross-compilation.
2777.TP
2778.B \-mshort
2779Consider type \c
2780.B int\c
2781\& to be 16 bits wide, like \c
2782.B short int\c
2783\&.
2784.TP
2785.B \-mnobitfield
2786Do not use the bit-field instructions.  `\|\c
2787.B \-m68000\c
2788\&\|' implies
2789`\|\c
2790.B \-mnobitfield\c
2791\&\|'.
2792.TP
2793.B \-mbitfield
2794Do use the bit-field instructions.  `\|\c
2795.B \-m68020\c
2796\&\|' implies
2797`\|\c
2798.B \-mbitfield\c
2799\&\|'.  This is the default if you use the unmodified
2800sources.
2801.TP
2802.B \-mrtd
2803Use a different function-calling convention, in which functions
2804that take a fixed number of arguments return with the \c
2805.B rtd
2806instruction, which pops their arguments while returning.  This
2807saves one instruction in the caller since there is no need to pop
2808the arguments there.
2809.Sp
2810This calling convention is incompatible with the one normally
2811used on Unix, so you cannot use it if you need to call libraries
2812compiled with the Unix compiler.
2813.Sp
2814Also, you must provide function prototypes for all functions that
2815take variable numbers of arguments (including \c
2816.B printf\c
2817\&);
2818otherwise incorrect code will be generated for calls to those
2819functions.
2820.Sp
2821In addition, seriously incorrect code will result if you call a
2822function with too many arguments.  (Normally, extra arguments are
2823harmlessly ignored.)
2824.Sp
2825The \c
2826.B rtd\c
2827\& instruction is supported by the 68010 and 68020
2828processors, but not by the 68000.
2829.PP
2830These `\|\c
2831.B \-m\c
2832\&\|' options are defined for the Vax:
2833.TP
2834.B \-munix
2835Do not output certain jump instructions (\c
2836.B aobleq\c
2837\& and so on)
2838that the Unix assembler for the Vax cannot handle across long
2839ranges.
2840.TP
2841.B \-mgnu
2842Do output those jump instructions, on the assumption that you
2843will assemble with the GNU assembler.
2844.TP
2845.B \-mg
2846Output code for g-format floating point numbers instead of d-format.
2847.PP
2848These `\|\c
2849.B \-m\c
2850\&\|' switches are supported on the SPARC:
2851.PP
2852.B \-mfpu
2853.TP
2854.B \-mhard\-float
2855Generate output containing floating point instructions.  This is the
2856default.
2857.PP
2858.B \-mno\-fpu
2859.TP
2860.B \-msoft\-float
2861Generate output containing library calls for floating point.
2862.I Warning:
2863there is no GNU floating-point library for SPARC.
2864Normally the facilities of the machine's usual C compiler are used, but
2865this cannot be done directly in cross-compilation.  You must make your
2866own arrangements to provide suitable library functions for
2867cross-compilation.
2868.Sp
2869.B \-msoft\-float
2870changes the calling convention in the output file;
2871therefore, it is only useful if you compile
2872.I all
2873of a program with this option.
2874.PP
2875.B \-mno\-epilogue
2876.TP
2877.B \-mepilogue
2878With
2879.B \-mepilogue
2880(the default), the compiler always emits code for
2881function exit at the end of each function.  Any function exit in
2882the middle of the function (such as a return statement in C) will
2883generate a jump to the exit code at the end of the function.
2884.Sp
2885With
2886.BR \-mno\-epilogue ,
2887the compiler tries to emit exit code inline at every function exit.
2888.PP
2889.B \-mno\-v8
2890.TP
2891.B \-mv8
2892.TP
2893.B \-msparclite
2894These three options select variations on the SPARC architecture.
2895.Sp
2896By default (unless specifically configured for the Fujitsu SPARClite),
2897GCC generates code for the v7 variant of the SPARC architecture.
2898.Sp
2899.B \-mv8
2900will give you SPARC v8 code.  The only difference from v7
2901code is that the compiler emits the integer multiply and integer
2902divide instructions which exist in SPARC v8 but not in SPARC v7.
2903.Sp
2904.B \-msparclite
2905will give you SPARClite code.  This adds the integer
2906multiply, integer divide step and scan (ffs) instructions which
2907exist in SPARClite but not in SPARC v7.
2908.PP
2909.B \-mcypress
2910.TP
2911.B \-msupersparc
2912These two options select the processor for which the code is optimised.
2913.Sp
2914With
2915.B \-mcypress
2916(the default), the compiler optimises code for the Cypress CY7C602 chip, as
2917used in the SparcStation/SparcServer 3xx series. This is also appropriate for
2918the older SparcStation 1, 2, IPX etc.
2919.Sp
2920With
2921.B \-msupersparc
2922the compiler optimises code for the SuperSparc cpu, as used in the SparcStation
292310, 1000 and 2000 series. This flag also enables use of the full SPARC v8
2924instruction set.
2925.PP
2926These `\|\c
2927.B \-m\c
2928\&\|' options are defined for the Convex:
2929.TP
2930.B \-mc1
2931Generate output for a C1.  This is the default when the compiler is
2932configured for a C1.
2933.TP
2934.B \-mc2
2935Generate output for a C2.  This is the default when the compiler is
2936configured for a C2.
2937.TP
2938.B \-margcount
2939Generate code which puts an argument count in the word preceding each
2940argument list.  Some nonportable Convex and Vax programs need this word.
2941(Debuggers don't, except for functions with variable-length argument
2942lists; this info is in the symbol table.)
2943.TP
2944.B \-mnoargcount
2945Omit the argument count word.  This is the default if you use the
2946unmodified sources.
2947.PP
2948These `\|\c
2949.B \-m\c
2950\&\|' options are defined for the AMD Am29000:
2951.TP
2952.B \-mdw
2953Generate code that assumes the DW bit is set, i.e., that byte and
2954halfword operations are directly supported by the hardware.  This is the
2955default.
2956.TP
2957.B \-mnodw
2958Generate code that assumes the DW bit is not set.
2959.TP
2960.B \-mbw
2961Generate code that assumes the system supports byte and halfword write
2962operations.  This is the default.
2963.TP
2964.B \-mnbw
2965Generate code that assumes the systems does not support byte and
2966halfword write operations.  This implies `\|\c
2967.B \-mnodw\c
2968\&\|'.
2969.TP
2970.B \-msmall
2971Use a small memory model that assumes that all function addresses are
2972either within a single 256 KB segment or at an absolute address of less
2973than 256K.  This allows the \c
2974.B call\c
2975\& instruction to be used instead
2976of a \c
2977.B const\c
2978\&, \c
2979.B consth\c
2980\&, \c
2981.B calli\c
2982\& sequence.
2983.TP
2984.B \-mlarge
2985Do not assume that the \c
2986.B call\c
2987\& instruction can be used; this is the
2988default.
2989.TP
2990.B \-m29050
2991Generate code for the Am29050.
2992.TP
2993.B \-m29000
2994Generate code for the Am29000.  This is the default.
2995.TP
2996.B \-mkernel\-registers
2997Generate references to registers \c
2998.B gr64-gr95\c
2999\& instead of
3000.B gr96-gr127\c
3001\&.  This option can be used when compiling kernel code
3002that wants a set of global registers disjoint from that used by
3003user-mode code.
3004.Sp
3005Note that when this option is used, register names in `\|\c
3006.B \-f\c
3007\&\|' flags
3008must use the normal, user-mode, names.
3009.TP
3010.B \-muser\-registers
3011Use the normal set of global registers, \c
3012.B gr96-gr127\c
3013\&.  This is the
3014default.
3015.TP
3016.B \-mstack\-check
3017Insert a call to \c
3018.B _\|_msp_check\c
3019\& after each stack adjustment.  This
3020is often used for kernel code.
3021.PP
3022These `\|\c
3023.B \-m\c
3024\&\|' options are defined for Motorola 88K architectures:
3025.TP
3026.B \-m88000
3027Generate code that works well on both the m88100 and the
3028m88110.
3029.TP
3030.B \-m88100
3031Generate code that works best for the m88100, but that also
3032runs on the m88110.
3033.TP
3034.B \-m88110
3035Generate code that works best for the m88110, and may not run
3036on the m88100.
3037.TP
3038.B \-midentify\-revision
3039Include an \c
3040.B ident\c
3041\& directive in the assembler output recording the
3042source file name, compiler name and version, timestamp, and compilation
3043flags used.
3044.TP
3045.B \-mno\-underscores
3046In assembler output, emit symbol names without adding an underscore
3047character at the beginning of each name.  The default is to use an
3048underscore as prefix on each name.
3049.TP
3050.B \-mno\-check\-zero\-division
3051.TP
3052.B \-mcheck\-zero\-division
3053Early models of the 88K architecture had problems with division by zero;
3054in particular, many of them didn't trap.  Use these options to avoid
3055including (or to include explicitly) additional code to detect division
3056by zero and signal an exception.  All GCC configurations for the 88K use
3057`\|\c
3058.B \-mcheck\-zero\-division\c
3059\&\|' by default.
3060.TP
3061.B \-mocs\-debug\-info
3062.TP
3063.B \-mno\-ocs\-debug\-info
3064Include (or omit) additional debugging information (about
3065registers used in each stack frame) as specified in the 88Open Object
3066Compatibility Standard, \*(lqOCS\*(rq.  This extra information is not needed
3067by GDB.  The default for DG/UX, SVr4, and Delta 88 SVr3.2 is to
3068include this information; other 88k configurations omit this information
3069by default.
3070.TP
3071.B \-mocs\-frame\-position
3072.TP
3073.B \-mno\-ocs\-frame\-position
3074Force (or do not require) register values to be stored in a particular
3075place in stack frames, as specified in OCS.  The DG/UX, Delta88 SVr3.2,
3076and BCS configurations use `\|\c
3077.B \-mocs\-frame\-position\c
3078\&\|'; other 88k
3079configurations have the default `\|\c
3080.B \-mno\-ocs\-frame\-position\c
3081\&\|'.
3082.TP
3083.B \-moptimize\-arg\-area
3084.TP
3085.B \-mno\-optimize\-arg\-area
3086Control how to store function arguments in stack frames.
3087`\|\c
3088.B \-moptimize\-arg\-area\c
3089\&\|' saves space, but may break some
3090debuggers (not GDB).  `\|\c
3091.B \-mno\-optimize\-arg\-area\c
3092\&\|' conforms better to
3093standards.   By default GCC does not optimize the argument area.
3094.TP
3095.BI "\-mshort\-data\-" "num"
3096.I num
3097Generate smaller data references by making them relative to \c
3098.B r0\c
3099\&,
3100which allows loading a value using a single instruction (rather than the
3101usual two).  You control which data references are affected by
3102specifying \c
3103.I num\c
3104\& with this option.  For example, if you specify
3105`\|\c
3106.B \-mshort\-data\-512\c
3107\&\|', then the data references affected are those
3108involving displacements of less than 512 bytes.
3109`\|\c
3110.B \-mshort\-data\-\c
3111.I num\c
3112\&\c
3113\&\|' is not effective for \c
3114.I num\c
3115\& greater
3116than 64K.
3117.PP
3118.B \-mserialize-volatile
3119.TP
3120.B \-mno-serialize-volatile
3121Do, or do not, generate code to guarantee sequential consistency of
3122volatile memory references.
3123.Sp
3124GNU CC always guarantees consistency by default, for the preferred
3125processor submodel.  How this is done depends on the submodel.
3126.Sp
3127The m88100 processor does not reorder memory references and so always
3128provides sequential consistency.  If you use `\|\c
3129.B \-m88100\c
3130\&\|', GNU CC does
3131not generate any special instructions for sequential consistency.
3132.Sp
3133The order of memory references made by the m88110 processor does not
3134always match the order of the instructions requesting those references.
3135In particular, a load instruction may execute before a preceding store
3136instruction.  Such reordering violates sequential consistency of
3137volatile memory references, when there are multiple processors.  When
3138you use `\|\c
3139.B \-m88000\c
3140\&\|' or `\|\c
3141.B \-m88110\c
3142\&\|', GNU CC generates special
3143instructions when appropriate, to force execution in the proper order.
3144.Sp
3145The extra code generated to guarantee consistency may affect the
3146performance of your application.  If you know that you can safely forgo
3147this guarantee, you may use the option `\|\c
3148.B \-mno-serialize-volatile\c
3149\&\|'.
3150.Sp
3151If you use the `\|\c
3152.B \-m88100\c
3153\&\|' option but require sequential consistency
3154when running on the m88110 processor, you should use
3155`\|\c
3156.B \-mserialize-volatile\c
3157\&\|'.
3158.PP
3159.B \-msvr4
3160.TP
3161.B \-msvr3
3162Turn on (`\|\c
3163.B \-msvr4\c
3164\&\|') or off (`\|\c
3165.B \-msvr3\c
3166\&\|') compiler extensions
3167related to System V release 4 (SVr4).  This controls the following:
3168.TP
3169\ \ \ \(bu
3170Which variant of the assembler syntax to emit (which you can select
3171independently using `\|\c
3172.B \-mversion\-03.00\c
3173\&\|').
3174.TP
3175\ \ \ \(bu
3176`\|\c
3177.B \-msvr4\c
3178\&\|' makes the C preprocessor recognize `\|\c
3179.B #pragma weak\c
3180\&\|'
3181.TP
3182\ \ \ \(bu
3183`\|\c
3184.B \-msvr4\c
3185\&\|' makes GCC issue additional declaration directives used in
3186SVr4.
3187.PP
3188`\|\c
3189.B \-msvr3\c
3190\&\|' is the default for all m88K configurations except
3191the SVr4 configuration.
3192.TP
3193.B \-mtrap\-large\-shift
3194.TP
3195.B \-mhandle\-large\-shift
3196Include code to detect bit-shifts of more than 31 bits; respectively,
3197trap such shifts or emit code to handle them properly.  By default GCC
3198makes no special provision for large bit shifts.
3199.TP
3200.B \-muse\-div\-instruction
3201Very early models of the 88K architecture didn't have a divide
3202instruction, so GCC avoids that instruction by default.  Use this option
3203to specify that it's safe to use the divide instruction.
3204.TP
3205.B \-mversion\-03.00
3206In the DG/UX configuration, there are two flavors of SVr4.  This option
3207modifies
3208.B \-msvr4
3209to select whether the hybrid-COFF or real-ELF
3210flavor is used.  All other configurations ignore this option.
3211.TP
3212.B \-mwarn\-passed\-structs
3213Warn when a function passes a struct as an argument or result.
3214Structure-passing conventions have changed during the evolution of the C
3215language, and are often the source of portability problems.  By default,
3216GCC issues no such warning.
3217.PP
3218These options are defined for the IBM RS6000:
3219.PP
3220.B \-mfp\-in\-toc
3221.TP
3222.B \-mno\-fp\-in\-toc
3223Control whether or not floating-point constants go in the Table of
3224Contents (TOC), a table of all global variable and function addresses.  By
3225default GCC puts floating-point constants there; if the TOC overflows,
3226`\|\c
3227.B \-mno\-fp\-in\-toc\c
3228\&\|' will reduce the size of the TOC, which may avoid
3229the overflow.
3230.PP
3231These `\|\c
3232.B \-m\c
3233\&\|' options are defined for the IBM RT PC:
3234.TP
3235.B \-min\-line\-mul
3236Use an in-line code sequence for integer multiplies.  This is the
3237default.
3238.TP
3239.B \-mcall\-lib\-mul
3240Call \c
3241.B lmul$$\c
3242\& for integer multiples.
3243.TP
3244.B \-mfull\-fp\-blocks
3245Generate full-size floating point data blocks, including the minimum
3246amount of scratch space recommended by IBM.  This is the default.
3247.TP
3248.B \-mminimum\-fp\-blocks
3249Do not include extra scratch space in floating point data blocks.  This
3250results in smaller code, but slower execution, since scratch space must
3251be allocated dynamically.
3252.TP
3253.B \-mfp\-arg\-in\-fpregs
3254Use a calling sequence incompatible with the IBM calling convention in
3255which floating point arguments are passed in floating point registers.
3256Note that \c
3257.B varargs.h\c
3258\& and \c
3259.B stdargs.h\c
3260\& will not work with
3261floating point operands if this option is specified.
3262.TP
3263.B \-mfp\-arg\-in\-gregs
3264Use the normal calling convention for floating point arguments.  This is
3265the default.
3266.TP
3267.B \-mhc\-struct\-return
3268Return structures of more than one word in memory, rather than in a
3269register.  This provides compatibility with the MetaWare HighC (hc)
3270compiler.  Use `\|\c
3271.B \-fpcc\-struct\-return\c
3272\&\|' for compatibility with the
3273Portable C Compiler (pcc).
3274.TP
3275.B \-mnohc\-struct\-return
3276Return some structures of more than one word in registers, when
3277convenient.  This is the default.  For compatibility with the
3278IBM-supplied compilers, use either `\|\c
3279.B \-fpcc\-struct\-return\c
3280\&\|' or
3281`\|\c
3282.B \-mhc\-struct\-return\c
3283\&\|'.
3284.PP
3285These `\|\c
3286.B \-m\c
3287\&\|' options are defined for the MIPS family of computers:
3288.TP
3289.BI "\-mcpu=" "cpu-type"
3290Assume the defaults for the machine type
3291.I cpu-type
3292when
3293scheduling instructions.  The default
3294.I cpu-type
3295is
3296.BR default ,
3297which picks the longest cycles times for any of the machines, in order
3298that the code run at reasonable rates on all MIPS cpu's.  Other
3299choices for
3300.I cpu-type
3301are
3302.BR r2000 ,
3303.BR r3000 ,
3304.BR r4000 ,
3305and
3306.BR r6000 .
3307While picking a specific
3308.I cpu-type
3309will schedule things appropriately for that particular chip, the
3310compiler will not generate any code that does not meet level 1 of the
3311MIPS ISA (instruction set architecture) without the
3312.B \-mips2
3313or
3314.B \-mips3
3315switches being used.
3316.TP
3317.B \-mips2
3318Issue instructions from level 2 of the MIPS ISA (branch likely, square
3319root instructions).  The
3320.B \-mcpu=r4000
3321or
3322.B \-mcpu=r6000
3323switch must be used in conjunction with
3324.BR \-mips2 .
3325.TP
3326.B \-mips3
3327Issue instructions from level 3 of the MIPS ISA (64 bit instructions).
3328The
3329.B \-mcpu=r4000
3330switch must be used in conjunction with
3331.BR \-mips2 .
3332.TP
3333.B \-mint64
3334.TP
3335.B \-mlong64
3336.TP
3337.B \-mlonglong128
3338These options don't work at present.
3339.TP
3340.B \-mmips\-as
3341Generate code for the MIPS assembler, and invoke
3342.B mips\-tfile
3343to add normal debug information.  This is the default for all
3344platforms except for the OSF/1 reference platform, using the OSF/rose
3345object format.  If any of the
3346.BR \-ggdb ,
3347.BR \-gstabs ,
3348or
3349.B \-gstabs+
3350switches are used, the
3351.B mips\-tfile
3352program will encapsulate the stabs within MIPS ECOFF.
3353.TP
3354.B \-mgas
3355Generate code for the GNU assembler.  This is the default on the OSF/1
3356reference platform, using the OSF/rose object format.
3357.TP
3358.B \-mrnames
3359.TP
3360.B \-mno\-rnames
3361The
3362.B \-mrnames
3363switch says to output code using the MIPS software names for the
3364registers, instead of the hardware names (ie,
3365.B a0
3366instead of
3367.BR $4 ).
3368The GNU assembler does not support the
3369.B \-mrnames
3370switch, and the MIPS assembler will be instructed to run the MIPS C
3371preprocessor over the source file.  The
3372.B \-mno\-rnames
3373switch is default.
3374.TP
3375.B \-mgpopt
3376.TP
3377.B \-mno\-gpopt
3378The
3379.B \-mgpopt
3380switch says to write all of the data declarations before the
3381instructions in the text section, to all the MIPS assembler to
3382generate one word memory references instead of using two words for
3383short global or static data items.  This is on by default if
3384optimization is selected.
3385.TP
3386.B \-mstats
3387.TP
3388.B \-mno\-stats
3389For each non-inline function processed, the
3390.B \-mstats
3391switch causes the compiler to emit one line to the standard error file
3392to print statistics about the program (number of registers saved,
3393stack size, etc.).
3394.TP
3395.B \-mmemcpy
3396.TP
3397.B \-mno\-memcpy
3398The
3399.B \-mmemcpy
3400switch makes all block moves call the appropriate string function
3401.RB ( memcpy
3402or
3403.BR bcopy )
3404instead of possibly generating inline code.
3405.TP
3406.B \-mmips\-tfile
3407.TP
3408.B \-mno\-mips\-tfile
3409The
3410.B \-mno\-mips\-tfile
3411switch causes the compiler not postprocess the object file with the
3412.B mips\-tfile
3413program, after the MIPS assembler has generated it to add debug
3414support.  If
3415.B mips\-tfile
3416is not run, then no local variables will be available to the debugger.
3417In addition,
3418.B stage2
3419and
3420.B stage3
3421objects will have the temporary file names passed to the assembler
3422embedded in the object file, which means the objects will not compare
3423the same.
3424.TP
3425.B \-msoft\-float
3426Generate output containing library calls for floating point.
3427.I
3428WARNING:
3429the requisite libraries are not part of GNU CC.  Normally the
3430facilities of the machine's usual C compiler are used, but this can't
3431be done directly in cross-compilation.  You must make your own
3432arrangements to provide suitable library functions for cross-compilation.
3433.TP
3434.B \-mhard\-float
3435Generate output containing floating point instructions.  This is the
3436default if you use the unmodified sources.
3437.TP
3438.B \-mfp64
3439Assume that the
3440.B FR
3441bit in the status word is on, and that there are 32 64-bit floating
3442point registers, instead of 32 32-bit floating point registers.  You
3443must also specify the
3444.B \-mcpu=r4000
3445and
3446.B \-mips3
3447switches.
3448.TP
3449.B \-mfp32
3450Assume that there are 32 32-bit floating point registers.  This is the
3451default.
3452.PP
3453.B \-mabicalls
3454.TP
3455.B \-mno\-abicalls
3456Emit (or do not emit) the
3457.BR \&.abicalls ,
3458.BR \&.cpload ,
3459and
3460.B \&.cprestore
3461pseudo operations that some System V.4 ports use for position
3462independent code.
3463.TP
3464.B \-mhalf\-pic
3465.TP
3466.B \-mno\-half\-pic
3467The
3468.B \-mhalf\-pic
3469switch says to put pointers to extern references into the data section
3470and load them up, rather than put the references in the text section.
3471This option does not work at present.
3472.B
3473.BI \-G num
3474Put global and static items less than or equal to
3475.I num
3476bytes into the small data or bss sections instead of the normal data
3477or bss section.  This allows the assembler to emit one word memory
3478reference instructions based on the global pointer
3479.RB ( gp
3480or
3481.BR $28 ),
3482instead of the normal two words used.  By default,
3483.I num
3484is 8 when the MIPS assembler is used, and 0 when the GNU
3485assembler is used.  The
3486.BI \-G num
3487switch is also passed to the assembler and linker.  All modules should
3488be compiled with the same
3489.BI \-G num
3490value.
3491.TP
3492.B \-nocpp
3493Tell the MIPS assembler to not run it's preprocessor over user
3494assembler files (with a `\|\c
3495.B .s\c
3496\&\|' suffix) when assembling them.
3497.PP
3498These `\|\c
3499.B \-m\c
3500\&\|' options are defined for the Intel 80386 family of computers:
3501.B \-m486
3502.TP
3503.B \-mno\-486
3504Control whether or not code is optimized for a 486 instead of an
3505386.  Code generated for a 486 will run on a 386 and vice versa.
3506.TP
3507.B \-msoft\-float
3508Generate output containing library calls for floating point.
3509.I Warning:
3510the requisite libraries are not part of GNU CC.
3511Normally the facilities of the machine's usual C compiler are used, but
3512this can't be done directly in cross-compilation.  You must make your
3513own arrangements to provide suitable library functions for
3514cross-compilation.
3515.Sp
3516On machines where a function returns floating point results in the 80387
3517register stack, some floating point opcodes may be emitted even if
3518`\|\c
3519.B \-msoft-float\c
3520\&\|' is used.
3521.TP
3522.B \-mno-fp-ret-in-387
3523Do not use the FPU registers for return values of functions.
3524.Sp
3525The usual calling convention has functions return values of types
3526.B float\c
3527\& and \c
3528.B double\c
3529\& in an FPU register, even if there
3530is no FPU.  The idea is that the operating system should emulate
3531an FPU.
3532.Sp
3533The option `\|\c
3534.B \-mno-fp-ret-in-387\c
3535\&\|' causes such values to be returned
3536in ordinary CPU registers instead.
3537.PP
3538These `\|\c
3539.B \-m\c
3540\&\|' options are defined for the HPPA family of computers:
3541.TP
3542.B \-mpa-risc-1-0
3543Generate code for a PA 1.0 processor.
3544.TP
3545.B \-mpa-risc-1-1
3546Generate code for a PA 1.1 processor.
3547.TP
3548.B \-mkernel
3549Generate code which is suitable for use in kernels.  Specifically, avoid
3550.B add\c
3551\& instructions in which one of the arguments is the DP register;
3552generate \c
3553.B addil\c
3554\& instructions instead.  This avoids a rather serious
3555bug in the HP-UX linker.
3556.TP
3557.B \-mshared-libs
3558Generate code that can be linked against HP-UX shared libraries.  This option
3559is not fully function yet, and is not on by default for any PA target.  Using
3560this option can cause incorrect code to be generated by the compiler.
3561.TP
3562.B \-mno-shared-libs
3563Don't generate code that will be linked against shared libraries.  This is
3564the default for all PA targets.
3565.TP
3566.B \-mlong-calls
3567Generate code which allows calls to functions greater than 256K away from
3568the caller when the caller and callee are in the same source file.  Do
3569not turn this option on unless code refuses to link with \*(lqbranch out of
3570range errors\*('' from the linker.
3571.TP
3572.B \-mdisable-fpregs
3573Prevent floating point registers from being used in any manner.  This is
3574necessary for compiling kernels which perform lazy context switching of
3575floating point registers.  If you use this option and attempt to perform
3576floating point operations, the compiler will abort.
3577.TP
3578.B \-mdisable-indexing
3579Prevent the compiler from using indexing address modes.  This avoids some
3580rather obscure problems when compiling MIG generated code under MACH.
3581.TP
3582.B \-mtrailing-colon
3583Add a colon to the end of label definitions (for ELF assemblers).
3584.PP
3585These `\|\c
3586.B \-m\c
3587\&\|' options are defined for the Intel 80960 family of computers:
3588.TP
3589.BI "\-m" "cpu-type"
3590Assume the defaults for the machine type
3591.I cpu-type
3592for instruction and addressing-mode availability and alignment.
3593The default
3594.I cpu-type
3595is
3596.BR kb ;
3597other choices are
3598.BR ka ,
3599.BR mc ,
3600.BR ca ,
3601.BR cf ,
3602.BR sa ,
3603and
3604.BR sb .
3605.TP
3606.B \-mnumerics
3607.TP
3608.B \-msoft\-float
3609The
3610.B \-mnumerics
3611option indicates that the processor does support
3612floating-point instructions.  The
3613.B \-msoft\-float
3614option indicates
3615that floating-point support should not be assumed.
3616.TP
3617.B \-mleaf\-procedures
3618.TP
3619.B \-mno\-leaf\-procedures
3620Do (or do not) attempt to alter leaf procedures to be callable with the
3621.I bal
3622instruction as well as
3623.IR call .
3624This will result in more
3625efficient code for explicit calls when the
3626.I bal
3627instruction can be
3628substituted by the assembler or linker, but less efficient code in other
3629cases, such as calls via function pointers, or using a linker that doesn't
3630support this optimization.
3631.TP
3632.B \-mtail\-call
3633.TP
3634.B \-mno\-tail\-call
3635Do (or do not) make additional attempts (beyond those of the
3636machine-independent portions of the compiler) to optimize tail-recursive
3637calls into branches.  You may not want to do this because the detection of
3638cases where this is not valid is not totally complete.  The default is
3639.BR \-mno\-tail\-call .
3640.TP
3641.B \-mcomplex\-addr
3642.TP
3643.B \-mno\-complex\-addr
3644Assume (or do not assume) that the use of a complex addressing mode is a
3645win on this implementation of the i960.  Complex addressing modes may not
3646be worthwhile on the K-series, but they definitely are on the C-series.
3647The default is currently
3648.B \-mcomplex\-addr
3649for all processors except
3650the CB and CC.
3651.TP
3652.B \-mcode\-align
3653.TP
3654.B \-mno\-code\-align
3655Align code to 8-byte boundaries for faster fetching (or don't bother).
3656Currently turned on by default for C-series implementations only.
3657.TP
3658.B \-mic\-compat
3659.TP
3660.B \-mic2.0\-compat
3661.TP
3662.B \-mic3.0\-compat
3663Enable compatibility with iC960 v2.0 or v3.0.
3664.TP
3665.B \-masm\-compat
3666.TP
3667.B \-mintel\-asm
3668Enable compatibility with the iC960 assembler.
3669.TP
3670.B \-mstrict\-align
3671.TP
3672.B \-mno\-strict\-align
3673Do not permit (do permit) unaligned accesses.
3674.TP
3675.B \-mold\-align
3676Enable structure-alignment compatibility with Intel's gcc release version
36771.3 (based on gcc 1.37).  Currently this is buggy in that
3678.B #pragma align 1
3679is always assumed as well, and cannot be turned off.
3680.PP
3681These `\|\c
3682.B \-m\c
3683\&\|' options are defined for the DEC Alpha implementations:
3684.TP
3685.B \-mno-soft-float
3686.TP
3687.B \-msoft-float
3688Use (do not use) the hardware floating-point instructions for
3689floating-point operations.  When \c
3690.B \-msoft-float\c
3691\& is specified,
3692functions in `\|\c
3693.B libgcc1.c\c
3694\&\|' will be used to perform floating-point
3695operations.  Unless they are replaced by routines that emulate the
3696floating-point operations, or compiled in such a way as to call such
3697emulations routines, these routines will issue floating-point
3698operations.   If you are compiling for an Alpha without floating-point
3699operations, you must ensure that the library is built so as not to call
3700them.
3701.Sp
3702Note that Alpha implementations without floating-point operations are
3703required to have floating-point registers.
3704.TP
3705.B \-mfp-reg
3706.TP
3707.B \-mno-fp-regs
3708Generate code that uses (does not use) the floating-point register set.
3709.B \-mno-fp-regs\c
3710\& implies \c
3711.B \-msoft-float\c
3712\&.  If the floating-point
3713register set is not used, floating point operands are passed in integer
3714registers as if they were integers and floating-point results are passed
3715in $0 instead of $f0.  This is a non-standard calling sequence, so any
3716function with a floating-point argument or return value called by code
3717compiled with \c
3718.B \-mno-fp-regs\c
3719\& must also be compiled with that
3720option.
3721.Sp
3722A typical use of this option is building a kernel that does not use,
3723and hence need not save and restore, any floating-point registers.
3724.PP
3725These additional options are available on System V Release 4 for
3726compatibility with other compilers on those systems:
3727.TP
3728.B \-G
3729On SVr4 systems, \c
3730.B gcc\c
3731\& accepts the option `\|\c
3732.B \-G\c
3733\&\|' (and passes
3734it to the system linker), for compatibility with other compilers.
3735However, we suggest you use `\|\c
3736.B \-symbolic\c
3737\&\|' or `\|\c
3738.B \-shared\c
3739\&\|' as
3740appropriate, instead of supplying linker options on the \c
3741.B gcc
3742command line.
3743.TP
3744.B \-Qy
3745Identify the versions of each tool used by the compiler, in a
3746.B .ident\c
3747\& assembler directive in the output.
3748.TP
3749.B \-Qn
3750Refrain from adding \c
3751.B .ident\c
3752\& directives to the output file (this is
3753the default).
3754.TP
3755.BI "\-YP," "dirs"
3756Search the directories \c
3757.I dirs\c
3758\&, and no others, for libraries
3759specified with `\|\c
3760.B \-l\c
3761\&\|'.  You can separate directory entries in
3762.I dirs\c
3763\& from one another with colons.
3764.TP
3765.BI "\-Ym," "dir"
3766Look in the directory \c
3767.I dir\c
3768\& to find the M4 preprocessor.
3769The assembler uses this option.
3770.SH CODE GENERATION OPTIONS
3771These machine-independent options control the interface conventions
3772used in code generation.
3773.PP
3774Most of them begin with `\|\c
3775\-f\c
3776\&\|'.  These options have both positive and negative forms; the negative form
3777of `\|\c
3778.B \-ffoo\c
3779\&\|' would be `\|\c
3780.B \-fno\-foo\c
3781\&\|'.  In the table below, only
3782one of the forms is listed\(em\&the one which is not the default.  You
3783can figure out the other form by either removing `\|\c
3784.B no\-\c
3785\&\|' or adding
3786it.
3787.TP
3788.B \-fnonnull\-objects
3789Assume that objects reached through references are not null
3790(C++ only).
3791.Sp
3792Normally, GNU C++ makes conservative assumptions about objects reached
3793through references.  For example, the compiler must check that \c
3794.B a
3795is not null in code like the following:
3796.Sp
3797obj &a = g ();
3798a.f (2);
3799.Sp
3800Checking that references of this sort have non-null values requires
3801extra code, however, and it is unnecessary for many programs.  You can
3802use `\|\c
3803.B \-fnonnull-objects\c
3804\&\|' to omit the checks for null, if your
3805program doesn't require checking.
3806.TP
3807.B \-fpcc\-struct\-return
3808Use the same convention for returning \c
3809.B struct\c
3810\& and \c
3811.B union
3812values that is used by the usual C compiler on your system.  This
3813convention is less efficient for small structures, and on many
3814machines it fails to be reentrant; but it has the advantage of
3815allowing intercallability between GCC-compiled code and PCC-compiled
3816code.
3817.TP
3818.B \-freg\-struct\-return
3819Use the convention that
3820.B struct
3821and
3822.B union
3823values are returned in registers when possible.  This is more
3824efficient for small structures than
3825.BR \-fpcc\-struct\-return .
3826.Sp
3827If you specify neither
3828.B \-fpcc\-struct\-return
3829nor
3830.BR \-freg\-struct\-return ,
3831GNU CC defaults to whichever convention is standard for the target.
3832If there is no standard convention, GNU CC defaults to
3833.BR \-fpcc\-struct\-return .
3834.TP
3835.B \-fshort\-enums
3836Allocate to an \c
3837.B enum\c
3838\& type only as many bytes as it needs for the
3839declared range of possible values.  Specifically, the \c
3840.B enum\c
3841\& type
3842will be equivalent to the smallest integer type which has enough room.
3843.TP
3844.B \-fshort\-double
3845Use the same size for
3846.B double
3847as for
3848.B float
3849\&.
3850.TP
3851.B \-fshared\-data
3852Requests that the data and non-\c
3853.B const\c
3854\& variables of this
3855compilation be shared data rather than private data.  The distinction
3856makes sense only on certain operating systems, where shared data is
3857shared between processes running the same program, while private data
3858exists in one copy per process.
3859.TP
3860.B \-fno\-common
3861Allocate even uninitialized global variables in the bss section of the
3862object file, rather than generating them as common blocks.  This has the
3863effect that if the same variable is declared (without \c
3864.B extern\c
3865\&) in
3866two different compilations, you will get an error when you link them.
3867The only reason this might be useful is if you wish to verify that the
3868program will work on other systems which always work this way.
3869.TP
3870.B \-fno\-ident
3871Ignore the `\|\c
3872.B #ident\c
3873\&\|' directive.
3874.TP
3875.B \-fno\-gnu\-linker
3876Do not output global initializations (such as C++ constructors and
3877destructors) in the form used by the GNU linker (on systems where the GNU
3878linker is the standard method of handling them).  Use this option when
3879you want to use a non-GNU linker, which also requires using the
3880.B collect2\c
3881\& program to make sure the system linker includes
3882constructors and destructors.  (\c
3883.B collect2\c
3884\& is included in the GNU CC
3885distribution.)  For systems which \c
3886.I must\c
3887\& use \c
3888.B collect2\c
3889\&, the
3890compiler driver \c
3891.B gcc\c
3892\& is configured to do this automatically.
3893.TP
3894.B \-finhibit-size-directive
3895Don't output a \c
3896.B .size\c
3897\& assembler directive, or anything else that
3898would cause trouble if the function is split in the middle, and the
3899two halves are placed at locations far apart in memory.  This option is
3900used when compiling `\|\c
3901.B crtstuff.c\c
3902\&\|'; you should not need to use it
3903for anything else.
3904.TP
3905.B \-fverbose-asm
3906Put extra commentary information in the generated assembly code to
3907make it more readable.  This option is generally only of use to those
3908who actually need to read the generated assembly code (perhaps while
3909debugging the compiler itself).
3910.TP
3911.B \-fvolatile
3912Consider all memory references through pointers to be volatile.
3913.TP
3914.B \-fvolatile\-global
3915Consider all memory references to extern and global data items to
3916be volatile.
3917.TP
3918.B \-fpic
3919If supported for the target machines, generate position-independent code,
3920suitable for use in a shared library.
3921.TP
3922.B \-fPIC
3923If supported for the target machine, emit position-independent code,
3924suitable for dynamic linking, even if branches need large displacements.
3925.TP
3926.BI "\-ffixed\-" "reg"
3927Treat the register named \c
3928.I reg\c
3929\& as a fixed register; generated code
3930should never refer to it (except perhaps as a stack pointer, frame
3931pointer or in some other fixed role).
3932.Sp
3933.I reg\c
3934\& must be the name of a register.  The register names accepted
3935are machine-specific and are defined in the \c
3936.B REGISTER_NAMES
3937macro in the machine description macro file.
3938.Sp
3939This flag does not have a negative form, because it specifies a
3940three-way choice.
3941.TP
3942.BI "\-fcall\-used\-" "reg"
3943Treat the register named \c
3944.I reg\c
3945\& as an allocatable register that is
3946clobbered by function calls.  It may be allocated for temporaries or
3947variables that do not live across a call.  Functions compiled this way
3948will not save and restore the register \c
3949.I reg\c
3950\&.
3951.Sp
3952Use of this flag for a register that has a fixed pervasive role in the
3953machine's execution model, such as the stack pointer or frame pointer,
3954will produce disastrous results.
3955.Sp
3956This flag does not have a negative form, because it specifies a
3957three-way choice.
3958.TP
3959.BI "\-fcall\-saved\-" "reg"
3960Treat the register named \c
3961.I reg\c
3962\& as an allocatable register saved by
3963functions.  It may be allocated even for temporaries or variables that
3964live across a call.  Functions compiled this way will save and restore
3965the register \c
3966.I reg\c
3967\& if they use it.
3968.Sp
3969Use of this flag for a register that has a fixed pervasive role in the
3970machine's execution model, such as the stack pointer or frame pointer,
3971will produce disastrous results.
3972.Sp
3973A different sort of disaster will result from the use of this flag for
3974a register in which function values may be returned.
3975.Sp
3976This flag does not have a negative form, because it specifies a
3977three-way choice.
3978.SH PRAGMAS
3979Two `\|\c
3980.B #pragma\c
3981\&\|' directives are supported for GNU C++, to permit using the same
3982header file for two purposes: as a definition of interfaces to a given
3983object class, and as the full definition of the contents of that object class.
3984.TP
3985.B #pragma interface
3986(C++ only.)
3987Use this directive in header files that define object classes, to save
3988space in most of the object files that use those classes.  Normally,
3989local copies of certain information (backup copies of inline member
3990functions, debugging information, and the internal tables that
3991implement virtual functions) must be kept in each object file that
3992includes class definitions.  You can use this pragma to avoid such
3993duplication.  When a header file containing `\|\c
3994.B #pragma interface\c
3995\&\|' is included in a compilation, this auxiliary information
3996will not be generated (unless the main input source file itself uses
3997`\|\c
3998.B #pragma implementation\c
3999\&\|').  Instead, the object files will contain references to be
4000resolved at link time.
4001.TP
4002.B #pragma implementation
4003.TP
4004\fB#pragma implementation "\fP\fIobjects\fP\fB.h"\fP
4005(C++ only.)
4006Use this pragma in a main input file, when you want full output from
4007included header files to be generated (and made globally visible).
4008The included header file, in turn, should use `\|\c
4009.B #pragma interface\c
4010\&\|'.
4011Backup copies of inline member functions, debugging information, and
4012the internal tables used to implement virtual functions are all
4013generated in implementation files.
4014.Sp
4015If you use `\|\c
4016.B #pragma implementation\c
4017\&\|' with no argument, it applies to an include file with the same
4018basename as your source file; for example, in `\|\c
4019.B allclass.cc\c
4020\&\|', `\|\c
4021.B #pragma implementation\c
4022\&\|' by itself is equivalent to `\|\c
4023.B
4024#pragma implementation "allclass.h"\c
4025\&\|'.  Use the string argument if you want a single implementation
4026file to include code from multiple header files.
4027.Sp
4028There is no way to split up the contents of a single header file into
4029multiple implementation files.
4030.SH FILES
4031.nf
4032.ta \w'LIBDIR/g++\-include 'u
4033file.c  C source file
4034file.h  C header (preprocessor) file
4035file.i  preprocessed C source file
4036file.C  C++ source file
4037file.cc C++ source file
4038file.cxx        C++ source file
4039file.m  Objective-C source file
4040file.s  assembly language file
4041file.o  object file
4042a.out   link edited output
4043\fITMPDIR\fR/cc\(**     temporary files
4044\fILIBDIR\fR/cpp        preprocessor
4045\fILIBDIR\fR/cc1        compiler for C
4046\fILIBDIR\fR/cc1plus    compiler for C++
4047\fILIBDIR\fR/collect    linker front end needed on some machines
4048\fILIBDIR\fR/libgcc.a   GCC subroutine library
4049/lib/crt[01n].o start-up routine
4050\fILIBDIR\fR/ccrt0      additional start-up routine for C++
4051/lib/libc.a     standard C library, see
4052.IR intro (3)
4053/usr/include    standard directory for \fB#include\fP files
4054\fILIBDIR\fR/include    standard gcc directory for \fB#include\fP files
4055\fILIBDIR\fR/g++\-include       additional g++ directory for \fB#include\fP
4056.Sp
4057.fi
4058.I LIBDIR
4059is usually
4060.B /usr/local/lib/\c
4061.IR machine / version .
4062.br
4063.I TMPDIR
4064comes from the environment variable
4065.B TMPDIR
4066(default
4067.B /usr/tmp
4068if available, else
4069.B /tmp\c
4070\&).
4071.SH "SEE ALSO"
4072cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1).
4073.br
4074.RB "`\|" gcc "\|', `\|" cpp \|',
4075.RB "`\|" as "\|', `\|" ld \|',
4076and
4077.RB `\| gdb \|'
4078entries in
4079.B info\c
4080\&.
4081.br
4082.I
4083Using and Porting GNU CC (for version 2.0)\c
4084, Richard M. Stallman;
4085.I
4086The C Preprocessor\c
4087, Richard M. Stallman;
4088.I
4089Debugging with GDB: the GNU Source-Level Debugger\c
4090, Richard M. Stallman and Roland H. Pesch;
4091.I
4092Using as: the GNU Assembler\c
4093, Dean Elsner, Jay Fenlason & friends;
4094.I
4095ld: the GNU linker\c
4096, Steve Chamberlain and Roland Pesch.
4097.SH BUGS
4098For instructions on reporting bugs, see the GCC manual.
4099.SH COPYING
4100Copyright
4101.if t \(co
41021991, 1992, 1993 Free Software Foundation, Inc.
4103.PP
4104Permission is granted to make and distribute verbatim copies of
4105this manual provided the copyright notice and this permission notice
4106are preserved on all copies.
4107.PP
4108Permission is granted to copy and distribute modified versions of this
4109manual under the conditions for verbatim copying, provided that the
4110entire resulting derived work is distributed under the terms of a
4111permission notice identical to this one.
4112.PP
4113Permission is granted to copy and distribute translations of this
4114manual into another language, under the above conditions for modified
4115versions, except that this permission notice may be included in
4116translations approved by the Free Software Foundation instead of in
4117the original English.
4118.SH AUTHORS
4119See the GNU CC Manual for the contributors to GNU CC.
Note: See TracBrowser for help on using the repository browser.