OSDN Git Service

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