2005-01-20 Michael Koch <konqueror@gmx.de>
[official-gcc.git] / gcc / c.opt
blobf162803009024b9ec6db5792283aaeda9cdbf928
1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003, 2004 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 ; This file is processed by the script opts.sh.  It is a database of
23 ; command line options, with each record separated by a blank line,
24 ; and each field appearing on its own line.  The first field is the
25 ; command-line switch with the leading "-" removed.  All options
26 ; beginning with "f" or "W" are implicitly assumed to take a "no-"
27 ; form; this form should not be listed.  If you do not want this
28 ; negative form and you want it to be automatically rejected, add
29 ; RejectNegative to the second field.
31 ; The second field is a space-separated list of which parts of the
32 ; compiler recognize the switch, as declared by "Language" entries.
33 ; If the switch takes an argument, then you should also specify
34 ; "Joined" and/or "Separate" to indicate where the argument can
35 ; appear.  If a Joined argument can legitimately be omitted, specify
36 ; "JoinedOrMissing" instead of "Joined".  If the argument to a switch
37 ; is a non-negative integer, you can specify "UInteger" and the switch
38 ; decoder will convert the argument for you, or complain to the user
39 ; if the argument is invalid.  "Var(name,set)" creates an integer
40 ; variable "name".  The variable is declared and initialized to value
41 ; given by "Init(value)" (or zero if this property is not defined).
42 ; When the option is passed to compiler, this variable is set to "set"
43 ; if value passed through the flag is nonzero, !"set" if value is zero,
44 ; or to value if "set" is omitted.  If "VarExists"  is specified, the
45 ; declaration for the variable is not created.  If "Report" is specified,
46 ; the flag is output with -fverbose-asm.
48 ; The third field is the help text to output with --help.  This is
49 ; automatically line-wrapped on output.  Normally the switch is output
50 ; automatically, with the help text on the right hand side of the
51 ; output.  However, if the help text contains a tab character, the
52 ; text to the left of the tab is output instead of the switch, and the
53 ; text to its right forms the help.  This is useful for elaborating on
54 ; what type of argument a switch takes, for example.  If the second
55 ; field contains "Undocumented" then nothing is output with --help.
56 ; Only do this with good reason like the switch being internal between
57 ; the driver and the front end - it is not an excuse to leave a switch
58 ; undocumented.
60 ; Comments can appear on their own line anwhere in the file, preceded
61 ; by a semicolon.  Whitespace is permitted before the semicolon.
63 ; For each switch XXX below, an enumeration constant is created by the
64 ; script opts.sh spelt OPT_XXX, but with all non-alphanumeric
65 ; characters replaced with an underscore.
67 ; Please try to keep this file in ASCII collating order.
69 Language
72 Language
73 ObjC
75 Language
76 C++
78 Language
79 ObjC++
81 -output-pch=
82 C ObjC C++ ObjC++ Joined Separate
85 C ObjC C++ ObjC++ Joined Separate
86 -A<question>=<answer>   Assert the <answer> to <question>.  Putting '-' before <question> disables the <answer> to <question>
89 C ObjC C++ ObjC++
90 Do not discard comments
93 C ObjC C++ ObjC++
94 Do not discard comments in macro expansions
97 C ObjC C++ ObjC++ Joined Separate
98 -D<macro>[=<val>]       Define a <macro> with <val> as its value.  If just <macro> is given, <val> is taken to be 1
101 C ObjC C++ ObjC++ Undocumented
104 C ObjC C++ ObjC++ Joined Separate
105 -F <dir>        Add <dir> to the end of the main framework include path  
108 C ObjC C++ ObjC++
109 Print the name of header files as they are used
112 C ObjC C++ ObjC++ Joined Separate
113 -I <dir>        Add <dir> to the end of the main include path
116 C ObjC C++ ObjC++
117 Generate make dependencies
120 C ObjC C++ ObjC++ Separate
121 Generate make dependencies and compile
124 C ObjC C++ ObjC++ Joined Separate
125 -MF <file>      Write dependency output to the given file
128 C ObjC C++ ObjC++
129 Treat missing header files as generated files
132 C ObjC C++ ObjC++
133 Like -M but ignore system header files
136 C ObjC C++ ObjC++ Separate
137 Like -MD but ignore system header files
140 C ObjC C++ ObjC++
141 Generate phony targets for all headers
144 C ObjC C++ ObjC++ Joined Separate
145 -MQ <target>    Add a MAKE-quoted target
148 C ObjC C++ ObjC++ Joined Separate
149 -MT <target>    Add an unquoted target
152 C ObjC C++ ObjC++
153 Do not generate #line directives
156 C ObjC C++ ObjC++ Joined Separate
157 -U<macro>       Undefine <macro>
159 Wabi
160 C++ ObjC++
162 Wall
163 C ObjC C++ ObjC++
164 Enable most warning messages
166 Wbad-function-cast
167 C ObjC
168 Warn about casting functions to incompatible types
170 Wcast-qual
171 C ObjC C++ ObjC++
172 Warn about casts which discard qualifiers
174 Wchar-subscripts
175 C ObjC C++ ObjC++
176 Warn about subscripts whose type is \"char\"
178 Wcomment
179 C ObjC C++ ObjC++
180 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
182 Wcomments
183 C ObjC C++ ObjC++
184 Synonym for -Wcomment
186 Wconversion
187 C ObjC C++ ObjC++
188 Warn about possibly confusing type conversions
190 Wctor-dtor-privacy
191 C++ ObjC++
192 Warn when all constructors and destructors are private
194 Wdeclaration-after-statement
195 C ObjC
196 Warn when a declaration is found after a statement
198 Wdeprecated
199 C++ ObjC++
200 Warn about deprecated compiler features
202 Wdiv-by-zero
203 C ObjC
204 Warn about compile-time integer division by zero
206 Weffc++
207 C++ ObjC++
208 Warn about violations of Effective C++ style rules
210 Wendif-labels
211 C ObjC C++ ObjC++
212 Warn about stray tokens after #elif and #endif
214 Werror
215 C ObjC C++ ObjC++
216 ; Documented in common.opt
218 Werror-implicit-function-declaration
219 C ObjC RejectNegative
220 Make implicit function declarations an error
222 Wfloat-equal
223 C ObjC C++ ObjC++
224 Warn if testing floating point numbers for equality
226 Wformat
227 C ObjC C++ ObjC++
228 Warn about printf/scanf/strftime/strfmon format string anomalies
230 Wformat-extra-args
231 C ObjC C++ ObjC++
232 Warn if passing too many arguments to a function for its format string
234 Wformat-nonliteral
235 C ObjC C++ ObjC++
236 Warn about format strings that are not literals
238 Wformat-security
239 C ObjC C++ ObjC++
240 Warn about possible security problems with format functions
242 Wformat-y2k
243 C ObjC C++ ObjC++
244 Warn about strftime formats yielding 2-digit years
246 Wformat-zero-length
247 C ObjC
249 Wformat=
250 C ObjC C++ ObjC++ Joined
252 Winit-self
253 C ObjC C++ ObjC++
254 Warn about variables which are initialized to themselves.
256 Wimplicit
257 C ObjC C++ ObjC++
259 Wimplicit-function-declaration
260 C ObjC
261 Warn about implicit function declarations
263 Wimplicit-int
264 C ObjC
265 Warn when a declaration does not specify a type
267 Wimport
268 C ObjC C++ ObjC++
269 Deprecated.  This switch has no effect.
271 Winvalid-offsetof
272 C++ ObjC++
273 Warn about invalid uses of the \"offsetof\" macro
275 Winvalid-pch
276 C ObjC C++ ObjC++
277 Warn about PCH files that are found but not used
279 Wlong-long
280 C ObjC C++ ObjC++
281 Do not warn about using \"long long\" when -pedantic
283 Wmain
284 C ObjC
285 Warn about suspicious declarations of \"main\"
287 Wmissing-braces
288 C ObjC C++ ObjC++
289 Warn about possibly missing braces around initializers
291 Wmissing-declarations
292 C ObjC
293 Warn about global functions without previous declarations
295 Wmissing-format-attribute
296 C ObjC C++ ObjC++
297 Warn about functions which might be candidates for format attributes
299 Wmissing-include-dirs
300 C ObjC C++ ObjC++
301 Warn about user-specified include directories that do not exist
303 Wmissing-prototypes
304 C ObjC
305 Warn about global functions without prototypes
307 Wmultichar
308 C ObjC C++ ObjC++
309 Warn about use of multi-character character constants
311 Wnested-externs
312 C ObjC
313 Warn about \"extern\" declarations not at file scope
315 Wnon-template-friend
316 C++ ObjC++
317 Warn when non-templatized friend functions are declared within a template
319 Wnon-virtual-dtor
320 C++ ObjC++
321 Warn about non-virtual destructors
323 Wnonnull
324 C ObjC
326 Wold-style-cast
327 C++ ObjC++
328 Warn if a C-style cast is used in a program
330 Wold-style-definition
331 C ObjC
332 Warn if an old-style parameter definition is used
334 Woverloaded-virtual
335 C++ ObjC++
336 Warn about overloaded virtual function names
338 Wparentheses
339 C ObjC C++ ObjC++
340 Warn about possibly missing parentheses
342 Wpmf-conversions
343 C++ ObjC++
344 Warn when converting the type of pointers to member functions
346 Wpointer-arith
347 C ObjC C++ ObjC++
348 Warn about function pointer arithmetic
350 Wprotocol
351 ObjC ObjC++
352 Warn if inherited methods are unimplemented
354 Wredundant-decls
355 C ObjC C++ ObjC++
356 Warn about multiple declarations of the same object
358 Wreorder
359 C++ ObjC++
360 Warn when the compiler reorders code
362 Wreturn-type
363 C ObjC C++ ObjC++
364 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
366 Wselector
367 ObjC ObjC++
368 Warn if a selector has multiple methods
370 Wsequence-point
371 C ObjC
372 Warn about possible violations of sequence point rules
374 Wsign-compare
375 C ObjC C++ ObjC++
376 Warn about signed-unsigned comparisons
378 Wsign-promo
379 C++ ObjC++
380 Warn when overload promotes from unsigned to signed
382 Wstrict-prototypes
383 C ObjC
384 Warn about unprototyped function declarations
386 Wsynth
387 C++ ObjC++
388 Warn when synthesis behavior differs from Cfront
390 Wsystem-headers
391 C ObjC C++ ObjC++
392 Do not suppress warnings from system headers
394 Wtraditional
395 C ObjC
396 Warn about features not present in traditional C
398 Wtrigraphs
399 C ObjC C++ ObjC++
400 Warn if trigraphs are encountered that might affect the meaning of the program
402 Wundeclared-selector
403 ObjC ObjC++
405 Wundef
406 C ObjC C++ ObjC++
407 Warn if an undefined macro is used in an #if directive
409 Wunknown-pragmas
410 C ObjC C++ ObjC++
411 Warn about unrecognized pragmas
413 Wunused-macros
414 C ObjC C++ ObjC++
415 Warn about macros defined in the main file that are not used
417 Wvariadic-macros
418 C ObjC C++ ObjC++
419 Do not warn about using variadic macros when -pedantic
421 Wwrite-strings
422 C ObjC C++ ObjC++
423 Give strings the type \"array of char\"
425 ansi
426 C ObjC C++ ObjC++
427 A synonym for -std=c89.  In a future version of GCC it will become synonymous with -std=c99 instead
430 C ObjC C++ ObjC++ Joined
431 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
433 faccess-control
434 C++ ObjC++
435 Enforce class member access control semantics
437 fall-virtual
438 C++ ObjC++
440 falt-external-templates
441 C++ ObjC++
442 Change when template instances are emitted
444 fasm
445 C ObjC C++ ObjC++
446 Recognize the \"asm\" keyword
448 fbuiltin
449 C ObjC C++ ObjC++
450 Recognize built-in functions
452 fbuiltin-
453 C ObjC C++ ObjC++ Joined
455 fcheck-new
456 C++ ObjC++
457 Check the return value of new
459 fcond-mismatch
460 C ObjC C++ ObjC++
461 Allow the arguments of the '?' operator to have different types
463 fconserve-space
464 C++ ObjC++
465 Reduce the size of object files
467 fconst-strings
468 C++ ObjC++
469 Make string literals \"const char[]\" not \"char[]\"
471 fconstant-string-class=
472 ObjC ObjC++ Joined
473 -fconst-string-class=<name>     Use class <name> for constant strings
475 fdefault-inline
476 C++ ObjC++
477 Inline member functions by default
479 fdollars-in-identifiers
480 C ObjC C++ ObjC++
481 Permit '$' as an identifier character
483 felide-constructors
484 C++ ObjC++
486 fenforce-eh-specs
487 C++ ObjC++
488 Generate code to check exception specifications
490 fenum-int-equiv
491 C++ ObjC++
493 fexec-charset=
494 C ObjC C++ ObjC++ Joined RejectNegative
495 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
497 finput-charset=
498 C ObjC C++ ObjC++ Joined RejectNegative
499 -finput-charset=<cset>      Specify the default character set for source files.
502 fexternal-templates
503 C++ ObjC++
505 ffixed-form
506 C ObjC
508 ffixed-line-length-
509 C ObjC Joined
511 ffor-scope
512 C++ ObjC++
513 Scope of for-init-statement variables is local to the loop
515 ffreestanding
516 C ObjC
517 Do not assume that standard C libraries and \"main\" exist
519 fgnu-keywords
520 C++ ObjC++
521 Recognize GNU-defined keywords
523 fgnu-runtime
524 ObjC ObjC++
525 Generate code for GNU runtime environment
527 fguiding-decls
528 C++ ObjC++
530 fhandle-exceptions
531 C++ ObjC++
533 fhonor-std
534 C++ ObjC++
536 fhosted
537 C ObjC
538 Assume normal C execution environment
540 fhuge-objects
541 C++ ObjC++
542 Enable support for huge objects
544 fimplement-inlines
545 C++ ObjC++
546 Export functions even if they can be inlined
548 fimplicit-inline-templates
549 C++ ObjC++
550 Emit implicit instantiations of inline templates
552 fimplicit-templates
553 C++ ObjC++
554 Emit implicit instantiations of templates
556 flabels-ok
557 C++ ObjC++
559 fms-extensions
560 C ObjC C++ ObjC++
561 Don't warn about uses of Microsoft extensions
563 fname-mangling-version-
564 C++ ObjC++ Joined
566 fnew-abi
567 C++ ObjC++
569 fnext-runtime
570 ObjC ObjC++
571 Generate code for NeXT (Apple Mac OS X) runtime environment
573 fnil-receivers
574 ObjC ObjC++
575 Assume that receivers of Objective-C messages may be nil
577 fnonansi-builtins
578 C++ ObjC++
580 fnonnull-objects
581 C++ ObjC++
583 fobjc-exceptions
584 ObjC ObjC++
585 Enable Objective-C exception and synchronization syntax
587 fobjc-sjlj-exceptions
588 ObjC ObjC++
589 Enable Objective-C setjmp exception handling runtime
591 foperator-names
592 C++ ObjC++
593 Recognize C++ kewords like \"compl\" and \"xor\"
595 foptional-diags
596 C++ ObjC++
597 Enable optional diagnostics
599 fpch-deps
600 C ObjC C++ ObjC++
602 fpermissive
603 C++ ObjC++
604 Downgrade conformance errors to warnings
606 fpreprocessed
607 C ObjC C++ ObjC++
608 Treat the input file as already preprocessed
610 freplace-objc-classes
611 ObjC ObjC++
612 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
614 frepo
615 C++ ObjC++
616 Enable automatic template instantiation
618 frtti
619 C++ ObjC++
620 Generate run time type descriptor information
622 fshort-double
623 C ObjC C++ ObjC++
624 Use the same size for double as for float
626 fshort-enums
627 C ObjC C++ ObjC++
628 Use the narrowest integer type possible for enumeration types
630 fshort-wchar
631 C ObjC C++ ObjC++
632 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
634 fshow-column
635 C ObjC C++ ObjC++
637 fsigned-bitfields
638 C ObjC C++ ObjC++
639 When \"signed\" or \"unsigned\" is not given make the bitfield signed
641 fsigned-char
642 C ObjC C++ ObjC++
643 Make \"char\" signed by default
645 fsquangle
646 C++ ObjC++
648 fstats
649 C++ ObjC++
650 Display statistics accumulated during compilation
652 fstrict-prototype
653 C++ ObjC++
655 ftabstop=
656 C ObjC C++ ObjC++ Joined RejectNegative UInteger
657 -ftabstop=<number>      Distance between tab stops for column reporting
659 ftemplate-depth-
660 C++ ObjC++ Joined RejectNegative UInteger 
661 -ftemplate-depth-<number>       Specify maximum template instantiation depth
663 fthis-is-variable
664 C++ ObjC++
666 funsigned-bitfields
667 C ObjC C++ ObjC++
668 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
670 funsigned-char
671 C ObjC C++ ObjC++
672 Make \"char\" unsigned by default
674 fuse-cxa-atexit
675 C++ ObjC++
676 Use __cxa_atexit to register destructors
678 fvtable-gc
679 C++ ObjC++
680 Discard unused virtual functions
682 fvtable-thunks
683 C++ ObjC++
684 Implement vtables using thunks
686 fweak
687 C++ ObjC++
688 Emit common-like symbols as weak symbols
690 fwide-exec-charset=
691 C ObjC C++ ObjC++ Joined RejectNegative
692 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>
694 fworking-directory
695 C ObjC C++ ObjC++
696 Generate a #line directive pointing at the current working directory
698 fxref
699 C++ ObjC++
700 Emit cross referencing information
702 fzero-link
703 ObjC ObjC++
704 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
706 gen-decls
707 ObjC ObjC++
708 Dump declarations to a .decl file
710 idirafter
711 C ObjC C++ ObjC++ Joined Separate
712 -idirafter <dir>        Add <dir> to the end of the system include path
714 imacros
715 C ObjC C++ ObjC++ Joined Separate
716 -imacros <file> Accept definition of macros in <file>
718 include
719 C ObjC C++ ObjC++ Joined Separate
720 -include <file> Include the contents of <file> before other files
722 iprefix
723 C ObjC C++ ObjC++ Joined Separate
724 -iprefix <path> Specify <path> as a prefix for next two options
726 isysroot
727 C ObjC C++ ObjC++ Joined Separate
728 -isysroot <dir> Set <dir> to be the system root directory
730 isystem
731 C ObjC C++ ObjC++ Joined Separate
732 -isystem <dir>  Add <dir> to the start of the system include path
734 iquote
735 C ObjC C++ ObjC++ Joined Separate
736 -iquote <dir>   Add <dir> to the end of the quote include path
738 iwithprefix
739 C ObjC C++ ObjC++ Joined Separate
740 -iwithprefix <dir>      Add <dir> to the end of the system include path
742 iwithprefixbefore
743 C ObjC C++ ObjC++ Joined Separate
744 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
746 lang-asm
747 C Undocumented
749 lang-objc
750 C ObjC C++ ObjC++ Undocumented
752 nostdinc
753 C ObjC C++ ObjC++
754 Do not search standard system include directories (those specified with -isystem will still be used)
756 nostdinc++
757 C++ ObjC++
758 Do not search standard system include directories for C++
761 C ObjC C++ ObjC++ Joined Separate
762 ; Documented in common.opt
764 pedantic
765 C ObjC C++ ObjC++
766 ; Documented in common.opt
768 pedantic-errors
769 C ObjC C++ ObjC++
770 ; Documented in common.opt
772 print-objc-runtime-info
773 ObjC ObjC++
774 Generate C header of platform-specific features
776 remap
777 C ObjC C++ ObjC++
778 Remap file names when including files
780 std=c++98
781 C++ ObjC++
782 Conform to the ISO 1998 C++ standard
784 std=c89
785 C ObjC
786 Conform to the ISO 1990 C standard
788 std=c99
789 C ObjC
790 Conform to the ISO 1999 C standard
792 std=c9x
793 C ObjC
794 Deprecated in favor of -std=c99
796 std=gnu++98
797 C++ ObjC++
798 Conform to the ISO 1998 C++ standard with GNU extensions
800 std=gnu89
801 C ObjC
802 Conform to the ISO 1990 C standard with GNU extensions
804 std=gnu99
805 C ObjC
806 Conform to the ISO 1999 C standard with GNU extensions
808 std=gnu9x
809 C ObjC
810 Deprecated in favor of -std=gnu99
812 std=iso9899:1990
813 C ObjC
814 Deprecated in favor of -std=c89
816 std=iso9899:199409
817 C ObjC
818 Conform to the ISO 1990 C standard as amended in 1994
820 std=iso9899:1999
821 C ObjC
822 Deprecated in favor of -std=c99
824 std=iso9899:199x
825 C ObjC
826 Deprecated in favor of -std=c99
828 traditional-cpp
829 C ObjC C++ ObjC++
830 Enable traditional preprocessing
832 trigraphs
833 C ObjC C++ ObjC++
834 -trigraphs      Support ISO C trigraphs
836 undef
837 C ObjC C++ ObjC++
838 Do not predefine system-specific and GCC-specific macros
841 C ObjC C++ ObjC++
842 Enable verbose output
845 C ObjC C++ ObjC++
846 ; Documented in common.opt
848 ; This comment is to ensure we retain the blank line above.