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