1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003 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.
41 ; The third field is the help text to output with --help. This is
42 ; automatically line-wrapped on output. Normally the switch is output
43 ; automatically, with the help text on the right hand side of the
44 ; output. However, if the help text contains a tab character, the
45 ; text to the left of the tab is output instead of the switch, and the
46 ; text to its right forms the help. This is useful for elaborating on
47 ; what type of argument a switch takes, for example. If the second
48 ; field contains "Undocumented" then nothing is output with --help.
49 ; Only do this with good reason like the switch being internal between
50 ; the driver and the front end - it is not an excuse to leave a switch
53 ; Comments can appear on their own line anwhere in the file, preceded
54 ; by a semicolon. Whitespace is permitted before the semicolon.
56 ; For each switch XXX below, an enumeration constant is created by the
57 ; script opts.sh spelt OPT_XXX, but with all non-alphanumeric
58 ; characters replaced with an underscore.
60 ; Please try to keep this file in ASCII collating order.
75 C ObjC C++ ObjC++ Joined Separate
78 C ObjC C++ ObjC++ Joined Separate
79 -A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>
83 Do not discard comments
87 Do not discard comments in macro expansions
90 C ObjC C++ ObjC++ Joined Separate
91 -D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
94 C ObjC C++ ObjC++ Undocumented
98 Print the name of header files as they are used
101 C ObjC C++ ObjC++ Joined Separate
102 -I <dir> Add <dir> to the end of the main include path. -I- gives more include path control; see info documentation
106 Generate make dependencies
109 C ObjC C++ ObjC++ Separate
110 Generate make dependencies and compile
113 C ObjC C++ ObjC++ Joined Separate
114 -MF <file> Write dependency output to the given file
118 Treat missing header files as generated files
122 Like -M but ignore system header files
125 C ObjC C++ ObjC++ Separate
126 Like -MD but ignore system header files
130 Generate phony targets for all headers
133 C ObjC C++ ObjC++ Joined Separate
134 -MQ <target> Add a MAKE-quoted target
137 C ObjC C++ ObjC++ Joined Separate
138 -MT <target> Add an unquoted target
142 Do not generate #line directives
145 C ObjC C++ ObjC++ Joined Separate
146 -U<macro> Undefine <macro>
153 Enable most warning messages
157 Warn about casting functions to incompatible types
161 Warn about casts which discard qualifiers
165 Warn about subscripts whose type is \"char\"
169 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
173 Synonym for -Wcomment
177 Warn about possibly confusing type conversions
181 Warn when all constructors and destructors are private
183 Wdeclaration-after-statement
185 Warn when a declaration is found after a statement
189 Warn about deprecated compiler features
193 Warn about compile-time integer division by zero
197 Warn about violations of Effective C++ style rules
201 Warn about stray tokens after #elif and #endif
205 ; Documented in common.opt
207 Werror-implicit-function-declaration
208 C ObjC RejectNegative
209 Make implicit function declarations an error
213 Warn if testing floating point numbers for equality
217 Warn about printf/scanf/strftime/strfmon format string anomalies
221 Warn if passing too many arguments to a function for its format string
225 Warn about format strings that are not literals
229 Warn about possible security problems with format functions
233 Warn about strftime formats yielding 2-digit years
239 C ObjC C++ ObjC++ Joined
243 Warn about variables which are initialized to themselves.
248 Wimplicit-function-declaration
250 Warn about implicit function declarations
254 Warn when a declaration does not specify a type
258 Deprecated. This switch has no effect.
262 Warn about invalid uses of the \"offsetof\" macro
266 Warn about PCH files that are found but not used
270 Do not warn about using \"long long\" when -pedantic
274 Warn about suspicious declarations of \"main\"
278 Warn about possibly missing braces around initializers
280 Wmissing-declarations
282 Warn about global functions without previous declarations
284 Wmissing-format-attribute
286 Warn about functions which might be candidates for format attributes
290 Warn about global functions without prototypes
294 Warn about use of multi-character character constants
298 Warn about \"extern\" declarations not at file scope
302 Warn when non-templatized friend functions are declared within a template
306 Warn about non-virtual destructors
313 Warn if a C-style cast is used in a program
315 Wold-style-definition
317 Warn if an old-style parameter definition is used
321 Warn about overloaded virtual function names
325 Warn about possibly missing parentheses
329 Warn when converting the type of pointers to member functions
333 Warn about function pointer arithmetic
337 Warn if inherited methods are unimplemented
341 Warn about multiple declarations of the same object
345 Warn when the compiler reorders code
349 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
353 Warn if a selector has multiple methods
357 Warn about possible violations of sequence point rules
361 Warn about signed-unsigned comparisons
365 Warn when overload promotes from unsigned to signed
369 Warn about unprototyped function declarations
373 Warn when synthesis behavior differs from Cfront
377 Do not suppress warnings from system headers
381 Warn about features not present in traditional C
385 Warn if trigraphs are encountered that might affect the meaning of the program
392 Warn if an undefined macro is used in an #if directive
396 Warn about unrecognized pragmas
400 Warn about macros defined in the main file that are not used
404 Give strings the type \"array of char\"
408 A synonym for -std=c89. In a future version of GCC it will become synonymous with -std=c99 instead
411 C ObjC C++ ObjC++ Joined
412 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
415 C++ ObjC++ Joined UInteger
419 Enforce class member access control semantics
424 falt-external-templates
426 Change when template instances are emitted
430 Recognize the \"asm\" keyword
434 Recognize built-in functions
437 C ObjC C++ ObjC++ Joined
441 Check the return value of new
445 Allow the arguments of the '?' operator to have different types
449 Reduce the size of object files
453 Make string literals \"const char[]\" not \"char[]\"
455 fconstant-string-class=
457 -fconst-string-class=<name> Use class <name> for constant strings
461 Inline member functions by default
463 fdollars-in-identifiers
465 Permit '$' as an identifier character
468 C ObjC C++ ObjC++ Joined RejectNegative
469 -fdump-<type> Dump various compiler internals to a file
476 Generate code to check exception specifications
482 C ObjC C++ ObjC++ Joined RejectNegative
483 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
486 C ObjC C++ ObjC++ Joined RejectNegative
487 -finput-charset=<cset> Specify the default character set for source files.
501 Scope of for-init-statement variables is local to the loop
505 Do not assume that standard C libraries and \"main\" exist
509 Recognize GNU-defined keywords
513 Generate code for GNU runtime environment
526 Assume normal C execution environment
530 Enable support for huge objects
534 Export functions even if they can be inlined
536 fimplicit-inline-templates
538 Emit implicit instantiations of inline templates
542 Emit implicit instantiations of templates
549 Don't warn about uses of Microsoft extensions
551 fname-mangling-version-
559 Generate code for NeXT (Apple Mac OS X) runtime environment
563 Assume that receivers of Objective-C messages may be nil
573 Enable Objective-C exception and synchronization syntax
577 Recognize C++ kewords like \"compl\" and \"xor\"
581 Enable optional diagnostics
588 Downgrade conformance errors to warnings
592 Treat the input file as already preprocessed
594 freplace-objc-classes
596 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
600 Enable automatic template instantiation
604 Generate run time type descriptor information
608 Use the same size for double as for float
612 Use the narrowest integer type possible for enumeration types
616 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
623 When \"signed\" or \"unsigned\" is not given make the bitfield signed
627 Make \"char\" signed by default
634 Display statistics accumulated during compilation
640 C ObjC C++ ObjC++ Joined RejectNegative UInteger
641 -ftabstop=<number> Distance between tab stops for column reporting
644 C++ ObjC++ Joined RejectNegative UInteger
645 -ftemplate-depth-<number> Specify maximum template instantiation depth
652 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
656 Make \"char\" unsigned by default
660 Use __cxa_atexit to register destructors
664 Discard unused virtual functions
668 Implement vtables using thunks
672 Emit common-like symbols as weak symbols
675 C ObjC C++ ObjC++ Joined RejectNegative
676 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
680 Generate a #line directive pointing at the current working directory
684 Emit cross referencing information
688 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
692 Dump declarations to a .decl file
695 C ObjC C++ ObjC++ Joined Separate
696 -idirafter <dir> Add <dir> to the end of the system include path
699 C ObjC C++ ObjC++ Joined Separate
700 -imacros <file> Accept definition of macros in <file>
703 C ObjC C++ ObjC++ Joined Separate
704 -include <file> Include the contents of <file> before other files
707 C ObjC C++ ObjC++ Joined Separate
708 -iprefix <path> Specify <path> as a prefix for next two options
711 C ObjC C++ ObjC++ Joined Separate
712 -isysroot <dir> Set <dir> to be the system root directory
715 C ObjC C++ ObjC++ Joined Separate
716 -isystem <dir> Add <dir> to the start of the system include path
719 C ObjC C++ ObjC++ Joined Separate
720 -iwithprefix <dir> Add <dir> to the end of the system include path
723 C ObjC C++ ObjC++ Joined Separate
724 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
730 C ObjC C++ ObjC++ Undocumented
734 Do not search standard system include directories (those specified with -isystem will still be used)
738 Do not search standard system include directories for C++
741 C ObjC C++ ObjC++ Joined Separate
742 ; Documented in common.opt
746 ; Documented in common.opt
750 ; Documented in common.opt
752 print-objc-runtime-info
754 Generate C header of platform-specific features
758 Remap file names when including files
762 Conform to the ISO 1998 C++ standard
766 Conform to the ISO 1990 C standard
770 Conform to the ISO 1999 C standard
774 Deprecated in favor of -std=c99
778 Conform to the ISO 1998 C++ standard with GNU extensions
782 Conform to the ISO 1990 C standard with GNU extensions
786 Conform to the ISO 1999 C standard with GNU extensions
790 Deprecated in favor of -std=gnu99
794 Deprecated in favor of -std=c89
798 Conform to the ISO 1990 C standard as amended in 1994
802 Deprecated in favor of -std=c99
806 Deprecated in favor of -std=c99
810 Enable traditional preprocessing
814 -trigraphs Support ISO C trigraphs
818 Do not predefine system-specific and GCC-specific macros
822 Enable verbose output
826 ; Documented in common.opt
828 ; This comment is to ensure we retain the blank line above.