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
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
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
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
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.
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>
90 Do not discard comments
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
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
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
129 Treat missing header files as generated files
133 Like -M but ignore system header files
136 C ObjC C++ ObjC++ Separate
137 Like -MD but ignore system header files
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
153 Do not generate #line directives
156 C ObjC C++ ObjC++ Joined Separate
157 -U<macro> Undefine <macro>
164 Enable most warning messages
168 Warn about casting functions to incompatible types
172 Warn about casts which discard qualifiers
176 Warn about subscripts whose type is \"char\"
180 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
184 Synonym for -Wcomment
188 Warn about possibly confusing type conversions
192 Warn when all constructors and destructors are private
194 Wdeclaration-after-statement
196 Warn when a declaration is found after a statement
200 Warn about deprecated compiler features
204 Warn about compile-time integer division by zero
208 Warn about violations of Effective C++ style rules
212 Warn about stray tokens after #elif and #endif
216 ; Documented in common.opt
218 Werror-implicit-function-declaration
219 C ObjC RejectNegative
220 Make implicit function declarations an error
224 Warn if testing floating point numbers for equality
228 Warn about printf/scanf/strftime/strfmon format string anomalies
232 Warn if passing too many arguments to a function for its format string
236 Warn about format strings that are not literals
240 Warn about possible security problems with format functions
244 Warn about strftime formats yielding 2-digit years
250 C ObjC C++ ObjC++ Joined
254 Warn about variables which are initialized to themselves.
259 Wimplicit-function-declaration
261 Warn about implicit function declarations
265 Warn when a declaration does not specify a type
269 Deprecated. This switch has no effect.
273 Warn about invalid uses of the \"offsetof\" macro
277 Warn about PCH files that are found but not used
281 Do not warn about using \"long long\" when -pedantic
285 Warn about suspicious declarations of \"main\"
289 Warn about possibly missing braces around initializers
291 Wmissing-declarations
293 Warn about global functions without previous declarations
295 Wmissing-format-attribute
297 Warn about functions which might be candidates for format attributes
299 Wmissing-include-dirs
301 Warn about user-specified include directories that do not exist
305 Warn about global functions without prototypes
309 Warn about use of multi-character character constants
313 Warn about \"extern\" declarations not at file scope
317 Warn when non-templatized friend functions are declared within a template
321 Warn about non-virtual destructors
328 Warn if a C-style cast is used in a program
330 Wold-style-definition
332 Warn if an old-style parameter definition is used
336 Warn about overloaded virtual function names
340 Warn about possibly missing parentheses
344 Warn when converting the type of pointers to member functions
348 Warn about function pointer arithmetic
352 Warn if inherited methods are unimplemented
356 Warn about multiple declarations of the same object
360 Warn when the compiler reorders code
364 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
368 Warn if a selector has multiple methods
372 Warn about possible violations of sequence point rules
376 Warn about signed-unsigned comparisons
380 Warn when overload promotes from unsigned to signed
384 Warn about unprototyped function declarations
388 Warn when synthesis behavior differs from Cfront
392 Do not suppress warnings from system headers
396 Warn about features not present in traditional C
400 Warn if trigraphs are encountered that might affect the meaning of the program
407 Warn if an undefined macro is used in an #if directive
411 Warn about unrecognized pragmas
415 Warn about macros defined in the main file that are not used
419 Do not warn about using variadic macros when -pedantic
423 Give strings the type \"array of char\"
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?
435 Enforce class member access control semantics
440 falt-external-templates
442 Change when template instances are emitted
446 Recognize the \"asm\" keyword
450 Recognize built-in functions
453 C ObjC C++ ObjC++ Joined
457 Check the return value of new
461 Allow the arguments of the '?' operator to have different types
465 Reduce the size of object files
469 Make string literals \"const char[]\" not \"char[]\"
471 fconstant-string-class=
473 -fconst-string-class=<name> Use class <name> for constant strings
477 Inline member functions by default
479 fdollars-in-identifiers
481 Permit '$' as an identifier character
488 Generate code to check exception specifications
494 C ObjC C++ ObjC++ Joined RejectNegative
495 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
498 C ObjC C++ ObjC++ Joined RejectNegative
499 -finput-charset=<cset> Specify the default character set for source files.
513 Scope of for-init-statement variables is local to the loop
517 Do not assume that standard C libraries and \"main\" exist
521 Recognize GNU-defined keywords
525 Generate code for GNU runtime environment
538 Assume normal C execution environment
542 Enable support for huge objects
546 Export functions even if they can be inlined
548 fimplicit-inline-templates
550 Emit implicit instantiations of inline templates
554 Emit implicit instantiations of templates
561 Don't warn about uses of Microsoft extensions
563 fname-mangling-version-
571 Generate code for NeXT (Apple Mac OS X) runtime environment
575 Assume that receivers of Objective-C messages may be nil
585 Enable Objective-C exception and synchronization syntax
587 fobjc-sjlj-exceptions
589 Enable Objective-C setjmp exception handling runtime
593 Recognize C++ kewords like \"compl\" and \"xor\"
597 Enable optional diagnostics
604 Downgrade conformance errors to warnings
608 Treat the input file as already preprocessed
610 freplace-objc-classes
612 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
616 Enable automatic template instantiation
620 Generate run time type descriptor information
624 Use the same size for double as for float
628 Use the narrowest integer type possible for enumeration types
632 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
639 When \"signed\" or \"unsigned\" is not given make the bitfield signed
643 Make \"char\" signed by default
650 Display statistics accumulated during compilation
656 C ObjC C++ ObjC++ Joined RejectNegative UInteger
657 -ftabstop=<number> Distance between tab stops for column reporting
660 C++ ObjC++ Joined RejectNegative UInteger
661 -ftemplate-depth-<number> Specify maximum template instantiation depth
668 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
672 Make \"char\" unsigned by default
676 Use __cxa_atexit to register destructors
680 Discard unused virtual functions
684 Implement vtables using thunks
688 Emit common-like symbols as weak symbols
691 C ObjC C++ ObjC++ Joined RejectNegative
692 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
696 Generate a #line directive pointing at the current working directory
700 Emit cross referencing information
704 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
708 Dump declarations to a .decl file
711 C ObjC C++ ObjC++ Joined Separate
712 -idirafter <dir> Add <dir> to the end of the system include path
715 C ObjC C++ ObjC++ Joined Separate
716 -imacros <file> Accept definition of macros in <file>
719 C ObjC C++ ObjC++ Joined Separate
720 -include <file> Include the contents of <file> before other files
723 C ObjC C++ ObjC++ Joined Separate
724 -iprefix <path> Specify <path> as a prefix for next two options
727 C ObjC C++ ObjC++ Joined Separate
728 -isysroot <dir> Set <dir> to be the system root directory
731 C ObjC C++ ObjC++ Joined Separate
732 -isystem <dir> Add <dir> to the start of the system include path
735 C ObjC C++ ObjC++ Joined Separate
736 -iquote <dir> Add <dir> to the end of the quote include path
739 C ObjC C++ ObjC++ Joined Separate
740 -iwithprefix <dir> Add <dir> to the end of the system include path
743 C ObjC C++ ObjC++ Joined Separate
744 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
750 C ObjC C++ ObjC++ Undocumented
754 Do not search standard system include directories (those specified with -isystem will still be used)
758 Do not search standard system include directories for C++
761 C ObjC C++ ObjC++ Joined Separate
762 ; Documented in common.opt
766 ; Documented in common.opt
770 ; Documented in common.opt
772 print-objc-runtime-info
774 Generate C header of platform-specific features
778 Remap file names when including files
782 Conform to the ISO 1998 C++ standard
786 Conform to the ISO 1990 C standard
790 Conform to the ISO 1999 C standard
794 Deprecated in favor of -std=c99
798 Conform to the ISO 1998 C++ standard with GNU extensions
802 Conform to the ISO 1990 C standard with GNU extensions
806 Conform to the ISO 1999 C standard with GNU extensions
810 Deprecated in favor of -std=gnu99
814 Deprecated in favor of -std=c89
818 Conform to the ISO 1990 C standard as amended in 1994
822 Deprecated in favor of -std=c99
826 Deprecated in favor of -std=c99
830 Enable traditional preprocessing
834 -trigraphs Support ISO C trigraphs
838 Do not predefine system-specific and GCC-specific macros
842 Enable verbose output
846 ; Documented in common.opt
848 ; This comment is to ensure we retain the blank line above.