* reload1.c (find_optional_reg, inherit_one_chain): Always use
[official-gcc.git] / gcc / c.opt
blobe5260f1671c2dcc711c60f99c4ca8b93499a150e
1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
4 ; This file is part of GCC.
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.
22 ; Please try to keep this file in ASCII collating order.
24 Language
27 Language
28 ObjC
30 Language
31 C++
33 Language
34 ObjC++
36 -output-pch=
37 C ObjC C++ ObjC++ Joined Separate
40 C ObjC C++ ObjC++ Joined Separate
41 -A<question>=<answer>   Assert the <answer> to <question>.  Putting '-' before <question> disables the <answer> to <question>
44 C ObjC C++ ObjC++
45 Do not discard comments
48 C ObjC C++ ObjC++
49 Do not discard comments in macro expansions
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
56 C ObjC C++ ObjC++ Undocumented
59 C ObjC C++ ObjC++ Joined Separate
60 -F <dir>        Add <dir> to the end of the main framework include path  
63 C ObjC C++ ObjC++
64 Print the name of header files as they are used
67 C ObjC C++ ObjC++ Joined Separate
68 -I <dir>        Add <dir> to the end of the main include path
71 C ObjC C++ ObjC++
72 Generate make dependencies
75 C ObjC C++ ObjC++ Separate
76 Generate make dependencies and compile
79 C ObjC C++ ObjC++ Joined Separate
80 -MF <file>      Write dependency output to the given file
83 C ObjC C++ ObjC++
84 Treat missing header files as generated files
87 C ObjC C++ ObjC++
88 Like -M but ignore system header files
90 MMD
91 C ObjC C++ ObjC++ Separate
92 Like -MD but ignore system header files
95 C ObjC C++ ObjC++
96 Generate phony targets for all headers
99 C ObjC C++ ObjC++ Joined Separate
100 -MQ <target>    Add a MAKE-quoted target
103 C ObjC C++ ObjC++ Joined Separate
104 -MT <target>    Add an unquoted target
107 C ObjC C++ ObjC++
108 Do not generate #line directives
111 C ObjC C++ ObjC++ Joined Separate
112 -U<macro>       Undefine <macro>
114 Wabi
115 C++ ObjC++ Var(warn_abi)
116 Warn about things that will change when compiling with an ABI-compliant compiler
118 Wall
119 C ObjC C++ ObjC++
120 Enable most warning messages
122 Wbad-function-cast
123 C ObjC Var(warn_bad_function_cast)
124 Warn about casting functions to incompatible types
126 Wcast-qual
127 C ObjC C++ ObjC++ Var(warn_cast_qual)
128 Warn about casts which discard qualifiers
130 Wchar-subscripts
131 C ObjC C++ ObjC++ Var(warn_char_subscripts)
132 Warn about subscripts whose type is \"char\"
134 Wcomment
135 C ObjC C++ ObjC++
136 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
138 Wcomments
139 C ObjC C++ ObjC++
140 Synonym for -Wcomment
142 Wconversion
143 C ObjC C++ ObjC++ Var(warn_conversion)
144 Warn about possibly confusing type conversions
146 Wctor-dtor-privacy
147 C++ ObjC++ Var(warn_ctor_dtor_privacy)
148 Warn when all constructors and destructors are private
150 Wdeclaration-after-statement
151 C ObjC Var(warn_declaration_after_statement)
152 Warn when a declaration is found after a statement
154 Wdeprecated
155 C++ ObjC++ Var(warn_deprecated) Init(1)
156 Warn about deprecated compiler features
158 Wdiv-by-zero
159 C ObjC Var(warn_div_by_zero) Init(1)
160 Warn about compile-time integer division by zero
162 Weffc++
163 C++ ObjC++ Var(warn_ecpp)
164 Warn about violations of Effective C++ style rules
166 Wendif-labels
167 C ObjC C++ ObjC++
168 Warn about stray tokens after #elif and #endif
170 Werror
171 C ObjC C++ ObjC++
172 ; Documented in common.opt
174 Werror-implicit-function-declaration
175 C ObjC RejectNegative
176 Make implicit function declarations an error
178 Wfloat-equal
179 C ObjC C++ ObjC++ Var(warn_float_equal)
180 Warn if testing floating point numbers for equality
182 Wformat
183 C ObjC C++ ObjC++
184 Warn about printf/scanf/strftime/strfmon format string anomalies
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
190 Wformat-nonliteral
191 C ObjC C++ ObjC++ Var(warn_format_nonliteral)
192 Warn about format strings that are not literals
194 Wformat-security
195 C ObjC C++ ObjC++ Var(warn_format_security)
196 Warn about possible security problems with format functions
198 Wformat-y2k
199 C ObjC C++ ObjC++ Var(warn_format_y2k)
200 Warn about strftime formats yielding 2-digit years
202 Wformat-zero-length
203 C ObjC Var(warn_format_zero_length)
204 Warn about zero-length formats
206 Wformat=
207 C ObjC C++ ObjC++ Joined
209 Winit-self
210 C ObjC C++ ObjC++ Var(warn_init_self)
211 Warn about variables which are initialized to themselves.
213 Wimplicit
214 C ObjC C++ ObjC++
216 Wimplicit-function-declaration
217 C ObjC Var(mesg_implicit_function_declaration) Init(-1)
218 Warn about implicit function declarations
220 Wimplicit-int
221 C ObjC Var(warn_implicit_int)
222 Warn when a declaration does not specify a type
224 Wimport
225 C ObjC C++ ObjC++
226 Deprecated.  This switch has no effect.
228 Winvalid-offsetof
229 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
230 Warn about invalid uses of the \"offsetof\" macro
232 Winvalid-pch
233 C ObjC C++ ObjC++
234 Warn about PCH files that are found but not used
236 Wlong-long
237 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
238 Do not warn about using \"long long\" when -pedantic
240 Wmain
241 C ObjC
242 Warn about suspicious declarations of \"main\"
244 Wmissing-braces
245 C ObjC C++ ObjC++ Var(warn_missing_braces)
246 Warn about possibly missing braces around initializers
248 Wmissing-declarations
249 C ObjC Var(warn_missing_declarations)
250 Warn about global functions without previous declarations
252 Wmissing-field-initializers
253 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
254 Warn about missing fields in struct initializers
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
260 Wmissing-include-dirs
261 C ObjC C++ ObjC++
262 Warn about user-specified include directories that do not exist
264 Wmissing-prototypes
265 C ObjC Var(warn_missing_prototypes)
266 Warn about global functions without prototypes
268 Wmultichar
269 C ObjC C++ ObjC++
270 Warn about use of multi-character character constants
272 Wnested-externs
273 C ObjC Var(warn_nested_externs)
274 Warn about \"extern\" declarations not at file scope
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
280 Wnon-virtual-dtor
281 C++ ObjC++ Var(warn_nonvdtor)
282 Warn about non-virtual destructors
284 Wnonnull
285 C ObjC Var(warn_nonnull)
286 Warn about NULL being passed to argument slots marked as requiring non-NULL
288 Wnormalized=
289 C ObjC C++ ObjC++ Joined
290 -Wnormalized=<id|nfc|nfkc>      Warn about non-normalised Unicode strings
292 Wold-style-cast
293 C++ ObjC++ Var(warn_old_style_cast)
294 Warn if a C-style cast is used in a program
296 Wold-style-definition
297 C ObjC Var(warn_old_style_definition)
298 Warn if an old-style parameter definition is used
300 Woverloaded-virtual
301 C++ ObjC++ Var(warn_overloaded_virtual)
302 Warn about overloaded virtual function names
304 Wparentheses
305 C ObjC C++ ObjC++ Var(warn_parentheses)
306 Warn about possibly missing parentheses
308 Wpmf-conversions
309 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
310 Warn when converting the type of pointers to member functions
312 Wpointer-arith
313 C ObjC C++ ObjC++ Var(warn_pointer_arith)
314 Warn about function pointer arithmetic
316 Wprotocol
317 ObjC ObjC++ Var(warn_protocol) Init(1)
318 Warn if inherited methods are unimplemented
320 Wredundant-decls
321 C ObjC C++ ObjC++ Var(warn_redundant_decls)
322 Warn about multiple declarations of the same object
324 Wreorder
325 C++ ObjC++ Var(warn_reorder)
326 Warn when the compiler reorders code
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++)
332 Wselector
333 ObjC ObjC++ Var(warn_selector)
334 Warn if a selector has multiple methods
336 Wsequence-point
337 C ObjC C++ ObjC++ Var(warn_sequence_point)
338 Warn about possible violations of sequence point rules
340 Wsign-compare
341 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
342 Warn about signed-unsigned comparisons
344 Wsign-promo
345 C++ ObjC++ Var(warn_sign_promo)
346 Warn when overload promotes from unsigned to signed
348 Wstrict-prototypes
349 C ObjC Var(warn_strict_prototypes)
350 Warn about unprototyped function declarations
352 Wsynth
353 C++ ObjC++ Var(warn_synth)
354 Warn when synthesis behavior differs from Cfront
356 Wsystem-headers
357 C ObjC C++ ObjC++
358 Do not suppress warnings from system headers
360 Wtraditional
361 C ObjC Var(warn_traditional)
362 Warn about features not present in traditional C
364 Wtrigraphs
365 C ObjC C++ ObjC++
366 Warn if trigraphs are encountered that might affect the meaning of the program
368 Wundeclared-selector
369 ObjC ObjC++ Var(warn_undeclared_selector)
370 Warn about @selector()s without previously declared methods
372 Wundef
373 C ObjC C++ ObjC++
374 Warn if an undefined macro is used in an #if directive
376 Wunknown-pragmas
377 C ObjC C++ ObjC++
378 Warn about unrecognized pragmas
380 Wunused-macros
381 C ObjC C++ ObjC++
382 Warn about macros defined in the main file that are not used
384 Wvariadic-macros
385 C ObjC C++ ObjC++
386 Do not warn about using variadic macros when -pedantic
388 Wwrite-strings
389 C ObjC C++ ObjC++
390 Give strings the type \"array of char\"
392 Wpointer-sign
393 C ObjC Var(warn_pointer_sign) Init(1)
394 Warn when a pointer differs in signedness in an assignment.
396 ansi
397 C ObjC C++ ObjC++
398 A synonym for -std=c89.  In a future version of GCC it will become synonymous with -std=c99 instead
401 C ObjC C++ ObjC++ Joined
402 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
404 faccess-control
405 C++ ObjC++
406 Enforce class member access control semantics
408 fall-virtual
409 C++ ObjC++
411 falt-external-templates
412 C++ ObjC++
413 Change when template instances are emitted
415 fasm
416 C ObjC C++ ObjC++
417 Recognize the \"asm\" keyword
419 fbuiltin
420 C ObjC C++ ObjC++
421 Recognize built-in functions
423 fbuiltin-
424 C ObjC C++ ObjC++ Joined
426 fcheck-new
427 C++ ObjC++
428 Check the return value of new
430 fcond-mismatch
431 C ObjC C++ ObjC++
432 Allow the arguments of the '?' operator to have different types
434 fconserve-space
435 C++ ObjC++
436 Reduce the size of object files
438 fconst-strings
439 C++ ObjC++
440 Make string literals \"const char[]\" not \"char[]\"
442 fconstant-string-class=
443 ObjC ObjC++ Joined
444 -fconst-string-class=<name>     Use class <name> for constant strings
446 fdefault-inline
447 C++ ObjC++
448 Inline member functions by default
450 fdollars-in-identifiers
451 C ObjC C++ ObjC++
452 Permit '$' as an identifier character
454 felide-constructors
455 C++ ObjC++
457 fenforce-eh-specs
458 C++ ObjC++
459 Generate code to check exception specifications
461 fenum-int-equiv
462 C++ ObjC++
464 fexec-charset=
465 C ObjC C++ ObjC++ Joined RejectNegative
466 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
468 finput-charset=
469 C ObjC C++ ObjC++ Joined RejectNegative
470 -finput-charset=<cset>      Specify the default character set for source files.
473 fexternal-templates
474 C++ ObjC++
476 ffixed-form
477 C ObjC
479 ffixed-line-length-
480 C ObjC Joined
482 ffor-scope
483 C++ ObjC++
484 Scope of for-init-statement variables is local to the loop
486 ffreestanding
487 C ObjC
488 Do not assume that standard C libraries and \"main\" exist
490 fgnu-keywords
491 C++ ObjC++
492 Recognize GNU-defined keywords
494 fgnu-runtime
495 ObjC ObjC++
496 Generate code for GNU runtime environment
498 fguiding-decls
499 C++ ObjC++
501 fhandle-exceptions
502 C++ ObjC++
504 fhonor-std
505 C++ ObjC++
507 fhosted
508 C ObjC
509 Assume normal C execution environment
511 fhuge-objects
512 C++ ObjC++
513 Enable support for huge objects
515 fimplement-inlines
516 C++ ObjC++
517 Export functions even if they can be inlined
519 fimplicit-inline-templates
520 C++ ObjC++
521 Emit implicit instantiations of inline templates
523 fimplicit-templates
524 C++ ObjC++
525 Emit implicit instantiations of templates
527 flabels-ok
528 C++ ObjC++
530 fms-extensions
531 C ObjC C++ ObjC++
532 Don't warn about uses of Microsoft extensions
534 fname-mangling-version-
535 C++ ObjC++ Joined
537 fnew-abi
538 C++ ObjC++
540 fnext-runtime
541 ObjC ObjC++
542 Generate code for NeXT (Apple Mac OS X) runtime environment
544 fnil-receivers
545 ObjC ObjC++
546 Assume that receivers of Objective-C messages may be nil
548 fnonansi-builtins
549 C++ ObjC++
551 fnonnull-objects
552 C++ ObjC++
554 fobjc-exceptions
555 ObjC ObjC++
556 Enable Objective-C exception and synchronization syntax
558 fobjc-sjlj-exceptions
559 ObjC ObjC++
560 Enable Objective-C setjmp exception handling runtime
562 foperator-names
563 C++ ObjC++
564 Recognize C++ kewords like \"compl\" and \"xor\"
566 foptional-diags
567 C++ ObjC++
568 Enable optional diagnostics
570 fpch-deps
571 C ObjC C++ ObjC++
573 fpch-preprocess
574 C ObjC C++ ObjC++
575 Look for and use PCH files even when preprocessing
577 fpermissive
578 C++ ObjC++
579 Downgrade conformance errors to warnings
581 fpreprocessed
582 C ObjC C++ ObjC++
583 Treat the input file as already preprocessed
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
589 frepo
590 C++ ObjC++
591 Enable automatic template instantiation
593 frtti
594 C++ ObjC++
595 Generate run time type descriptor information
597 fshort-double
598 C ObjC C++ ObjC++
599 Use the same size for double as for float
601 fshort-enums
602 C ObjC C++ ObjC++
603 Use the narrowest integer type possible for enumeration types
605 fshort-wchar
606 C ObjC C++ ObjC++
607 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
609 fshow-column
610 C ObjC C++ ObjC++
612 fsigned-bitfields
613 C ObjC C++ ObjC++
614 When \"signed\" or \"unsigned\" is not given make the bitfield signed
616 fsigned-char
617 C ObjC C++ ObjC++
618 Make \"char\" signed by default
620 fsquangle
621 C++ ObjC++
623 fstats
624 C++ ObjC++
625 Display statistics accumulated during compilation
627 fstrict-prototype
628 C++ ObjC++
630 ftabstop=
631 C ObjC C++ ObjC++ Joined RejectNegative UInteger
632 -ftabstop=<number>      Distance between tab stops for column reporting
634 ftemplate-depth-
635 C++ ObjC++ Joined RejectNegative UInteger 
636 -ftemplate-depth-<number>       Specify maximum template instantiation depth
638 fthis-is-variable
639 C++ ObjC++
641 fthreadsafe-statics
642 C++ ObjC++
643 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
645 funsigned-bitfields
646 C ObjC C++ ObjC++
647 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
649 funsigned-char
650 C ObjC C++ ObjC++
651 Make \"char\" unsigned by default
653 fuse-cxa-atexit
654 C++ ObjC++
655 Use __cxa_atexit to register destructors
657 fvisibility-inlines-hidden
659 Marks all inlined methods as having hidden visibility
661 fvtable-gc
662 C++ ObjC++
663 Discard unused virtual functions
665 fvtable-thunks
666 C++ ObjC++
667 Implement vtables using thunks
669 fweak
670 C++ ObjC++
671 Emit common-like symbols as weak symbols
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>
677 fworking-directory
678 C ObjC C++ ObjC++
679 Generate a #line directive pointing at the current working directory
681 fxref
682 C++ ObjC++
683 Emit cross referencing information
685 fzero-link
686 ObjC ObjC++
687 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
689 gen-decls
690 ObjC ObjC++
691 Dump declarations to a .decl file
693 idirafter
694 C ObjC C++ ObjC++ Joined Separate
695 -idirafter <dir>        Add <dir> to the end of the system include path
697 imacros
698 C ObjC C++ ObjC++ Joined Separate
699 -imacros <file> Accept definition of macros in <file>
701 include
702 C ObjC C++ ObjC++ Joined Separate
703 -include <file> Include the contents of <file> before other files
705 iprefix
706 C ObjC C++ ObjC++ Joined Separate
707 -iprefix <path> Specify <path> as a prefix for next two options
709 isysroot
710 C ObjC C++ ObjC++ Joined Separate
711 -isysroot <dir> Set <dir> to be the system root directory
713 isystem
714 C ObjC C++ ObjC++ Joined Separate
715 -isystem <dir>  Add <dir> to the start of the system include path
717 iquote
718 C ObjC C++ ObjC++ Joined Separate
719 -iquote <dir>   Add <dir> to the end of the quote include path
721 iwithprefix
722 C ObjC C++ ObjC++ Joined Separate
723 -iwithprefix <dir>      Add <dir> to the end of the system include path
725 iwithprefixbefore
726 C ObjC C++ ObjC++ Joined Separate
727 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
729 lang-asm
730 C Undocumented
732 lang-objc
733 C ObjC C++ ObjC++ Undocumented
735 nostdinc
736 C ObjC C++ ObjC++
737 Do not search standard system include directories (those specified with -isystem will still be used)
739 nostdinc++
740 C++ ObjC++
741 Do not search standard system include directories for C++
744 C ObjC C++ ObjC++ Joined Separate
745 ; Documented in common.opt
747 pedantic
748 C ObjC C++ ObjC++
749 ; Documented in common.opt
751 pedantic-errors
752 C ObjC C++ ObjC++
753 ; Documented in common.opt
755 print-objc-runtime-info
756 ObjC ObjC++
757 Generate C header of platform-specific features
759 remap
760 C ObjC C++ ObjC++
761 Remap file names when including files
763 std=c++98
764 C++ ObjC++
765 Conform to the ISO 1998 C++ standard
767 std=c89
768 C ObjC
769 Conform to the ISO 1990 C standard
771 std=c99
772 C ObjC
773 Conform to the ISO 1999 C standard
775 std=c9x
776 C ObjC
777 Deprecated in favor of -std=c99
779 std=gnu++98
780 C++ ObjC++
781 Conform to the ISO 1998 C++ standard with GNU extensions
783 std=gnu89
784 C ObjC
785 Conform to the ISO 1990 C standard with GNU extensions
787 std=gnu99
788 C ObjC
789 Conform to the ISO 1999 C standard with GNU extensions
791 std=gnu9x
792 C ObjC
793 Deprecated in favor of -std=gnu99
795 std=iso9899:1990
796 C ObjC
797 Deprecated in favor of -std=c89
799 std=iso9899:199409
800 C ObjC
801 Conform to the ISO 1990 C standard as amended in 1994
803 std=iso9899:1999
804 C ObjC
805 Deprecated in favor of -std=c99
807 std=iso9899:199x
808 C ObjC
809 Deprecated in favor of -std=c99
811 traditional-cpp
812 C ObjC C++ ObjC++
813 Enable traditional preprocessing
815 trigraphs
816 C ObjC C++ ObjC++
817 -trigraphs      Support ISO C trigraphs
819 undef
820 C ObjC C++ ObjC++
821 Do not predefine system-specific and GCC-specific macros
824 C ObjC C++ ObjC++
825 Enable verbose output
828 C ObjC C++ ObjC++
829 ; Documented in common.opt
831 ; This comment is to ensure we retain the blank line above.