OSDN Git Service

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