OSDN Git Service

2005-03-27 Andreas Tobler <a.tobler@schweiz.ch>
[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 Wnormalized=
289 C ObjC C++ ObjC++ Joined
290 -Wnormalized=<id|nfc|nfkc>      Warn about non-normalised Unicode strings
291
292 Wold-style-cast
293 C++ ObjC++ Var(warn_old_style_cast)
294 Warn if a C-style cast is used in a program
295
296 Wold-style-definition
297 C ObjC Var(warn_old_style_definition)
298 Warn if an old-style parameter definition is used
299
300 Woverloaded-virtual
301 C++ ObjC++ Var(warn_overloaded_virtual)
302 Warn about overloaded virtual function names
303
304 Wparentheses
305 C ObjC C++ ObjC++ Var(warn_parentheses)
306 Warn about possibly missing parentheses
307
308 Wpmf-conversions
309 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
310 Warn when converting the type of pointers to member functions
311
312 Wpointer-arith
313 C ObjC C++ ObjC++ Var(warn_pointer_arith)
314 Warn about function pointer arithmetic
315
316 Wprotocol
317 ObjC ObjC++ Var(warn_protocol) Init(1)
318 Warn if inherited methods are unimplemented
319
320 Wredundant-decls
321 C ObjC C++ ObjC++ Var(warn_redundant_decls)
322 Warn about multiple declarations of the same object
323
324 Wreorder
325 C++ ObjC++ Var(warn_reorder)
326 Warn when the compiler reorders code
327
328 Wreturn-type
329 C ObjC C++ ObjC++
330 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
331
332 Wselector
333 ObjC ObjC++ Var(warn_selector)
334 Warn if a selector has multiple methods
335
336 Wsequence-point
337 C ObjC C++ ObjC++ Var(warn_sequence_point)
338 Warn about possible violations of sequence point rules
339
340 Wsign-compare
341 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
342 Warn about signed-unsigned comparisons
343
344 Wsign-promo
345 C++ ObjC++ Var(warn_sign_promo)
346 Warn when overload promotes from unsigned to signed
347
348 Wstrict-prototypes
349 C ObjC Var(warn_strict_prototypes)
350 Warn about unprototyped function declarations
351
352 Wsynth
353 C++ ObjC++ Var(warn_synth)
354 Warn when synthesis behavior differs from Cfront
355
356 Wsystem-headers
357 C ObjC C++ ObjC++
358 Do not suppress warnings from system headers
359
360 Wtraditional
361 C ObjC Var(warn_traditional)
362 Warn about features not present in traditional C
363
364 Wtrigraphs
365 C ObjC C++ ObjC++
366 Warn if trigraphs are encountered that might affect the meaning of the program
367
368 Wundeclared-selector
369 ObjC ObjC++ Var(warn_undeclared_selector)
370 Warn about @selector()s without previously declared methods
371
372 Wundef
373 C ObjC C++ ObjC++
374 Warn if an undefined macro is used in an #if directive
375
376 Wunknown-pragmas
377 C ObjC C++ ObjC++
378 Warn about unrecognized pragmas
379
380 Wunused-macros
381 C ObjC C++ ObjC++
382 Warn about macros defined in the main file that are not used
383
384 Wvariadic-macros
385 C ObjC C++ ObjC++
386 Do not warn about using variadic macros when -pedantic
387
388 Wwrite-strings
389 C ObjC C++ ObjC++
390 Give strings the type \"array of char\"
391
392 Wpointer-sign
393 C ObjC Var(warn_pointer_sign) Init(1)
394 Warn when a pointer differs in signedness in an assignment.
395
396 ansi
397 C ObjC C++ ObjC++
398 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
399
400 d
401 C ObjC C++ ObjC++ Joined
402 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
403
404 faccess-control
405 C++ ObjC++
406 Enforce class member access control semantics
407
408 fall-virtual
409 C++ ObjC++
410
411 falt-external-templates
412 C++ ObjC++
413 Change when template instances are emitted
414
415 fasm
416 C ObjC C++ ObjC++
417 Recognize the \"asm\" keyword
418
419 fbuiltin
420 C ObjC C++ ObjC++
421 Recognize built-in functions
422
423 fbuiltin-
424 C ObjC C++ ObjC++ Joined
425
426 fcheck-new
427 C++ ObjC++
428 Check the return value of new
429
430 fcond-mismatch
431 C ObjC C++ ObjC++
432 Allow the arguments of the '?' operator to have different types
433
434 fconserve-space
435 C++ ObjC++
436 Reduce the size of object files
437
438 fconst-strings
439 C++ ObjC++
440 Make string literals \"const char[]\" not \"char[]\"
441
442 fconstant-string-class=
443 ObjC ObjC++ Joined
444 -fconst-string-class=<name>     Use class <name> for constant strings
445
446 fdefault-inline
447 C++ ObjC++
448 Inline member functions by default
449
450 fdollars-in-identifiers
451 C ObjC C++ ObjC++
452 Permit '$' as an identifier character
453
454 felide-constructors
455 C++ ObjC++
456
457 fenforce-eh-specs
458 C++ ObjC++
459 Generate code to check exception specifications
460
461 fenum-int-equiv
462 C++ ObjC++
463
464 fexec-charset=
465 C ObjC C++ ObjC++ Joined RejectNegative
466 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
467
468 finput-charset=
469 C ObjC C++ ObjC++ Joined RejectNegative
470 -finput-charset=<cset>      Specify the default character set for source files.
471
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 (Apple Mac OS X) runtime environment
543
544 fnil-receivers
545 ObjC ObjC++
546 Assume that receivers of Objective-C messages may be nil
547
548 fnonansi-builtins
549 C++ ObjC++
550
551 fnonnull-objects
552 C++ ObjC++
553
554 fobjc-exceptions
555 ObjC ObjC++
556 Enable Objective-C exception and synchronization syntax
557
558 fobjc-sjlj-exceptions
559 ObjC ObjC++
560 Enable Objective-C setjmp exception handling runtime
561
562 foperator-names
563 C++ ObjC++
564 Recognize C++ kewords like \"compl\" and \"xor\"
565
566 foptional-diags
567 C++ ObjC++
568 Enable optional diagnostics
569
570 fpch-deps
571 C ObjC C++ ObjC++
572
573 fpch-preprocess
574 C ObjC C++ ObjC++
575 Look for and use PCH files even when preprocessing
576
577 fpermissive
578 C++ ObjC++
579 Downgrade conformance errors to warnings
580
581 fpreprocessed
582 C ObjC C++ ObjC++
583 Treat the input file as already preprocessed
584
585 freplace-objc-classes
586 ObjC ObjC++
587 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
588
589 frepo
590 C++ ObjC++
591 Enable automatic template instantiation
592
593 frtti
594 C++ ObjC++
595 Generate run time type descriptor information
596
597 fshort-double
598 C ObjC C++ ObjC++
599 Use the same size for double as for float
600
601 fshort-enums
602 C ObjC C++ ObjC++
603 Use the narrowest integer type possible for enumeration types
604
605 fshort-wchar
606 C ObjC C++ ObjC++
607 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
608
609 fshow-column
610 C ObjC C++ ObjC++
611
612 fsigned-bitfields
613 C ObjC C++ ObjC++
614 When \"signed\" or \"unsigned\" is not given make the bitfield signed
615
616 fsigned-char
617 C ObjC C++ ObjC++
618 Make \"char\" signed by default
619
620 fsquangle
621 C++ ObjC++
622
623 fstats
624 C++ ObjC++
625 Display statistics accumulated during compilation
626
627 fstrict-prototype
628 C++ ObjC++
629
630 ftabstop=
631 C ObjC C++ ObjC++ Joined RejectNegative UInteger
632 -ftabstop=<number>      Distance between tab stops for column reporting
633
634 ftemplate-depth-
635 C++ ObjC++ Joined RejectNegative UInteger 
636 -ftemplate-depth-<number>       Specify maximum template instantiation depth
637
638 fthis-is-variable
639 C++ ObjC++
640
641 fthreadsafe-statics
642 C++ ObjC++
643 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
644
645 funsigned-bitfields
646 C ObjC C++ ObjC++
647 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
648
649 funsigned-char
650 C ObjC C++ ObjC++
651 Make \"char\" unsigned by default
652
653 fuse-cxa-atexit
654 C++ ObjC++
655 Use __cxa_atexit to register destructors
656
657 fvisibility-inlines-hidden
658 C++ ObjC++
659 Marks all inlined methods as having hidden visibility
660
661 fvtable-gc
662 C++ ObjC++
663 Discard unused virtual functions
664
665 fvtable-thunks
666 C++ ObjC++
667 Implement vtables using thunks
668
669 fweak
670 C++ ObjC++
671 Emit common-like symbols as weak symbols
672
673 fwide-exec-charset=
674 C ObjC C++ ObjC++ Joined RejectNegative
675 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>
676
677 fworking-directory
678 C ObjC C++ ObjC++
679 Generate a #line directive pointing at the current working directory
680
681 fxref
682 C++ ObjC++
683 Emit cross referencing information
684
685 fzero-link
686 ObjC ObjC++
687 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
688
689 gen-decls
690 ObjC ObjC++
691 Dump declarations to a .decl file
692
693 idirafter
694 C ObjC C++ ObjC++ Joined Separate
695 -idirafter <dir>        Add <dir> to the end of the system include path
696
697 imacros
698 C ObjC C++ ObjC++ Joined Separate
699 -imacros <file> Accept definition of macros in <file>
700
701 include
702 C ObjC C++ ObjC++ Joined Separate
703 -include <file> Include the contents of <file> before other files
704
705 iprefix
706 C ObjC C++ ObjC++ Joined Separate
707 -iprefix <path> Specify <path> as a prefix for next two options
708
709 isysroot
710 C ObjC C++ ObjC++ Joined Separate
711 -isysroot <dir> Set <dir> to be the system root directory
712
713 isystem
714 C ObjC C++ ObjC++ Joined Separate
715 -isystem <dir>  Add <dir> to the start of the system include path
716
717 iquote
718 C ObjC C++ ObjC++ Joined Separate
719 -iquote <dir>   Add <dir> to the end of the quote include path
720
721 iwithprefix
722 C ObjC C++ ObjC++ Joined Separate
723 -iwithprefix <dir>      Add <dir> to the end of the system include path
724
725 iwithprefixbefore
726 C ObjC C++ ObjC++ Joined Separate
727 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
728
729 lang-asm
730 C Undocumented
731
732 lang-objc
733 C ObjC C++ ObjC++ Undocumented
734
735 nostdinc
736 C ObjC C++ ObjC++
737 Do not search standard system include directories (those specified with -isystem will still be used)
738
739 nostdinc++
740 C++ ObjC++
741 Do not search standard system include directories for C++
742
743 o
744 C ObjC C++ ObjC++ Joined Separate
745 ; Documented in common.opt
746
747 pedantic
748 C ObjC C++ ObjC++
749 ; Documented in common.opt
750
751 pedantic-errors
752 C ObjC C++ ObjC++
753 ; Documented in common.opt
754
755 print-objc-runtime-info
756 ObjC ObjC++
757 Generate C header of platform-specific features
758
759 remap
760 C ObjC C++ ObjC++
761 Remap file names when including files
762
763 std=c++98
764 C++ ObjC++
765 Conform to the ISO 1998 C++ standard
766
767 std=c89
768 C ObjC
769 Conform to the ISO 1990 C standard
770
771 std=c99
772 C ObjC
773 Conform to the ISO 1999 C standard
774
775 std=c9x
776 C ObjC
777 Deprecated in favor of -std=c99
778
779 std=gnu++98
780 C++ ObjC++
781 Conform to the ISO 1998 C++ standard with GNU extensions
782
783 std=gnu89
784 C ObjC
785 Conform to the ISO 1990 C standard with GNU extensions
786
787 std=gnu99
788 C ObjC
789 Conform to the ISO 1999 C standard with GNU extensions
790
791 std=gnu9x
792 C ObjC
793 Deprecated in favor of -std=gnu99
794
795 std=iso9899:1990
796 C ObjC
797 Conform to the ISO 1990 C standard
798
799 std=iso9899:199409
800 C ObjC
801 Conform to the ISO 1990 C standard as amended in 1994
802
803 std=iso9899:1999
804 C ObjC
805 Conform to the ISO 1999 C standard
806
807 std=iso9899:199x
808 C ObjC
809 Deprecated in favor of -std=iso9899:1999
810
811 traditional-cpp
812 C ObjC C++ ObjC++
813 Enable traditional preprocessing
814
815 trigraphs
816 C ObjC C++ ObjC++
817 -trigraphs      Support ISO C trigraphs
818
819 undef
820 C ObjC C++ ObjC++
821 Do not predefine system-specific and GCC-specific macros
822
823 v
824 C ObjC C++ ObjC++
825 Enable verbose output
826
827 w
828 C ObjC C++ ObjC++
829 ; Documented in common.opt
830
831 ; This comment is to ensure we retain the blank line above.