OSDN Git Service

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