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