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