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.
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
97 C ObjC C++ ObjC++ Joined Separate
98 -F <dir> Add <dir> to the end of the main framework include path
102 Print the name of header files as they are used
105 C ObjC C++ ObjC++ Joined Separate
106 -I <dir> Add <dir> to the end of the main include path
110 Generate make dependencies
113 C ObjC C++ ObjC++ Separate
114 Generate make dependencies and compile
117 C ObjC C++ ObjC++ Joined Separate
118 -MF <file> Write dependency output to the given file
122 Treat missing header files as generated files
126 Like -M but ignore system header files
129 C ObjC C++ ObjC++ Separate
130 Like -MD but ignore system header files
134 Generate phony targets for all headers
137 C ObjC C++ ObjC++ Joined Separate
138 -MQ <target> Add a MAKE-quoted target
141 C ObjC C++ ObjC++ Joined Separate
142 -MT <target> Add an unquoted target
146 Do not generate #line directives
149 C ObjC C++ ObjC++ Joined Separate
150 -U<macro> Undefine <macro>
157 Enable most warning messages
161 Warn about casting functions to incompatible types
165 Warn about casts which discard qualifiers
169 Warn about subscripts whose type is \"char\"
173 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
177 Synonym for -Wcomment
181 Warn about possibly confusing type conversions
185 Warn when all constructors and destructors are private
187 Wdeclaration-after-statement
189 Warn when a declaration is found after a statement
193 Warn about deprecated compiler features
197 Warn about compile-time integer division by zero
201 Warn about violations of Effective C++ style rules
205 Warn about stray tokens after #elif and #endif
209 ; Documented in common.opt
211 Werror-implicit-function-declaration
212 C ObjC RejectNegative
213 Make implicit function declarations an error
217 Warn if testing floating point numbers for equality
221 Warn about printf/scanf/strftime/strfmon format string anomalies
225 Warn if passing too many arguments to a function for its format string
229 Warn about format strings that are not literals
233 Warn about possible security problems with format functions
237 Warn about strftime formats yielding 2-digit years
243 C ObjC C++ ObjC++ Joined
247 Warn about variables which are initialized to themselves.
252 Wimplicit-function-declaration
254 Warn about implicit function declarations
258 Warn when a declaration does not specify a type
262 Deprecated. This switch has no effect.
266 Warn about invalid uses of the \"offsetof\" macro
270 Warn about PCH files that are found but not used
274 Do not warn about using \"long long\" when -pedantic
278 Warn about suspicious declarations of \"main\"
282 Warn about possibly missing braces around initializers
284 Wmissing-declarations
286 Warn about global functions without previous declarations
288 Wmissing-format-attribute
290 Warn about functions which might be candidates for format attributes
294 Warn about global functions without prototypes
298 Warn about use of multi-character character constants
302 Warn about \"extern\" declarations not at file scope
306 Warn when non-templatized friend functions are declared within a template
310 Warn about non-virtual destructors
317 Warn if a C-style cast is used in a program
319 Wold-style-definition
321 Warn if an old-style parameter definition is used
325 Warn about overloaded virtual function names
329 Warn about possibly missing parentheses
333 Warn when converting the type of pointers to member functions
337 Warn about function pointer arithmetic
341 Warn if inherited methods are unimplemented
345 Warn about multiple declarations of the same object
349 Warn when the compiler reorders code
353 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
357 Warn if a selector has multiple methods
361 Warn about possible violations of sequence point rules
365 Warn about signed-unsigned comparisons
369 Warn when overload promotes from unsigned to signed
373 Warn about unprototyped function declarations
377 Warn when synthesis behavior differs from Cfront
381 Do not suppress warnings from system headers
385 Warn about features not present in traditional C
389 Warn if trigraphs are encountered that might affect the meaning of the program
396 Warn if an undefined macro is used in an #if directive
400 Warn about unrecognized pragmas
404 Warn about macros defined in the main file that are not used
408 Do not warn about using variadic macros when -pedantic
412 Give strings the type \"array of char\"
416 A synonym for -std=c89. In a future version of GCC it will become synonymous with -std=c99 instead
419 C ObjC C++ ObjC++ Joined
420 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
424 Enforce class member access control semantics
429 falt-external-templates
431 Change when template instances are emitted
435 Recognize the \"asm\" keyword
439 Recognize built-in functions
442 C ObjC C++ ObjC++ Joined
446 Check the return value of new
450 Allow the arguments of the '?' operator to have different types
454 Reduce the size of object files
458 Make string literals \"const char[]\" not \"char[]\"
460 fconstant-string-class=
462 -fconst-string-class=<name> Use class <name> for constant strings
466 Inline member functions by default
468 fdollars-in-identifiers
470 Permit '$' as an identifier character
477 Generate code to check exception specifications
483 C ObjC C++ ObjC++ Joined RejectNegative
484 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
487 C ObjC C++ ObjC++ Joined RejectNegative
488 -finput-charset=<cset> Specify the default character set for source files.
502 Scope of for-init-statement variables is local to the loop
506 Do not assume that standard C libraries and \"main\" exist
510 Recognize GNU-defined keywords
514 Generate code for GNU runtime environment
527 Assume normal C execution environment
531 Enable support for huge objects
535 Export functions even if they can be inlined
537 fimplicit-inline-templates
539 Emit implicit instantiations of inline templates
543 Emit implicit instantiations of templates
550 Don't warn about uses of Microsoft extensions
552 fname-mangling-version-
560 Generate code for NeXT (Apple Mac OS X) runtime environment
564 Assume that receivers of Objective-C messages may be nil
574 Enable Objective-C exception and synchronization syntax
578 Recognize C++ kewords like \"compl\" and \"xor\"
582 Enable optional diagnostics
589 Downgrade conformance errors to warnings
593 Treat the input file as already preprocessed
595 freplace-objc-classes
597 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
601 Enable automatic template instantiation
605 Generate run time type descriptor information
609 Use the same size for double as for float
613 Use the narrowest integer type possible for enumeration types
617 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
624 When \"signed\" or \"unsigned\" is not given make the bitfield signed
628 Make \"char\" signed by default
635 Display statistics accumulated during compilation
641 C ObjC C++ ObjC++ Joined RejectNegative UInteger
642 -ftabstop=<number> Distance between tab stops for column reporting
645 C++ ObjC++ Joined RejectNegative UInteger
646 -ftemplate-depth-<number> Specify maximum template instantiation depth
653 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
657 Make \"char\" unsigned by default
661 Use __cxa_atexit to register destructors
665 Discard unused virtual functions
669 Implement vtables using thunks
673 Emit common-like symbols as weak symbols
676 C ObjC C++ ObjC++ Joined RejectNegative
677 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
681 Generate a #line directive pointing at the current working directory
685 Emit cross referencing information
689 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
693 Dump declarations to a .decl file
696 C ObjC C++ ObjC++ Joined Separate
697 -idirafter <dir> Add <dir> to the end of the system include path
700 C ObjC C++ ObjC++ Joined Separate
701 -imacros <file> Accept definition of macros in <file>
704 C ObjC C++ ObjC++ Joined Separate
705 -include <file> Include the contents of <file> before other files
708 C ObjC C++ ObjC++ Joined Separate
709 -iprefix <path> Specify <path> as a prefix for next two options
712 C ObjC C++ ObjC++ Joined Separate
713 -isysroot <dir> Set <dir> to be the system root directory
716 C ObjC C++ ObjC++ Joined Separate
717 -isystem <dir> Add <dir> to the start of the system include path
720 C ObjC C++ ObjC++ Joined Separate
721 -iquote <dir> Add <dir> to the end of the quote include path
724 C ObjC C++ ObjC++ Joined Separate
725 -iwithprefix <dir> Add <dir> to the end of the system include path
728 C ObjC C++ ObjC++ Joined Separate
729 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
735 C ObjC C++ ObjC++ Undocumented
739 Do not search standard system include directories (those specified with -isystem will still be used)
743 Do not search standard system include directories for C++
746 C ObjC C++ ObjC++ Joined Separate
747 ; Documented in common.opt
751 ; Documented in common.opt
755 ; Documented in common.opt
757 print-objc-runtime-info
759 Generate C header of platform-specific features
763 Remap file names when including files
767 Conform to the ISO 1998 C++ standard
771 Conform to the ISO 1990 C standard
775 Conform to the ISO 1999 C standard
779 Deprecated in favor of -std=c99
783 Conform to the ISO 1998 C++ standard with GNU extensions
787 Conform to the ISO 1990 C standard with GNU extensions
791 Conform to the ISO 1999 C standard with GNU extensions
795 Deprecated in favor of -std=gnu99
799 Deprecated in favor of -std=c89
803 Conform to the ISO 1990 C standard as amended in 1994
807 Deprecated in favor of -std=c99
811 Deprecated in favor of -std=c99
815 Enable traditional preprocessing
819 -trigraphs Support ISO C trigraphs
823 Do not predefine system-specific and GCC-specific macros
827 Enable verbose output
831 ; Documented in common.opt
833 ; This comment is to ensure we retain the blank line above.