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