OSDN Git Service

PR target/21101
[pf3gnuchains/gcc-fork.git] / gcc / c.opt
1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003, 2004, 2005 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 ; See the GCC internals manual for a description of this file's format.
22
23 ; Please try to keep this file in ASCII collating order.
24
25 Language
26 C
27
28 Language
29 ObjC
30
31 Language
32 C++
33
34 Language
35 ObjC++
36
37 -output-pch=
38 C ObjC C++ ObjC++ Joined Separate
39
40 A
41 C ObjC C++ ObjC++ Joined Separate
42 -A<question>=<answer>   Assert the <answer> to <question>.  Putting '-' before <question> disables the <answer> to <question>
43
44 C
45 C ObjC C++ ObjC++
46 Do not discard comments
47
48 CC
49 C ObjC C++ ObjC++
50 Do not discard comments in macro expansions
51
52 D
53 C ObjC C++ ObjC++ Joined Separate
54 -D<macro>[=<val>]       Define a <macro> with <val> as its value.  If just <macro> is given, <val> is taken to be 1
55
56 E
57 C ObjC C++ ObjC++ Undocumented
58
59 F
60 C ObjC C++ ObjC++ Joined Separate
61 -F <dir>        Add <dir> to the end of the main framework include path
62
63 H
64 C ObjC C++ ObjC++
65 Print the name of header files as they are used
66
67 I
68 C ObjC C++ ObjC++ Joined Separate
69 -I <dir>        Add <dir> to the end of the main include path
70
71 M
72 C ObjC C++ ObjC++
73 Generate make dependencies
74
75 MD
76 C ObjC C++ ObjC++ Separate
77 Generate make dependencies and compile
78
79 MF
80 C ObjC C++ ObjC++ Joined Separate
81 -MF <file>      Write dependency output to the given file
82
83 MG
84 C ObjC C++ ObjC++
85 Treat missing header files as generated files
86
87 MM
88 C ObjC C++ ObjC++
89 Like -M but ignore system header files
90
91 MMD
92 C ObjC C++ ObjC++ Separate
93 Like -MD but ignore system header files
94
95 MP
96 C ObjC C++ ObjC++
97 Generate phony targets for all headers
98
99 MQ
100 C ObjC C++ ObjC++ Joined Separate
101 -MQ <target>    Add a MAKE-quoted target
102
103 MT
104 C ObjC C++ ObjC++ Joined Separate
105 -MT <target>    Add an unquoted target
106
107 P
108 C ObjC C++ ObjC++
109 Do not generate #line directives
110
111 U
112 C ObjC C++ ObjC++ Joined Separate
113 -U<macro>       Undefine <macro>
114
115 Wabi
116 C++ ObjC++ Var(warn_abi)
117 Warn about things that will change when compiling with an ABI-compliant compiler
118
119 Wall
120 C ObjC C++ ObjC++
121 Enable most warning messages
122
123 Wbad-function-cast
124 C ObjC Var(warn_bad_function_cast)
125 Warn about casting functions to incompatible types
126
127 Wcast-qual
128 C ObjC C++ ObjC++ Var(warn_cast_qual)
129 Warn about casts which discard qualifiers
130
131 Wchar-subscripts
132 C ObjC C++ ObjC++ Var(warn_char_subscripts)
133 Warn about subscripts whose type is \"char\"
134
135 Wcomment
136 C ObjC C++ ObjC++
137 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
138
139 Wcomments
140 C ObjC C++ ObjC++
141 Synonym for -Wcomment
142
143 Wconversion
144 C ObjC C++ ObjC++ Var(warn_conversion)
145 Warn about possibly confusing type conversions
146
147 Wctor-dtor-privacy
148 C++ ObjC++ Var(warn_ctor_dtor_privacy)
149 Warn when all constructors and destructors are private
150
151 Wdeclaration-after-statement
152 C ObjC Var(warn_declaration_after_statement)
153 Warn when a declaration is found after a statement
154
155 Wdeprecated
156 C++ ObjC++ Var(warn_deprecated) Init(1)
157 Warn about deprecated compiler features
158
159 Wdiv-by-zero
160 C ObjC Var(warn_div_by_zero) Init(1)
161 Warn about compile-time integer division by zero
162
163 Weffc++
164 C++ ObjC++ Var(warn_ecpp)
165 Warn about violations of Effective C++ style rules
166
167 Wendif-labels
168 C ObjC C++ ObjC++
169 Warn about stray tokens after #elif and #endif
170
171 Werror
172 C ObjC C++ ObjC++
173 ; Documented in common.opt
174
175 Werror-implicit-function-declaration
176 C ObjC RejectNegative
177 Make implicit function declarations an error
178
179 Wfloat-equal
180 C ObjC C++ ObjC++ Var(warn_float_equal)
181 Warn if testing floating point numbers for equality
182
183 Wformat
184 C ObjC C++ ObjC++
185 Warn about printf/scanf/strftime/strfmon format string anomalies
186
187 Wformat-extra-args
188 C ObjC C++ ObjC++ Var(warn_format_extra_args)
189 Warn if passing too many arguments to a function for its format string
190
191 Wformat-nonliteral
192 C ObjC C++ ObjC++ Var(warn_format_nonliteral)
193 Warn about format strings that are not literals
194
195 Wformat-security
196 C ObjC C++ ObjC++ Var(warn_format_security)
197 Warn about possible security problems with format functions
198
199 Wformat-y2k
200 C ObjC C++ ObjC++ Var(warn_format_y2k)
201 Warn about strftime formats yielding 2-digit years
202
203 Wformat-zero-length
204 C ObjC Var(warn_format_zero_length)
205 Warn about zero-length formats
206
207 Wformat=
208 C ObjC C++ ObjC++ Joined
209
210 Winit-self
211 C ObjC C++ ObjC++ Var(warn_init_self)
212 Warn about variables which are initialized to themselves.
213
214 Wimplicit
215 C ObjC C++ ObjC++
216
217 Wimplicit-function-declaration
218 C ObjC Var(mesg_implicit_function_declaration) Init(-1)
219 Warn about implicit function declarations
220
221 Wimplicit-int
222 C ObjC Var(warn_implicit_int)
223 Warn when a declaration does not specify a type
224
225 Wimport
226 C ObjC C++ ObjC++
227 Deprecated.  This switch has no effect.
228
229 Wint-to-pointer-cast
230 C ObjC Var(warn_int_to_pointer_cast) Init(1)
231 Warn when there is a cast to a pointer from an integer of a different size
232
233 Winvalid-offsetof
234 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
235 Warn about invalid uses of the \"offsetof\" macro
236
237 Winvalid-pch
238 C ObjC C++ ObjC++
239 Warn about PCH files that are found but not used
240
241 Wlong-long
242 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
243 Do not warn about using \"long long\" when -pedantic
244
245 Wmain
246 C ObjC
247 Warn about suspicious declarations of \"main\"
248
249 Wmissing-braces
250 C ObjC C++ ObjC++ Var(warn_missing_braces)
251 Warn about possibly missing braces around initializers
252
253 Wmissing-declarations
254 C ObjC Var(warn_missing_declarations)
255 Warn about global functions without previous declarations
256
257 Wmissing-field-initializers
258 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
259 Warn about missing fields in struct initializers
260
261 Wmissing-format-attribute
262 C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
263 Warn about functions which might be candidates for format attributes
264
265 Wmissing-include-dirs
266 C ObjC C++ ObjC++
267 Warn about user-specified include directories that do not exist
268
269 Wmissing-prototypes
270 C ObjC Var(warn_missing_prototypes)
271 Warn about global functions without prototypes
272
273 Wmultichar
274 C ObjC C++ ObjC++
275 Warn about use of multi-character character constants
276
277 Wnested-externs
278 C ObjC Var(warn_nested_externs)
279 Warn about \"extern\" declarations not at file scope
280
281 Wnon-template-friend
282 C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
283 Warn when non-templatized friend functions are declared within a template
284
285 Wnon-virtual-dtor
286 C++ ObjC++ Var(warn_nonvdtor)
287 Warn about non-virtual destructors
288
289 Wnonnull
290 C ObjC Var(warn_nonnull)
291 Warn about NULL being passed to argument slots marked as requiring non-NULL
292
293 Wnormalized=
294 C ObjC C++ ObjC++ Joined
295 -Wnormalized=<id|nfc|nfkc>      Warn about non-normalised Unicode strings
296
297 Wold-style-cast
298 C++ ObjC++ Var(warn_old_style_cast)
299 Warn if a C-style cast is used in a program
300
301 Wold-style-definition
302 C ObjC Var(warn_old_style_definition)
303 Warn if an old-style parameter definition is used
304
305 Woverloaded-virtual
306 C++ ObjC++ Var(warn_overloaded_virtual)
307 Warn about overloaded virtual function names
308
309 Wparentheses
310 C ObjC C++ ObjC++ Var(warn_parentheses)
311 Warn about possibly missing parentheses
312
313 Wpmf-conversions
314 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
315 Warn when converting the type of pointers to member functions
316
317 Wpointer-arith
318 C ObjC C++ ObjC++ Var(warn_pointer_arith)
319 Warn about function pointer arithmetic
320
321 Wpointer-to-int-cast
322 C ObjC Var(warn_pointer_to_int_cast) Init(1)
323 Warn when a pointer is cast to an integer of a different size
324
325 Wprotocol
326 ObjC ObjC++ Var(warn_protocol) Init(1)
327 Warn if inherited methods are unimplemented
328
329 Wredundant-decls
330 C ObjC C++ ObjC++ Var(warn_redundant_decls)
331 Warn about multiple declarations of the same object
332
333 Wreorder
334 C++ ObjC++ Var(warn_reorder)
335 Warn when the compiler reorders code
336
337 Wreturn-type
338 C ObjC C++ ObjC++
339 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
340
341 Wselector
342 ObjC ObjC++ Var(warn_selector)
343 Warn if a selector has multiple methods
344
345 Wsequence-point
346 C ObjC C++ ObjC++ Var(warn_sequence_point)
347 Warn about possible violations of sequence point rules
348
349 Wsign-compare
350 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
351 Warn about signed-unsigned comparisons
352
353 Wsign-promo
354 C++ ObjC++ Var(warn_sign_promo)
355 Warn when overload promotes from unsigned to signed
356
357 Wstrict-prototypes
358 C ObjC Var(warn_strict_prototypes)
359 Warn about unprototyped function declarations
360
361 Wsynth
362 C++ ObjC++ Var(warn_synth)
363 Warn when synthesis behavior differs from Cfront
364
365 Wsystem-headers
366 C ObjC C++ ObjC++
367 Do not suppress warnings from system headers
368
369 Wtraditional
370 C ObjC Var(warn_traditional)
371 Warn about features not present in traditional C
372
373 Wtrigraphs
374 C ObjC C++ ObjC++
375 Warn if trigraphs are encountered that might affect the meaning of the program
376
377 Wundeclared-selector
378 ObjC ObjC++ Var(warn_undeclared_selector)
379 Warn about @selector()s without previously declared methods
380
381 Wundef
382 C ObjC C++ ObjC++
383 Warn if an undefined macro is used in an #if directive
384
385 Wunknown-pragmas
386 C ObjC C++ ObjC++
387 Warn about unrecognized pragmas
388
389 Wunused-macros
390 C ObjC C++ ObjC++
391 Warn about macros defined in the main file that are not used
392
393 Wvariadic-macros
394 C ObjC C++ ObjC++
395 Do not warn about using variadic macros when -pedantic
396
397 Wwrite-strings
398 C ObjC C++ ObjC++
399 Give strings the type \"array of char\"
400
401 Wpointer-sign
402 C ObjC Var(warn_pointer_sign) Init(1)
403 Warn when a pointer differs in signedness in an assignment.
404
405 ansi
406 C ObjC C++ ObjC++
407 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
408
409 d
410 C ObjC C++ ObjC++ Joined
411 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
412
413 faccess-control
414 C++ ObjC++
415 Enforce class member access control semantics
416
417 fall-virtual
418 C++ ObjC++
419
420 falt-external-templates
421 C++ ObjC++
422 Change when template instances are emitted
423
424 fasm
425 C ObjC C++ ObjC++
426 Recognize the \"asm\" keyword
427
428 fbuiltin
429 C ObjC C++ ObjC++
430 Recognize built-in functions
431
432 fbuiltin-
433 C ObjC C++ ObjC++ Joined
434
435 fcheck-new
436 C++ ObjC++
437 Check the return value of new
438
439 fcond-mismatch
440 C ObjC C++ ObjC++
441 Allow the arguments of the '?' operator to have different types
442
443 fconserve-space
444 C++ ObjC++
445 Reduce the size of object files
446
447 fconst-strings
448 C++ ObjC++
449 Make string literals \"const char[]\" not \"char[]\"
450
451 fconstant-string-class=
452 ObjC ObjC++ Joined
453 -fconst-string-class=<name>     Use class <name> for constant strings
454
455 fdefault-inline
456 C++ ObjC++
457 Inline member functions by default
458
459 fdollars-in-identifiers
460 C ObjC C++ ObjC++
461 Permit '$' as an identifier character
462
463 felide-constructors
464 C++ ObjC++
465
466 fenforce-eh-specs
467 C++ ObjC++
468 Generate code to check exception specifications
469
470 fenum-int-equiv
471 C++ ObjC++
472
473 fexec-charset=
474 C ObjC C++ ObjC++ Joined RejectNegative
475 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
476
477 finput-charset=
478 C ObjC C++ ObjC++ Joined RejectNegative
479 -finput-charset=<cset>  Specify the default character set for source files.
480
481
482 fexternal-templates
483 C++ ObjC++
484
485 ffixed-form
486 C ObjC
487
488 ffixed-line-length-
489 C ObjC Joined
490
491 ffor-scope
492 C++ ObjC++
493 Scope of for-init-statement variables is local to the loop
494
495 ffreestanding
496 C ObjC
497 Do not assume that standard C libraries and \"main\" exist
498
499 fgnu-keywords
500 C++ ObjC++
501 Recognize GNU-defined keywords
502
503 fgnu-runtime
504 ObjC ObjC++
505 Generate code for GNU runtime environment
506
507 fguiding-decls
508 C++ ObjC++
509
510 fhandle-exceptions
511 C++ ObjC++
512
513 fhonor-std
514 C++ ObjC++
515
516 fhosted
517 C ObjC
518 Assume normal C execution environment
519
520 fhuge-objects
521 C++ ObjC++
522 Enable support for huge objects
523
524 fimplement-inlines
525 C++ ObjC++
526 Export functions even if they can be inlined
527
528 fimplicit-inline-templates
529 C++ ObjC++
530 Emit implicit instantiations of inline templates
531
532 fimplicit-templates
533 C++ ObjC++
534 Emit implicit instantiations of templates
535
536 flabels-ok
537 C++ ObjC++
538
539 fms-extensions
540 C ObjC C++ ObjC++
541 Don't warn about uses of Microsoft extensions
542
543 fname-mangling-version-
544 C++ ObjC++ Joined
545
546 fnew-abi
547 C++ ObjC++
548
549 fnext-runtime
550 ObjC ObjC++
551 Generate code for NeXT (Apple Mac OS X) runtime environment
552
553 fnil-receivers
554 ObjC ObjC++
555 Assume that receivers of Objective-C messages may be nil
556
557 fnonansi-builtins
558 C++ ObjC++
559
560 fnonnull-objects
561 C++ ObjC++
562
563 fobjc-exceptions
564 ObjC ObjC++
565 Enable Objective-C exception and synchronization syntax
566
567 fobjc-sjlj-exceptions
568 ObjC ObjC++
569 Enable Objective-C setjmp exception handling runtime
570
571 foperator-names
572 C++ ObjC++
573 Recognize C++ kewords like \"compl\" and \"xor\"
574
575 foptional-diags
576 C++ ObjC++
577 Enable optional diagnostics
578
579 fpch-deps
580 C ObjC C++ ObjC++
581
582 fpch-preprocess
583 C ObjC C++ ObjC++
584 Look for and use PCH files even when preprocessing
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 fsigned-bitfields
619 C ObjC C++ ObjC++
620 When \"signed\" or \"unsigned\" is not given make the bitfield signed
621
622 fsigned-char
623 C ObjC C++ ObjC++
624 Make \"char\" signed by default
625
626 fsquangle
627 C++ ObjC++
628
629 fstats
630 C++ ObjC++
631 Display statistics accumulated during compilation
632
633 fstrict-prototype
634 C++ ObjC++
635
636 ftabstop=
637 C ObjC C++ ObjC++ Joined RejectNegative UInteger
638 -ftabstop=<number>      Distance between tab stops for column reporting
639
640 ftemplate-depth-
641 C++ ObjC++ Joined RejectNegative UInteger 
642 -ftemplate-depth-<number>       Specify maximum template instantiation depth
643
644 fthis-is-variable
645 C++ ObjC++
646
647 fthreadsafe-statics
648 C++ ObjC++
649 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
650
651 funsigned-bitfields
652 C ObjC C++ ObjC++
653 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
654
655 funsigned-char
656 C ObjC C++ ObjC++
657 Make \"char\" unsigned by default
658
659 fuse-cxa-atexit
660 C++ ObjC++
661 Use __cxa_atexit to register destructors
662
663 fvisibility-inlines-hidden
664 C++ ObjC++
665 Marks all inlined methods as having hidden visibility
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 iquote
724 C ObjC C++ ObjC++ Joined Separate
725 -iquote <dir>   Add <dir> to the end of the quote include path
726
727 iwithprefix
728 C ObjC C++ ObjC++ Joined Separate
729 -iwithprefix <dir>      Add <dir> to the end of the system include path
730
731 iwithprefixbefore
732 C ObjC C++ ObjC++ Joined Separate
733 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
734
735 lang-asm
736 C Undocumented
737
738 lang-objc
739 C ObjC C++ ObjC++ Undocumented
740
741 nostdinc
742 C ObjC C++ ObjC++
743 Do not search standard system include directories (those specified with -isystem will still be used)
744
745 nostdinc++
746 C++ ObjC++
747 Do not search standard system include directories for C++
748
749 o
750 C ObjC C++ ObjC++ Joined Separate
751 ; Documented in common.opt
752
753 pedantic
754 C ObjC C++ ObjC++
755 ; Documented in common.opt
756
757 pedantic-errors
758 C ObjC C++ ObjC++
759 ; Documented in common.opt
760
761 print-objc-runtime-info
762 ObjC ObjC++
763 Generate C header of platform-specific features
764
765 remap
766 C ObjC C++ ObjC++
767 Remap file names when including files
768
769 std=c++98
770 C++ ObjC++
771 Conform to the ISO 1998 C++ standard
772
773 std=c89
774 C ObjC
775 Conform to the ISO 1990 C standard
776
777 std=c99
778 C ObjC
779 Conform to the ISO 1999 C standard
780
781 std=c9x
782 C ObjC
783 Deprecated in favor of -std=c99
784
785 std=gnu++98
786 C++ ObjC++
787 Conform to the ISO 1998 C++ standard with GNU extensions
788
789 std=gnu89
790 C ObjC
791 Conform to the ISO 1990 C standard with GNU extensions
792
793 std=gnu99
794 C ObjC
795 Conform to the ISO 1999 C standard with GNU extensions
796
797 std=gnu9x
798 C ObjC
799 Deprecated in favor of -std=gnu99
800
801 std=iso9899:1990
802 C ObjC
803 Conform to the ISO 1990 C standard
804
805 std=iso9899:199409
806 C ObjC
807 Conform to the ISO 1990 C standard as amended in 1994
808
809 std=iso9899:1999
810 C ObjC
811 Conform to the ISO 1999 C standard
812
813 std=iso9899:199x
814 C ObjC
815 Deprecated in favor of -std=iso9899:1999
816
817 traditional-cpp
818 C ObjC C++ ObjC++
819 Enable traditional preprocessing
820
821 trigraphs
822 C ObjC C++ ObjC++
823 -trigraphs      Support ISO C trigraphs
824
825 undef
826 C ObjC C++ ObjC++
827 Do not predefine system-specific and GCC-specific macros
828
829 v
830 C ObjC C++ ObjC++
831 Enable verbose output
832
833 w
834 C ObjC C++ ObjC++
835 ; Documented in common.opt
836
837 ; This comment is to ensure we retain the blank line above.