OSDN Git Service

* c.opt (-F): Remove trailing whitespace from help string.
[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 Winvalid-offsetof
230 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
231 Warn about invalid uses of the \"offsetof\" macro
232
233 Winvalid-pch
234 C ObjC C++ ObjC++
235 Warn about PCH files that are found but not used
236
237 Wlong-long
238 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
239 Do not warn about using \"long long\" when -pedantic
240
241 Wmain
242 C ObjC
243 Warn about suspicious declarations of \"main\"
244
245 Wmissing-braces
246 C ObjC C++ ObjC++ Var(warn_missing_braces)
247 Warn about possibly missing braces around initializers
248
249 Wmissing-declarations
250 C ObjC Var(warn_missing_declarations)
251 Warn about global functions without previous declarations
252
253 Wmissing-field-initializers
254 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
255 Warn about missing fields in struct initializers
256
257 Wmissing-format-attribute
258 C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
259 Warn about functions which might be candidates for format attributes
260
261 Wmissing-include-dirs
262 C ObjC C++ ObjC++
263 Warn about user-specified include directories that do not exist
264
265 Wmissing-prototypes
266 C ObjC Var(warn_missing_prototypes)
267 Warn about global functions without prototypes
268
269 Wmultichar
270 C ObjC C++ ObjC++
271 Warn about use of multi-character character constants
272
273 Wnested-externs
274 C ObjC Var(warn_nested_externs)
275 Warn about \"extern\" declarations not at file scope
276
277 Wnon-template-friend
278 C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
279 Warn when non-templatized friend functions are declared within a template
280
281 Wnon-virtual-dtor
282 C++ ObjC++ Var(warn_nonvdtor)
283 Warn about non-virtual destructors
284
285 Wnonnull
286 C ObjC Var(warn_nonnull)
287 Warn about NULL being passed to argument slots marked as requiring non-NULL
288
289 Wnormalized=
290 C ObjC C++ ObjC++ Joined
291 -Wnormalized=<id|nfc|nfkc>      Warn about non-normalised Unicode strings
292
293 Wold-style-cast
294 C++ ObjC++ Var(warn_old_style_cast)
295 Warn if a C-style cast is used in a program
296
297 Wold-style-definition
298 C ObjC Var(warn_old_style_definition)
299 Warn if an old-style parameter definition is used
300
301 Woverloaded-virtual
302 C++ ObjC++ Var(warn_overloaded_virtual)
303 Warn about overloaded virtual function names
304
305 Wparentheses
306 C ObjC C++ ObjC++ Var(warn_parentheses)
307 Warn about possibly missing parentheses
308
309 Wpmf-conversions
310 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
311 Warn when converting the type of pointers to member functions
312
313 Wpointer-arith
314 C ObjC C++ ObjC++ Var(warn_pointer_arith)
315 Warn about function pointer arithmetic
316
317 Wprotocol
318 ObjC ObjC++ Var(warn_protocol) Init(1)
319 Warn if inherited methods are unimplemented
320
321 Wredundant-decls
322 C ObjC C++ ObjC++ Var(warn_redundant_decls)
323 Warn about multiple declarations of the same object
324
325 Wreorder
326 C++ ObjC++ Var(warn_reorder)
327 Warn when the compiler reorders code
328
329 Wreturn-type
330 C ObjC C++ ObjC++
331 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
332
333 Wselector
334 ObjC ObjC++ Var(warn_selector)
335 Warn if a selector has multiple methods
336
337 Wsequence-point
338 C ObjC C++ ObjC++ Var(warn_sequence_point)
339 Warn about possible violations of sequence point rules
340
341 Wsign-compare
342 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
343 Warn about signed-unsigned comparisons
344
345 Wsign-promo
346 C++ ObjC++ Var(warn_sign_promo)
347 Warn when overload promotes from unsigned to signed
348
349 Wstrict-prototypes
350 C ObjC Var(warn_strict_prototypes)
351 Warn about unprototyped function declarations
352
353 Wsynth
354 C++ ObjC++ Var(warn_synth)
355 Warn when synthesis behavior differs from Cfront
356
357 Wsystem-headers
358 C ObjC C++ ObjC++
359 Do not suppress warnings from system headers
360
361 Wtraditional
362 C ObjC Var(warn_traditional)
363 Warn about features not present in traditional C
364
365 Wtrigraphs
366 C ObjC C++ ObjC++
367 Warn if trigraphs are encountered that might affect the meaning of the program
368
369 Wundeclared-selector
370 ObjC ObjC++ Var(warn_undeclared_selector)
371 Warn about @selector()s without previously declared methods
372
373 Wundef
374 C ObjC C++ ObjC++
375 Warn if an undefined macro is used in an #if directive
376
377 Wunknown-pragmas
378 C ObjC C++ ObjC++
379 Warn about unrecognized pragmas
380
381 Wunused-macros
382 C ObjC C++ ObjC++
383 Warn about macros defined in the main file that are not used
384
385 Wvariadic-macros
386 C ObjC C++ ObjC++
387 Do not warn about using variadic macros when -pedantic
388
389 Wwrite-strings
390 C ObjC C++ ObjC++
391 Give strings the type \"array of char\"
392
393 Wpointer-sign
394 C ObjC Var(warn_pointer_sign) Init(1)
395 Warn when a pointer differs in signedness in an assignment.
396
397 ansi
398 C ObjC C++ ObjC++
399 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
400
401 d
402 C ObjC C++ ObjC++ Joined
403 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
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 felide-constructors
456 C++ ObjC++
457
458 fenforce-eh-specs
459 C++ ObjC++
460 Generate code to check exception specifications
461
462 fenum-int-equiv
463 C++ ObjC++
464
465 fexec-charset=
466 C ObjC C++ ObjC++ Joined RejectNegative
467 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
468
469 finput-charset=
470 C ObjC C++ ObjC++ Joined RejectNegative
471 -finput-charset=<cset>  Specify the default character set for source files.
472
473
474 fexternal-templates
475 C++ ObjC++
476
477 ffixed-form
478 C ObjC
479
480 ffixed-line-length-
481 C ObjC Joined
482
483 ffor-scope
484 C++ ObjC++
485 Scope of for-init-statement variables is local to the loop
486
487 ffreestanding
488 C ObjC
489 Do not assume that standard C libraries and \"main\" exist
490
491 fgnu-keywords
492 C++ ObjC++
493 Recognize GNU-defined keywords
494
495 fgnu-runtime
496 ObjC ObjC++
497 Generate code for GNU runtime environment
498
499 fguiding-decls
500 C++ ObjC++
501
502 fhandle-exceptions
503 C++ ObjC++
504
505 fhonor-std
506 C++ ObjC++
507
508 fhosted
509 C ObjC
510 Assume normal C execution environment
511
512 fhuge-objects
513 C++ ObjC++
514 Enable support for huge objects
515
516 fimplement-inlines
517 C++ ObjC++
518 Export functions even if they can be inlined
519
520 fimplicit-inline-templates
521 C++ ObjC++
522 Emit implicit instantiations of inline templates
523
524 fimplicit-templates
525 C++ ObjC++
526 Emit implicit instantiations of templates
527
528 flabels-ok
529 C++ ObjC++
530
531 fms-extensions
532 C ObjC C++ ObjC++
533 Don't warn about uses of Microsoft extensions
534
535 fname-mangling-version-
536 C++ ObjC++ Joined
537
538 fnew-abi
539 C++ ObjC++
540
541 fnext-runtime
542 ObjC ObjC++
543 Generate code for NeXT (Apple Mac OS X) runtime environment
544
545 fnil-receivers
546 ObjC ObjC++
547 Assume that receivers of Objective-C messages may be nil
548
549 fnonansi-builtins
550 C++ ObjC++
551
552 fnonnull-objects
553 C++ ObjC++
554
555 fobjc-exceptions
556 ObjC ObjC++
557 Enable Objective-C exception and synchronization syntax
558
559 fobjc-sjlj-exceptions
560 ObjC ObjC++
561 Enable Objective-C setjmp exception handling runtime
562
563 foperator-names
564 C++ ObjC++
565 Recognize C++ kewords like \"compl\" and \"xor\"
566
567 foptional-diags
568 C++ ObjC++
569 Enable optional diagnostics
570
571 fpch-deps
572 C ObjC C++ ObjC++
573
574 fpch-preprocess
575 C ObjC C++ ObjC++
576 Look for and use PCH files even when preprocessing
577
578 fpermissive
579 C++ ObjC++
580 Downgrade conformance errors to warnings
581
582 fpreprocessed
583 C ObjC C++ ObjC++
584 Treat the input file as already preprocessed
585
586 freplace-objc-classes
587 ObjC ObjC++
588 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
589
590 frepo
591 C++ ObjC++
592 Enable automatic template instantiation
593
594 frtti
595 C++ ObjC++
596 Generate run time type descriptor information
597
598 fshort-double
599 C ObjC C++ ObjC++
600 Use the same size for double as for float
601
602 fshort-enums
603 C ObjC C++ ObjC++
604 Use the narrowest integer type possible for enumeration types
605
606 fshort-wchar
607 C ObjC C++ ObjC++
608 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
609
610 fsigned-bitfields
611 C ObjC C++ ObjC++
612 When \"signed\" or \"unsigned\" is not given make the bitfield signed
613
614 fsigned-char
615 C ObjC C++ ObjC++
616 Make \"char\" signed by default
617
618 fsquangle
619 C++ ObjC++
620
621 fstats
622 C++ ObjC++
623 Display statistics accumulated during compilation
624
625 fstrict-prototype
626 C++ ObjC++
627
628 ftabstop=
629 C ObjC C++ ObjC++ Joined RejectNegative UInteger
630 -ftabstop=<number>      Distance between tab stops for column reporting
631
632 ftemplate-depth-
633 C++ ObjC++ Joined RejectNegative UInteger 
634 -ftemplate-depth-<number>       Specify maximum template instantiation depth
635
636 fthis-is-variable
637 C++ ObjC++
638
639 fthreadsafe-statics
640 C++ ObjC++
641 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
642
643 funsigned-bitfields
644 C ObjC C++ ObjC++
645 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
646
647 funsigned-char
648 C ObjC C++ ObjC++
649 Make \"char\" unsigned by default
650
651 fuse-cxa-atexit
652 C++ ObjC++
653 Use __cxa_atexit to register destructors
654
655 fvisibility-inlines-hidden
656 C++ ObjC++
657 Marks all inlined methods as having hidden visibility
658
659 fvtable-gc
660 C++ ObjC++
661 Discard unused virtual functions
662
663 fvtable-thunks
664 C++ ObjC++
665 Implement vtables using thunks
666
667 fweak
668 C++ ObjC++
669 Emit common-like symbols as weak symbols
670
671 fwide-exec-charset=
672 C ObjC C++ ObjC++ Joined RejectNegative
673 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>
674
675 fworking-directory
676 C ObjC C++ ObjC++
677 Generate a #line directive pointing at the current working directory
678
679 fxref
680 C++ ObjC++
681 Emit cross referencing information
682
683 fzero-link
684 ObjC ObjC++
685 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
686
687 gen-decls
688 ObjC ObjC++
689 Dump declarations to a .decl file
690
691 idirafter
692 C ObjC C++ ObjC++ Joined Separate
693 -idirafter <dir>        Add <dir> to the end of the system include path
694
695 imacros
696 C ObjC C++ ObjC++ Joined Separate
697 -imacros <file> Accept definition of macros in <file>
698
699 include
700 C ObjC C++ ObjC++ Joined Separate
701 -include <file> Include the contents of <file> before other files
702
703 iprefix
704 C ObjC C++ ObjC++ Joined Separate
705 -iprefix <path> Specify <path> as a prefix for next two options
706
707 isysroot
708 C ObjC C++ ObjC++ Joined Separate
709 -isysroot <dir> Set <dir> to be the system root directory
710
711 isystem
712 C ObjC C++ ObjC++ Joined Separate
713 -isystem <dir>  Add <dir> to the start of the system include path
714
715 iquote
716 C ObjC C++ ObjC++ Joined Separate
717 -iquote <dir>   Add <dir> to the end of the quote include path
718
719 iwithprefix
720 C ObjC C++ ObjC++ Joined Separate
721 -iwithprefix <dir>      Add <dir> to the end of the system include path
722
723 iwithprefixbefore
724 C ObjC C++ ObjC++ Joined Separate
725 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
726
727 lang-asm
728 C Undocumented
729
730 lang-objc
731 C ObjC C++ ObjC++ Undocumented
732
733 nostdinc
734 C ObjC C++ ObjC++
735 Do not search standard system include directories (those specified with -isystem will still be used)
736
737 nostdinc++
738 C++ ObjC++
739 Do not search standard system include directories for C++
740
741 o
742 C ObjC C++ ObjC++ Joined Separate
743 ; Documented in common.opt
744
745 pedantic
746 C ObjC C++ ObjC++
747 ; Documented in common.opt
748
749 pedantic-errors
750 C ObjC C++ ObjC++
751 ; Documented in common.opt
752
753 print-objc-runtime-info
754 ObjC ObjC++
755 Generate C header of platform-specific features
756
757 remap
758 C ObjC C++ ObjC++
759 Remap file names when including files
760
761 std=c++98
762 C++ ObjC++
763 Conform to the ISO 1998 C++ standard
764
765 std=c89
766 C ObjC
767 Conform to the ISO 1990 C standard
768
769 std=c99
770 C ObjC
771 Conform to the ISO 1999 C standard
772
773 std=c9x
774 C ObjC
775 Deprecated in favor of -std=c99
776
777 std=gnu++98
778 C++ ObjC++
779 Conform to the ISO 1998 C++ standard with GNU extensions
780
781 std=gnu89
782 C ObjC
783 Conform to the ISO 1990 C standard with GNU extensions
784
785 std=gnu99
786 C ObjC
787 Conform to the ISO 1999 C standard with GNU extensions
788
789 std=gnu9x
790 C ObjC
791 Deprecated in favor of -std=gnu99
792
793 std=iso9899:1990
794 C ObjC
795 Conform to the ISO 1990 C standard
796
797 std=iso9899:199409
798 C ObjC
799 Conform to the ISO 1990 C standard as amended in 1994
800
801 std=iso9899:1999
802 C ObjC
803 Conform to the ISO 1999 C standard
804
805 std=iso9899:199x
806 C ObjC
807 Deprecated in favor of -std=iso9899:1999
808
809 traditional-cpp
810 C ObjC C++ ObjC++
811 Enable traditional preprocessing
812
813 trigraphs
814 C ObjC C++ ObjC++
815 -trigraphs      Support ISO C trigraphs
816
817 undef
818 C ObjC C++ ObjC++
819 Do not predefine system-specific and GCC-specific macros
820
821 v
822 C ObjC C++ ObjC++
823 Enable verbose output
824
825 w
826 C ObjC C++ ObjC++
827 ; Documented in common.opt
828
829 ; This comment is to ensure we retain the blank line above.