OSDN Git Service

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