OSDN Git Service

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