OSDN Git Service

* c.opt: Document Uncodumented; use it. Document ObjC options.
[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 H
97 C ObjC C++ ObjC++
98 Print the name of header files as they are used
99
100 I
101 C ObjC C++ ObjC++ Joined Separate
102 -I <dir>        Add <dir> to the end of the main include path.  -I- gives more include path control; see info documentation
103
104 M
105 C ObjC C++ ObjC++
106 Generate make dependencies
107
108 MD
109 C ObjC C++ ObjC++ Separate
110 Generate make dependencies and compile
111
112 MF
113 C ObjC C++ ObjC++ Joined Separate
114 -MF <file>      Write dependency output to the given file
115
116 MG
117 C ObjC C++ ObjC++
118 Treat missing header files as generated files
119
120 MM
121 C ObjC C++ ObjC++
122 Like -M but ignore system header files
123
124 MMD
125 C ObjC C++ ObjC++ Separate
126 Like -MD but ignore system header files
127
128 MP
129 C ObjC C++ ObjC++
130 Generate phony targets for all headers
131
132 MQ
133 C ObjC C++ ObjC++ Joined Separate
134 -MQ <target>    Add a MAKE-quoted target
135
136 MT
137 C ObjC C++ ObjC++ Joined Separate
138 -MT <target>    Add an unquoted target
139
140 P
141 C ObjC C++ ObjC++
142 Do not generate #line directives
143
144 U
145 C ObjC C++ ObjC++ Joined Separate
146 -U<macro>       Undefine <macro>
147
148 Wabi
149 C++ ObjC++
150
151 Wall
152 C ObjC C++ ObjC++
153 Enable most warning messages
154
155 Wbad-function-cast
156 C ObjC
157 Warn about casting functions to incompatible types
158
159 Wcast-qual
160 C ObjC C++ ObjC++
161 Warn about casts which discard qualifiers
162
163 Wchar-subscripts
164 C ObjC C++ ObjC++
165 Warn about subscripts whose type is \"char\"
166
167 Wcomment
168 C ObjC C++ ObjC++
169 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
170
171 Wcomments
172 C ObjC C++ ObjC++
173 Synonym for -Wcomment
174
175 Wconversion
176 C ObjC C++ ObjC++
177 Warn about possibly confusing type conversions
178
179 Wctor-dtor-privacy
180 C++ ObjC++
181 Warn when all constructors and destructors are private
182
183 Wdeprecated
184 C++ ObjC++
185 Warn about deprecated compiler features
186
187 Wdiv-by-zero
188 C ObjC
189 Warn about compile-time integer division by zero
190
191 Weffc++
192 C++ ObjC++
193 Warn about violations of Effective C++ style rules
194
195 Wendif-labels
196 C ObjC C++ ObjC++
197 Warn about stray tokens after #elif and #endif
198
199 Werror
200 C ObjC C++ ObjC++
201 ; Documented in common.opt
202
203 Werror-implicit-function-declaration
204 C ObjC RejectNegative
205 Make implicit function declarations an error
206
207 Wfloat-equal
208 C ObjC C++ ObjC++
209 Warn if testing floating point numbers for equality
210
211 Wformat
212 C ObjC C++ ObjC++
213 Warn about printf/scanf/strftime/strfmon format string anomalies
214
215 Wformat-extra-args
216 C ObjC C++ ObjC++
217 Warn if passing too many arguments to a function for its format string
218
219 Wformat-nonliteral
220 C ObjC C++ ObjC++
221 Warn about format strings that are not literals
222
223 Wformat-security
224 C ObjC C++ ObjC++
225 Warn about possible security problems with format functions
226
227 Wformat-y2k
228 C ObjC C++ ObjC++
229 Warn about strftime formats yielding 2-digit years
230
231 Wformat-zero-length
232 C ObjC
233
234 Wformat=
235 C ObjC C++ ObjC++ Joined
236
237 Wimplicit
238 C ObjC C++ ObjC++
239
240 Wimplicit-function-declaration
241 C ObjC
242 Warn about implicit function declarations
243
244 Wimplicit-int
245 C ObjC
246 Warn when a declaration does not specify a type
247
248 Wimport
249 C ObjC C++ ObjC++
250 Warn about uses of the \"#import\" directive
251
252 Winvalid-offsetof
253 C++ ObjC++
254 Warn about invalid uses of the \"offsetof\" macro
255
256 Winvalid-pch
257 C ObjC C++ ObjC++
258 Warn about PCH files that are found but not used
259
260 Wlong-long
261 C ObjC C++ ObjC++
262 Do not warn about using \"long long\" when -pedantic
263
264 Wmain
265 C ObjC
266 Warn about suspicious declarations of \"main\"
267
268 Wmissing-braces
269 C ObjC C++ ObjC++
270 Warn about possibly missing braces around initializers
271
272 Wmissing-declarations
273 C ObjC
274 Warn about global functions without previous declarations
275
276 Wmissing-format-attribute
277 C ObjC C++ ObjC++
278 Warn about functions which might be candidates for format attributes
279
280 Wmissing-prototypes
281 C ObjC
282 Warn about global functions without prototypes
283
284 Wmultichar
285 C ObjC C++ ObjC++
286 Warn about use of multi-character character constants
287
288 Wnested-externs
289 C ObjC
290 Warn about \"extern\" declarations not at file scope
291
292 Wnon-template-friend
293 C++ ObjC++
294 Warn when non-templatized friend functions are declared within a template
295
296 Wnon-virtual-dtor
297 C++ ObjC++
298 Warn about non-virtual destructors
299
300 Wnonnull
301 C ObjC
302
303 Wold-style-cast
304 C++ ObjC++
305 Warn if a C-style cast is used in a program
306
307 Woverloaded-virtual
308 C++ ObjC++
309 Warn about overloaded virtual function names
310
311 Wparentheses
312 C ObjC C++ ObjC++
313 Warn about possibly missing parentheses
314
315 Wpmf-conversions
316 C++ ObjC++
317 Warn when converting the type of pointers to member functions
318
319 Wpointer-arith
320 C ObjC C++ ObjC++
321 Warn about function pointer arithmetic
322
323 Wprotocol
324 ObjC ObjC++
325 Warn if inherited methods are unimplemented
326
327 Wredundant-decls
328 C ObjC C++ ObjC++
329 Warn about multiple declarations of the same object
330
331 Wreorder
332 C++ ObjC++
333 Warn when the compiler reorders code
334
335 Wreturn-type
336 C ObjC C++ ObjC++
337 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
338
339 Wselector
340 ObjC ObjC++
341 Warn if a selector has multiple methods
342
343 Wsequence-point
344 C ObjC
345 Warn about possible violations of sequence point rules
346
347 Wsign-compare
348 C ObjC C++ ObjC++
349 Warn about signed-unsigned comparisons
350
351 Wsign-promo
352 C++ ObjC++
353 Warn when overload promotes from unsigned to signed
354
355 Wstrict-prototypes
356 C ObjC
357 Warn about unprototyped function declarations
358
359 Wsynth
360 C++ ObjC++
361 Warn when synthesis behavior differs from Cfront
362
363 Wsystem-headers
364 C ObjC C++ ObjC++
365 Do not suppress warnings from system headers
366
367 Wtraditional
368 C ObjC
369 Warn about features not present in traditional C
370
371 Wtrigraphs
372 C ObjC C++ ObjC++
373 Warn if trigraphs are encountered that might affect the meaning of the program
374
375 Wundeclared-selector
376 ObjC ObjC++
377
378 Wundef
379 C ObjC C++ ObjC++
380 Warn if an undefined macro is used in an #if directive
381
382 Wunknown-pragmas
383 C ObjC C++ ObjC++
384 Warn about unrecognized pragmas
385
386 Wunused-macros
387 C ObjC C++ ObjC++
388 Warn about macros defined in the main file that are not used
389
390 Wwrite-strings
391 C ObjC C++ ObjC++
392 Give strings the type \"array of char\"
393
394 ansi
395 C ObjC C++ ObjC++
396 A synonym for -std=c89.  In a future version of GCC it will become synonymous with -std=c99 instead
397
398 d
399 C ObjC C++ ObjC++ Joined
400 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
401
402 fabi-version=
403 C++ ObjC++ Joined UInteger
404
405 faccess-control
406 C++ ObjC++
407 Enforce class member access control semantics
408
409 fall-virtual
410 C++ ObjC++
411
412 falt-external-templates
413 C++ ObjC++
414 Change when template instances are emitted
415
416 fasm
417 C ObjC C++ ObjC++
418 Recognize the \"asm\" keyword
419
420 fbuiltin
421 C ObjC C++ ObjC++
422 Recognize built-in functions
423
424 fbuiltin-
425 C ObjC C++ ObjC++ Joined
426
427 fcheck-new
428 C++ ObjC++
429 Check the return value of new
430
431 fcond-mismatch
432 C ObjC C++ ObjC++
433 Allow the arguments of the '?' operator to have different types
434
435 fconserve-space
436 C++ ObjC++
437 Reduce the size of object files
438
439 fconst-strings
440 C++ ObjC++
441 Make string literals \"const char[]\" not \"char[]\"
442
443 fconstant-string-class=
444 ObjC ObjC++ Joined
445 -fconst-string-class=<name>     Use class <name> for constant strings
446
447 fdefault-inline
448 C++ ObjC++
449 Inline member functions by default
450
451 fdollars-in-identifiers
452 C ObjC C++ ObjC++
453 Permit '$' as an identifier character
454
455 fdump-
456 C ObjC C++ ObjC++ Joined RejectNegative
457 -fdump-<type>   Dump various compiler internals to a file
458
459 felide-constructors
460 C++ ObjC++
461
462 fenforce-eh-specs
463 C++ ObjC++
464 Generate code to check exception specifications
465
466 fenum-int-equiv
467 C++ ObjC++
468
469 fexec-charset=
470 C ObjC C++ ObjC++ Joined RejectNegative
471 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
472
473 fexternal-templates
474 C++ ObjC++
475
476 ffixed-form
477 C ObjC
478
479 ffixed-line-length-
480 C ObjC Joined
481
482 ffor-scope
483 C++ ObjC++
484 Scope of for-init-statement variables is local to the loop
485
486 ffreestanding
487 C ObjC
488 Do not assume that standard C libraries and \"main\" exist
489
490 fgnu-keywords
491 C++ ObjC++
492 Recognize GNU-defined keywords
493
494 fgnu-runtime
495 ObjC ObjC++
496 Generate code for GNU runtime environment
497
498 fguiding-decls
499 C++ ObjC++
500
501 fhandle-exceptions
502 C++ ObjC++
503
504 fhonor-std
505 C++ ObjC++
506
507 fhosted
508 C ObjC
509 Assume normal C execution environment
510
511 fhuge-objects
512 C++ ObjC++
513 Enable support for huge objects
514
515 fimplement-inlines
516 C++ ObjC++
517 Export functions even if they can be inlined
518
519 fimplicit-inline-templates
520 C++ ObjC++
521 Emit implicit instantiations of inline templates
522
523 fimplicit-templates
524 C++ ObjC++
525 Emit implicit instantiations of templates
526
527 flabels-ok
528 C++ ObjC++
529
530 fms-extensions
531 C ObjC C++ ObjC++
532 Don't warn about uses of Microsoft extensions
533
534 fname-mangling-version-
535 C++ ObjC++ Joined
536
537 fnew-abi
538 C++ ObjC++
539
540 fnext-runtime
541 ObjC ObjC++
542 Generate code for NeXT runtime environment
543
544 fnonansi-builtins
545 C++ ObjC++
546
547 fnonnull-objects
548 C++ ObjC++
549
550 foperator-names
551 C++ ObjC++
552 Recognize C++ kewords like \"compl\" and \"xor\"
553
554 foptional-diags
555 C++ ObjC++
556 Enable optional diagnostics
557
558 fpch-deps
559 C ObjC C++ ObjC++
560
561 fpermissive
562 C++ ObjC++
563 Downgrade conformance errors to warnings
564
565 fpreprocessed
566 C ObjC C++ ObjC++
567 Treat the input file as already preprocessed
568
569 frepo
570 C++ ObjC++
571 Enable automatic template instantiation
572
573 frtti
574 C++ ObjC++
575 Generate run time type descriptor information
576
577 fshort-double
578 C ObjC C++ ObjC++
579 Use the same size for double as for float
580
581 fshort-enums
582 C ObjC C++ ObjC++
583 Use the narrowest integer type possible for enumeration types
584
585 fshort-wchar
586 C ObjC C++ ObjC++
587 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
588
589 fshow-column
590 C ObjC C++ ObjC++
591
592 fsigned-bitfields
593 C ObjC C++ ObjC++
594 When \"signed\" or \"unsigned\" is not given make the bitfield signed
595
596 fsigned-char
597 C ObjC C++ ObjC++
598 Make \"char\" signed by default
599
600 fsquangle
601 C++ ObjC++
602
603 fstats
604 C++ ObjC++
605 Display statistics accumulated during compilation
606
607 fstrict-prototype
608 C++ ObjC++
609
610 ftabstop=
611 C ObjC C++ ObjC++ Joined RejectNegative UInteger
612 -ftabstop=<number>      Distance between tab stops for column reporting
613
614 ftemplate-depth-
615 C++ ObjC++ Joined RejectNegative UInteger 
616 -ftemplate-depth-<number>       Specify maximum template instantiation depth
617
618 fthis-is-variable
619 C++ ObjC++
620
621 funsigned-bitfields
622 C ObjC C++ ObjC++
623 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
624
625 funsigned-char
626 C ObjC C++ ObjC++
627 Make \"char\" unsigned by default
628
629 fuse-cxa-atexit
630 C++ ObjC++
631 Use __cxa_atexit to register destructors
632
633 fvtable-gc
634 C++ ObjC++
635 Discard unused virtual functions
636
637 fvtable-thunks
638 C++ ObjC++
639 Implement vtables using thunks
640
641 fweak
642 C++ ObjC++
643 Emit common-like symbols as weak symbols
644
645 fwide-exec-charset=
646 C ObjC C++ ObjC++ Joined RejectNegative
647 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>
648
649 fxref
650 C++ ObjC++
651 Emit cross referencing information
652
653 gen-decls
654 ObjC ObjC++
655 Dump declarations to a .decl file
656
657 idirafter
658 C ObjC C++ ObjC++ Joined Separate
659 -idirafter <dir>        Add <dir> to the end of the system include path
660
661 imacros
662 C ObjC C++ ObjC++ Joined Separate
663 -imacros <file> Accept definition of macros in <file>
664
665 include
666 C ObjC C++ ObjC++ Joined Separate
667 -include <file> Include the contents of <file> before other files
668
669 iprefix
670 C ObjC C++ ObjC++ Joined Separate
671 -iprefix <path> Specify <path> as a prefix for next two options
672
673 isysroot
674 C ObjC C++ ObjC++ Joined Separate
675 -isysroot <dir> Set <dir> to be the system root directory
676
677 isystem
678 C ObjC C++ ObjC++ Joined Separate
679 -isystem <dir>  Add <dir> to the start of the system include path
680
681 iwithprefix
682 C ObjC C++ ObjC++ Joined Separate
683 -iwithprefix <dir>      Add <dir> to the end of the system include path
684
685 iwithprefixbefore
686 C ObjC C++ ObjC++ Joined Separate
687 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
688
689 lang-asm
690 C Undocumented
691
692 lang-objc
693 C ObjC C++ ObjC++ Undocumented
694
695 nostdinc
696 C ObjC C++ ObjC++
697 Do not search standard system include directories (those specified with -isystem will still be used)
698
699 nostdinc++
700 C++ ObjC++
701 Do not search standard system include directories for C++
702
703 o
704 C ObjC C++ ObjC++ Joined Separate
705 ; Documented in common.opt
706
707 pedantic
708 C ObjC C++ ObjC++
709 ; Documented in common.opt
710
711 pedantic-errors
712 C ObjC C++ ObjC++
713 ; Documented in common.opt
714
715 print-objc-runtime-info
716 ObjC ObjC++
717 Generate C header of platform-specific features
718
719 remap
720 C ObjC C++ ObjC++
721 Remap file names when including files
722
723 std=c++98
724 C++ ObjC++
725 Conform to the ISO 1998 C++ standard
726
727 std=c89
728 C ObjC
729 Conform to the ISO 1990 C standard
730
731 std=c99
732 C ObjC
733 Conform to the ISO 1999 C standard
734
735 std=c9x
736 C ObjC
737 Deprecated in favor of -std=c99
738
739 std=gnu++98
740 C++ ObjC++
741 Conform to the ISO 1998 C++ standard with GNU extensions
742
743 std=gnu89
744 C ObjC
745 Conform to the ISO 1990 C standard with GNU extensions
746
747 std=gnu99
748 C ObjC
749 Conform to the ISO 1999 C standard with GNU extensions
750
751 std=gnu9x
752 C ObjC
753 Deprecated in favor of -std=gnu99
754
755 std=iso9899:1990
756 C ObjC
757 Deprecated in favor of -std=c89
758
759 std=iso9899:199409
760 C ObjC
761 Conform to the ISO 1990 C standard as amended in 1994
762
763 std=iso9899:1999
764 C ObjC
765 Deprecated in favor of -std=c99
766
767 std=iso9899:199x
768 C ObjC
769 Deprecated in favor of -std=c99
770
771 traditional-cpp
772 C ObjC C++ ObjC++
773 Enable traditional preprocessing
774
775 trigraphs
776 C ObjC C++ ObjC++
777 -trigraphs      Support ISO C trigraphs
778
779 undef
780 C ObjC C++ ObjC++
781 Do not predefine system-specific and GCC-specific macros
782
783 v
784 C ObjC C++ ObjC++
785 Enable verbose output
786
787 w
788 C ObjC C++ ObjC++
789 ; Documented in common.opt
790
791 ; This comment is to ensure we retain the blank line above.