OSDN Git Service

* collect2.c (main): Only export initfunc and finifunc if
[pf3gnuchains/gcc-fork.git] / gcc / c.opt
1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003 Free Software Foundation, Inc.
3 ;
4 ; This file is part of GCC.
5 ;
6 ; GCC is free software; you can redistribute it and/or modify it under
7 ; the terms of the GNU General Public License as published by the Free
8 ; Software Foundation; either version 2, or (at your option) any later
9 ; version.
10
11 ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 ; WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 ; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 ; for more details.
15
16 ; You should have received a copy of the GNU General Public License
17 ; along with GCC; see the file COPYING.  If not, write to the Free
18 ; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 ; 02111-1307, USA.
20
21
22 ; This file is processed by the script opts.sh.  It is a database of
23 ; command line options, with each record separated by a blank line,
24 ; and each field appearing on its own line.  The first field is the
25 ; command-line switch with the leading "-" removed.  All options
26 ; beginning with "f" or "W" are implicitly assumed to take a "no-"
27 ; form; this form should not be listed.  If you do not want this
28 ; negative form and you want it to be automatically rejected, add
29 ; RejectNegative to the second field.
30
31 ; The second field is a space-separated list of which parts of the
32 ; compiler recognize the switch, as declared by "Language" entries.
33 ; If the switch takes an argument, then you should also specify
34 ; "Joined" and/or "Separate" to indicate where the argument can
35 ; appear.  If a Joined argument can legitimately be omitted, specify
36 ; "JoinedOrMissing" instead of "Joined".  If the argument to a switch
37 ; is a non-negative integer, you can specify "UInteger" and the switch
38 ; decoder will convert the argument for you, or complain to the user
39 ; if the argument is invalid.
40
41 ; The third field is the help text to output with --help.  This is
42 ; automatically line-wrapped on output.  Normally the switch is output
43 ; automatically, with the help text on the right hand side of the
44 ; output.  However, if the help text contains a tab character, the
45 ; text to the left of the tab is output instead of the switch, and the
46 ; text to its right forms the help.  This is useful for elaborating on
47 ; what type of argument a switch takes, for example.  If the second
48 ; field contains "Undocumented" then nothing is output with --help.
49 ; Only do this with good reason like the switch being internal between
50 ; the driver and the front end - it is not an excuse to leave a switch
51 ; undocumented.
52
53 ; Comments can appear on their own line anwhere in the file, preceded
54 ; by a semicolon.  Whitespace is permitted before the semicolon.
55
56 ; For each switch XXX below, an enumeration constant is created by the
57 ; script opts.sh spelt OPT_XXX, but with all non-alphanumeric
58 ; characters replaced with an underscore.
59
60 ; Please try to keep this file in ASCII collating order.
61
62 Language
63 C
64
65 Language
66 ObjC
67
68 Language
69 C++
70
71 Language
72 ObjC++
73
74 -output-pch=
75 C ObjC C++ ObjC++ Joined Separate
76
77 A
78 C ObjC C++ ObjC++ Joined Separate
79 -A<question>=<answer>   Assert the <answer> to <question>.  Putting '-' before <question> disables the <answer> to <question>
80
81 C
82 C ObjC C++ ObjC++
83 Do not discard comments
84
85 CC
86 C ObjC C++ ObjC++
87 Do not discard comments in macro expansions
88
89 D
90 C ObjC C++ ObjC++ Joined Separate
91 -D<macro>[=<val>]       Define a <macro> with <val> as its value.  If just <macro> is given, <val> is taken to be 1
92
93 E
94 C ObjC C++ ObjC++ Undocumented
95
96 F
97 C ObjC C++ ObjC++ Joined Separate
98 -F <dir>        Add <dir> to the end of the main framework include path  
99
100 H
101 C ObjC C++ ObjC++
102 Print the name of header files as they are used
103
104 I
105 C ObjC C++ ObjC++ Joined Separate
106 -I <dir>        Add <dir> to the end of the main include path.  -I- gives more include path control; see info documentation
107
108 M
109 C ObjC C++ ObjC++
110 Generate make dependencies
111
112 MD
113 C ObjC C++ ObjC++ Separate
114 Generate make dependencies and compile
115
116 MF
117 C ObjC C++ ObjC++ Joined Separate
118 -MF <file>      Write dependency output to the given file
119
120 MG
121 C ObjC C++ ObjC++
122 Treat missing header files as generated files
123
124 MM
125 C ObjC C++ ObjC++
126 Like -M but ignore system header files
127
128 MMD
129 C ObjC C++ ObjC++ Separate
130 Like -MD but ignore system header files
131
132 MP
133 C ObjC C++ ObjC++
134 Generate phony targets for all headers
135
136 MQ
137 C ObjC C++ ObjC++ Joined Separate
138 -MQ <target>    Add a MAKE-quoted target
139
140 MT
141 C ObjC C++ ObjC++ Joined Separate
142 -MT <target>    Add an unquoted target
143
144 P
145 C ObjC C++ ObjC++
146 Do not generate #line directives
147
148 U
149 C ObjC C++ ObjC++ Joined Separate
150 -U<macro>       Undefine <macro>
151
152 Wabi
153 C++ ObjC++
154
155 Wall
156 C ObjC C++ ObjC++
157 Enable most warning messages
158
159 Wbad-function-cast
160 C ObjC
161 Warn about casting functions to incompatible types
162
163 Wcast-qual
164 C ObjC C++ ObjC++
165 Warn about casts which discard qualifiers
166
167 Wchar-subscripts
168 C ObjC C++ ObjC++
169 Warn about subscripts whose type is \"char\"
170
171 Wcomment
172 C ObjC C++ ObjC++
173 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
174
175 Wcomments
176 C ObjC C++ ObjC++
177 Synonym for -Wcomment
178
179 Wconversion
180 C ObjC C++ ObjC++
181 Warn about possibly confusing type conversions
182
183 Wctor-dtor-privacy
184 C++ ObjC++
185 Warn when all constructors and destructors are private
186
187 Wdeclaration-after-statement
188 C ObjC
189 Warn when a declaration is found after a statement
190
191 Wdeprecated
192 C++ ObjC++
193 Warn about deprecated compiler features
194
195 Wdiv-by-zero
196 C ObjC
197 Warn about compile-time integer division by zero
198
199 Weffc++
200 C++ ObjC++
201 Warn about violations of Effective C++ style rules
202
203 Wendif-labels
204 C ObjC C++ ObjC++
205 Warn about stray tokens after #elif and #endif
206
207 Werror
208 C ObjC C++ ObjC++
209 ; Documented in common.opt
210
211 Werror-implicit-function-declaration
212 C ObjC RejectNegative
213 Make implicit function declarations an error
214
215 Wfloat-equal
216 C ObjC C++ ObjC++
217 Warn if testing floating point numbers for equality
218
219 Wformat
220 C ObjC C++ ObjC++
221 Warn about printf/scanf/strftime/strfmon format string anomalies
222
223 Wformat-extra-args
224 C ObjC C++ ObjC++
225 Warn if passing too many arguments to a function for its format string
226
227 Wformat-nonliteral
228 C ObjC C++ ObjC++
229 Warn about format strings that are not literals
230
231 Wformat-security
232 C ObjC C++ ObjC++
233 Warn about possible security problems with format functions
234
235 Wformat-y2k
236 C ObjC C++ ObjC++
237 Warn about strftime formats yielding 2-digit years
238
239 Wformat-zero-length
240 C ObjC
241
242 Wformat=
243 C ObjC C++ ObjC++ Joined
244
245 Winit-self
246 C ObjC C++ ObjC++
247 Warn about variables which are initialized to themselves.
248
249 Wimplicit
250 C ObjC C++ ObjC++
251
252 Wimplicit-function-declaration
253 C ObjC
254 Warn about implicit function declarations
255
256 Wimplicit-int
257 C ObjC
258 Warn when a declaration does not specify a type
259
260 Wimport
261 C ObjC C++ ObjC++
262 Deprecated.  This switch has no effect.
263
264 Winvalid-offsetof
265 C++ ObjC++
266 Warn about invalid uses of the \"offsetof\" macro
267
268 Winvalid-pch
269 C ObjC C++ ObjC++
270 Warn about PCH files that are found but not used
271
272 Wlong-long
273 C ObjC C++ ObjC++
274 Do not warn about using \"long long\" when -pedantic
275
276 Wmain
277 C ObjC
278 Warn about suspicious declarations of \"main\"
279
280 Wmissing-braces
281 C ObjC C++ ObjC++
282 Warn about possibly missing braces around initializers
283
284 Wmissing-declarations
285 C ObjC
286 Warn about global functions without previous declarations
287
288 Wmissing-format-attribute
289 C ObjC C++ ObjC++
290 Warn about functions which might be candidates for format attributes
291
292 Wmissing-prototypes
293 C ObjC
294 Warn about global functions without prototypes
295
296 Wmultichar
297 C ObjC C++ ObjC++
298 Warn about use of multi-character character constants
299
300 Wnested-externs
301 C ObjC
302 Warn about \"extern\" declarations not at file scope
303
304 Wnon-template-friend
305 C++ ObjC++
306 Warn when non-templatized friend functions are declared within a template
307
308 Wnon-virtual-dtor
309 C++ ObjC++
310 Warn about non-virtual destructors
311
312 Wnonnull
313 C ObjC
314
315 Wold-style-cast
316 C++ ObjC++
317 Warn if a C-style cast is used in a program
318
319 Wold-style-definition
320 C ObjC
321 Warn if an old-style parameter definition is used
322
323 Woverloaded-virtual
324 C++ ObjC++
325 Warn about overloaded virtual function names
326
327 Wparentheses
328 C ObjC C++ ObjC++
329 Warn about possibly missing parentheses
330
331 Wpmf-conversions
332 C++ ObjC++
333 Warn when converting the type of pointers to member functions
334
335 Wpointer-arith
336 C ObjC C++ ObjC++
337 Warn about function pointer arithmetic
338
339 Wprotocol
340 ObjC ObjC++
341 Warn if inherited methods are unimplemented
342
343 Wredundant-decls
344 C ObjC C++ ObjC++
345 Warn about multiple declarations of the same object
346
347 Wreorder
348 C++ ObjC++
349 Warn when the compiler reorders code
350
351 Wreturn-type
352 C ObjC C++ ObjC++
353 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
354
355 Wselector
356 ObjC ObjC++
357 Warn if a selector has multiple methods
358
359 Wsequence-point
360 C ObjC
361 Warn about possible violations of sequence point rules
362
363 Wsign-compare
364 C ObjC C++ ObjC++
365 Warn about signed-unsigned comparisons
366
367 Wsign-promo
368 C++ ObjC++
369 Warn when overload promotes from unsigned to signed
370
371 Wstrict-prototypes
372 C ObjC
373 Warn about unprototyped function declarations
374
375 Wsynth
376 C++ ObjC++
377 Warn when synthesis behavior differs from Cfront
378
379 Wsystem-headers
380 C ObjC C++ ObjC++
381 Do not suppress warnings from system headers
382
383 Wtraditional
384 C ObjC
385 Warn about features not present in traditional C
386
387 Wtrigraphs
388 C ObjC C++ ObjC++
389 Warn if trigraphs are encountered that might affect the meaning of the program
390
391 Wundeclared-selector
392 ObjC ObjC++
393
394 Wundef
395 C ObjC C++ ObjC++
396 Warn if an undefined macro is used in an #if directive
397
398 Wunknown-pragmas
399 C ObjC C++ ObjC++
400 Warn about unrecognized pragmas
401
402 Wunused-macros
403 C ObjC C++ ObjC++
404 Warn about macros defined in the main file that are not used
405
406 Wvariadic-macros
407 C ObjC C++ ObjC++
408 Do not warn about using variadic macros when -pedantic
409
410 Wwrite-strings
411 C ObjC C++ ObjC++
412 Give strings the type \"array of char\"
413
414 ansi
415 C ObjC C++ ObjC++
416 A synonym for -std=c89.  In a future version of GCC it will become synonymous with -std=c99 instead
417
418 d
419 C ObjC C++ ObjC++ Joined
420 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
421
422 faccess-control
423 C++ ObjC++
424 Enforce class member access control semantics
425
426 fall-virtual
427 C++ ObjC++
428
429 falt-external-templates
430 C++ ObjC++
431 Change when template instances are emitted
432
433 fasm
434 C ObjC C++ ObjC++
435 Recognize the \"asm\" keyword
436
437 fbuiltin
438 C ObjC C++ ObjC++
439 Recognize built-in functions
440
441 fbuiltin-
442 C ObjC C++ ObjC++ Joined
443
444 fcheck-new
445 C++ ObjC++
446 Check the return value of new
447
448 fcond-mismatch
449 C ObjC C++ ObjC++
450 Allow the arguments of the '?' operator to have different types
451
452 fconserve-space
453 C++ ObjC++
454 Reduce the size of object files
455
456 fconst-strings
457 C++ ObjC++
458 Make string literals \"const char[]\" not \"char[]\"
459
460 fconstant-string-class=
461 ObjC ObjC++ Joined
462 -fconst-string-class=<name>     Use class <name> for constant strings
463
464 fdefault-inline
465 C++ ObjC++
466 Inline member functions by default
467
468 fdollars-in-identifiers
469 C ObjC C++ ObjC++
470 Permit '$' as an identifier character
471
472 fdump-
473 C ObjC C++ ObjC++ Joined RejectNegative
474 -fdump-<type>   Dump various compiler internals to a file
475
476 felide-constructors
477 C++ ObjC++
478
479 fenforce-eh-specs
480 C++ ObjC++
481 Generate code to check exception specifications
482
483 fenum-int-equiv
484 C++ ObjC++
485
486 fexec-charset=
487 C ObjC C++ ObjC++ Joined RejectNegative
488 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
489
490 finput-charset=
491 C ObjC C++ ObjC++ Joined RejectNegative
492 -finput-charset=<cset>      Specify the default character set for source files.
493
494
495 fexternal-templates
496 C++ ObjC++
497
498 ffixed-form
499 C ObjC
500
501 ffixed-line-length-
502 C ObjC Joined
503
504 ffor-scope
505 C++ ObjC++
506 Scope of for-init-statement variables is local to the loop
507
508 ffreestanding
509 C ObjC
510 Do not assume that standard C libraries and \"main\" exist
511
512 fgnu-keywords
513 C++ ObjC++
514 Recognize GNU-defined keywords
515
516 fgnu-runtime
517 ObjC ObjC++
518 Generate code for GNU runtime environment
519
520 fguiding-decls
521 C++ ObjC++
522
523 fhandle-exceptions
524 C++ ObjC++
525
526 fhonor-std
527 C++ ObjC++
528
529 fhosted
530 C ObjC
531 Assume normal C execution environment
532
533 fhuge-objects
534 C++ ObjC++
535 Enable support for huge objects
536
537 fimplement-inlines
538 C++ ObjC++
539 Export functions even if they can be inlined
540
541 fimplicit-inline-templates
542 C++ ObjC++
543 Emit implicit instantiations of inline templates
544
545 fimplicit-templates
546 C++ ObjC++
547 Emit implicit instantiations of templates
548
549 flabels-ok
550 C++ ObjC++
551
552 fms-extensions
553 C ObjC C++ ObjC++
554 Don't warn about uses of Microsoft extensions
555
556 fname-mangling-version-
557 C++ ObjC++ Joined
558
559 fnew-abi
560 C++ ObjC++
561
562 fnext-runtime
563 ObjC ObjC++
564 Generate code for NeXT (Apple Mac OS X) runtime environment
565
566 fnil-receivers
567 ObjC ObjC++
568 Assume that receivers of Objective-C messages may be nil
569
570 fnonansi-builtins
571 C++ ObjC++
572
573 fnonnull-objects
574 C++ ObjC++
575
576 fobjc-exceptions
577 ObjC ObjC++
578 Enable Objective-C exception and synchronization syntax
579
580 foperator-names
581 C++ ObjC++
582 Recognize C++ kewords like \"compl\" and \"xor\"
583
584 foptional-diags
585 C++ ObjC++
586 Enable optional diagnostics
587
588 fpch-deps
589 C ObjC C++ ObjC++
590
591 fpermissive
592 C++ ObjC++
593 Downgrade conformance errors to warnings
594
595 fpreprocessed
596 C ObjC C++ ObjC++
597 Treat the input file as already preprocessed
598
599 freplace-objc-classes
600 ObjC ObjC++
601 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
602
603 frepo
604 C++ ObjC++
605 Enable automatic template instantiation
606
607 frtti
608 C++ ObjC++
609 Generate run time type descriptor information
610
611 fshort-double
612 C ObjC C++ ObjC++
613 Use the same size for double as for float
614
615 fshort-enums
616 C ObjC C++ ObjC++
617 Use the narrowest integer type possible for enumeration types
618
619 fshort-wchar
620 C ObjC C++ ObjC++
621 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
622
623 fshow-column
624 C ObjC C++ ObjC++
625
626 fsigned-bitfields
627 C ObjC C++ ObjC++
628 When \"signed\" or \"unsigned\" is not given make the bitfield signed
629
630 fsigned-char
631 C ObjC C++ ObjC++
632 Make \"char\" signed by default
633
634 fsquangle
635 C++ ObjC++
636
637 fstats
638 C++ ObjC++
639 Display statistics accumulated during compilation
640
641 fstrict-prototype
642 C++ ObjC++
643
644 ftabstop=
645 C ObjC C++ ObjC++ Joined RejectNegative UInteger
646 -ftabstop=<number>      Distance between tab stops for column reporting
647
648 ftemplate-depth-
649 C++ ObjC++ Joined RejectNegative UInteger 
650 -ftemplate-depth-<number>       Specify maximum template instantiation depth
651
652 fthis-is-variable
653 C++ ObjC++
654
655 funsigned-bitfields
656 C ObjC C++ ObjC++
657 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
658
659 funsigned-char
660 C ObjC C++ ObjC++
661 Make \"char\" unsigned by default
662
663 fuse-cxa-atexit
664 C++ ObjC++
665 Use __cxa_atexit to register destructors
666
667 fvtable-gc
668 C++ ObjC++
669 Discard unused virtual functions
670
671 fvtable-thunks
672 C++ ObjC++
673 Implement vtables using thunks
674
675 fweak
676 C++ ObjC++
677 Emit common-like symbols as weak symbols
678
679 fwide-exec-charset=
680 C ObjC C++ ObjC++ Joined RejectNegative
681 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>
682
683 fworking-directory
684 C ObjC C++ ObjC++
685 Generate a #line directive pointing at the current working directory
686
687 fxref
688 C++ ObjC++
689 Emit cross referencing information
690
691 fzero-link
692 ObjC ObjC++
693 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
694
695 gen-decls
696 ObjC ObjC++
697 Dump declarations to a .decl file
698
699 idirafter
700 C ObjC C++ ObjC++ Joined Separate
701 -idirafter <dir>        Add <dir> to the end of the system include path
702
703 imacros
704 C ObjC C++ ObjC++ Joined Separate
705 -imacros <file> Accept definition of macros in <file>
706
707 include
708 C ObjC C++ ObjC++ Joined Separate
709 -include <file> Include the contents of <file> before other files
710
711 iprefix
712 C ObjC C++ ObjC++ Joined Separate
713 -iprefix <path> Specify <path> as a prefix for next two options
714
715 isysroot
716 C ObjC C++ ObjC++ Joined Separate
717 -isysroot <dir> Set <dir> to be the system root directory
718
719 isystem
720 C ObjC C++ ObjC++ Joined Separate
721 -isystem <dir>  Add <dir> to the start of the system include path
722
723 iwithprefix
724 C ObjC C++ ObjC++ Joined Separate
725 -iwithprefix <dir>      Add <dir> to the end of the system include path
726
727 iwithprefixbefore
728 C ObjC C++ ObjC++ Joined Separate
729 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
730
731 lang-asm
732 C Undocumented
733
734 lang-objc
735 C ObjC C++ ObjC++ Undocumented
736
737 nostdinc
738 C ObjC C++ ObjC++
739 Do not search standard system include directories (those specified with -isystem will still be used)
740
741 nostdinc++
742 C++ ObjC++
743 Do not search standard system include directories for C++
744
745 o
746 C ObjC C++ ObjC++ Joined Separate
747 ; Documented in common.opt
748
749 pedantic
750 C ObjC C++ ObjC++
751 ; Documented in common.opt
752
753 pedantic-errors
754 C ObjC C++ ObjC++
755 ; Documented in common.opt
756
757 print-objc-runtime-info
758 ObjC ObjC++
759 Generate C header of platform-specific features
760
761 remap
762 C ObjC C++ ObjC++
763 Remap file names when including files
764
765 std=c++98
766 C++ ObjC++
767 Conform to the ISO 1998 C++ standard
768
769 std=c89
770 C ObjC
771 Conform to the ISO 1990 C standard
772
773 std=c99
774 C ObjC
775 Conform to the ISO 1999 C standard
776
777 std=c9x
778 C ObjC
779 Deprecated in favor of -std=c99
780
781 std=gnu++98
782 C++ ObjC++
783 Conform to the ISO 1998 C++ standard with GNU extensions
784
785 std=gnu89
786 C ObjC
787 Conform to the ISO 1990 C standard with GNU extensions
788
789 std=gnu99
790 C ObjC
791 Conform to the ISO 1999 C standard with GNU extensions
792
793 std=gnu9x
794 C ObjC
795 Deprecated in favor of -std=gnu99
796
797 std=iso9899:1990
798 C ObjC
799 Deprecated in favor of -std=c89
800
801 std=iso9899:199409
802 C ObjC
803 Conform to the ISO 1990 C standard as amended in 1994
804
805 std=iso9899:1999
806 C ObjC
807 Deprecated in favor of -std=c99
808
809 std=iso9899:199x
810 C ObjC
811 Deprecated in favor of -std=c99
812
813 traditional-cpp
814 C ObjC C++ ObjC++
815 Enable traditional preprocessing
816
817 trigraphs
818 C ObjC C++ ObjC++
819 -trigraphs      Support ISO C trigraphs
820
821 undef
822 C ObjC C++ ObjC++
823 Do not predefine system-specific and GCC-specific macros
824
825 v
826 C ObjC C++ ObjC++
827 Enable verbose output
828
829 w
830 C ObjC C++ ObjC++
831 ; Documented in common.opt
832
833 ; This comment is to ensure we retain the blank line above.