OSDN Git Service

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