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.
77 C ObjC C++ ObjC++ Joined Separate
80 C ObjC C++ ObjC++ Joined Separate
81 -A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>
85 Do not discard comments
89 Do not discard comments in macro expansions
92 C ObjC C++ ObjC++ Joined Separate
93 -D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
96 C ObjC C++ ObjC++ Undocumented
100 Print the name of header files as they are used
103 C ObjC C++ ObjC++ Joined Separate
104 -I <dir> Add <dir> to the end of the main include path. -I- gives more include path control; see info documentation
108 Generate make dependencies
111 C ObjC C++ ObjC++ Separate
112 Generate make dependencies and compile
115 C ObjC C++ ObjC++ Joined Separate
116 -MF <file> Write dependency output to the given file
120 Treat missing header files as generated files
124 Like -M but ignore system header files
127 C ObjC C++ ObjC++ Separate
128 Like -MD but ignore system header files
132 Generate phony targets for all headers
135 C ObjC C++ ObjC++ Joined Separate
136 -MQ <target> Add a MAKE-quoted target
139 C ObjC C++ ObjC++ Joined Separate
140 -MT <target> Add an unquoted target
144 Do not generate #line directives
147 C ObjC C++ ObjC++ Joined Separate
148 -U<macro> Undefine <macro>
155 Enable most warning messages
159 Warn about casting functions to incompatible types
163 Warn about casts which discard qualifiers
167 Warn about subscripts whose type is \"char\"
171 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
175 Synonym for -Wcomment
179 Warn about possibly confusing type conversions
183 Warn when all constructors and destructors are private
185 Wdeclaration-after-statement
187 Warn when a declaration is found after a statement
191 Warn about deprecated compiler features
195 Warn about compile-time integer division by zero
199 Warn about violations of Effective C++ style rules
203 Warn about stray tokens after #elif and #endif
207 ; Documented in common.opt
209 Werror-implicit-function-declaration
210 C ObjC RejectNegative
211 Make implicit function declarations an error
215 Warn if testing floating point numbers for equality
219 Warn about printf/scanf/strftime/strfmon format string anomalies
223 Warn if passing too many arguments to a function for its format string
227 Warn about format strings that are not literals
231 Warn about possible security problems with format functions
235 Warn about strftime formats yielding 2-digit years
241 C ObjC C++ ObjC++ Joined
245 Warn about variables which are initialized to themselves.
250 Wimplicit-function-declaration
252 Warn about implicit function declarations
256 Warn when a declaration does not specify a type
260 Deprecated. This switch has no effect.
264 Warn about invalid uses of the \"offsetof\" macro
268 Warn about PCH files that are found but not used
272 Do not warn about using \"long long\" when -pedantic
276 Warn about suspicious declarations of \"main\"
280 Warn about possibly missing braces around initializers
282 Wmissing-declarations
284 Warn about global functions without previous declarations
286 Wmissing-format-attribute
288 Warn about functions which might be candidates for format attributes
292 Warn about global functions without prototypes
296 Warn about use of multi-character character constants
300 Warn about \"extern\" declarations not at file scope
304 Warn when non-templatized friend functions are declared within a template
308 Warn about non-virtual destructors
315 Warn if a C-style cast is used in a program
317 Wold-style-definition
319 Warn if an old-style parameter definition is used
323 Warn about overloaded virtual function names
327 Warn about possibly missing parentheses
331 Warn when converting the type of pointers to member functions
335 Warn about function pointer arithmetic
339 Warn if inherited methods are unimplemented
343 Warn about multiple declarations of the same object
347 Warn when the compiler reorders code
351 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
355 Warn if a selector has multiple methods
359 Warn about possible violations of sequence point rules
363 Warn about signed-unsigned comparisons
367 Warn when overload promotes from unsigned to signed
371 Warn about unprototyped function declarations
375 Warn when synthesis behavior differs from Cfront
379 Do not suppress warnings from system headers
383 Warn about features not present in traditional C
387 Warn if trigraphs are encountered that might affect the meaning of the program
394 Warn if an undefined macro is used in an #if directive
398 Warn about unrecognized pragmas
402 Warn about macros defined in the main file that are not used
406 Give strings the type \"array of char\"
410 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
413 C ObjC C++ ObjC++ Joined
414 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
418 Enforce class member access control semantics
423 falt-external-templates
425 Change when template instances are emitted
429 Recognize the \"asm\" keyword
433 Recognize built-in functions
436 C ObjC C++ ObjC++ Joined
440 Check the return value of new
444 Allow the arguments of the '?' operator to have different types
448 Reduce the size of object files
452 Make string literals \"const char[]\" not \"char[]\"
454 fconstant-string-class=
456 -fconst-string-class=<name> Use class <name> for constant strings
460 Inline member functions by default
462 fdollars-in-identifiers
464 Permit '$' as an identifier character
467 C ObjC C++ ObjC++ Joined RejectNegative
468 -fdump-<type> Dump various compiler internals to a file
475 Generate code to check exception specifications
481 C ObjC C++ ObjC++ Joined RejectNegative
482 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
485 C ObjC C++ ObjC++ Joined RejectNegative
486 -finput-charset=<cset> Specify the default character set for source files.
500 Scope of for-init-statement variables is local to the loop
504 Do not assume that standard C libraries and \"main\" exist
508 Recognize GNU-defined keywords
512 Generate code for GNU runtime environment
525 Assume normal C execution environment
529 Enable support for huge objects
533 Export functions even if they can be inlined
535 fimplicit-inline-templates
537 Emit implicit instantiations of inline templates
541 Emit implicit instantiations of templates
548 Don't warn about uses of Microsoft extensions
550 fname-mangling-version-
558 Generate code for NeXT (Apple Mac OS X) runtime environment
562 Assume that receivers of Objective-C messages may be nil
572 Enable Objective-C exception and synchronization syntax
576 Recognize C++ kewords like \"compl\" and \"xor\"
580 Enable optional diagnostics
587 Downgrade conformance errors to warnings
591 Treat the input file as already preprocessed
593 freplace-objc-classes
595 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
599 Enable automatic template instantiation
603 Generate run time type descriptor information
607 Use the same size for double as for float
611 Use the narrowest integer type possible for enumeration types
615 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
622 When \"signed\" or \"unsigned\" is not given make the bitfield signed
626 Make \"char\" signed by default
633 Display statistics accumulated during compilation
639 C ObjC C++ ObjC++ Joined RejectNegative UInteger
640 -ftabstop=<number> Distance between tab stops for column reporting
643 C++ ObjC++ Joined RejectNegative UInteger
644 -ftemplate-depth-<number> Specify maximum template instantiation depth
651 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
655 Make \"char\" unsigned by default
659 Use __cxa_atexit to register destructors
663 Discard unused virtual functions
667 Implement vtables using thunks
671 Emit common-like symbols as weak symbols
674 C ObjC C++ ObjC++ Joined RejectNegative
675 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
679 Generate a #line directive pointing at the current working directory
683 Emit cross referencing information
687 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
691 Dump declarations to a .decl file
694 C ObjC C++ ObjC++ Joined Separate
695 -idirafter <dir> Add <dir> to the end of the system include path
698 C ObjC C++ ObjC++ Joined Separate
699 -imacros <file> Accept definition of macros in <file>
702 C ObjC C++ ObjC++ Joined Separate
703 -include <file> Include the contents of <file> before other files
706 C ObjC C++ ObjC++ Joined Separate
707 -iprefix <path> Specify <path> as a prefix for next two options
710 C ObjC C++ ObjC++ Joined Separate
711 -isysroot <dir> Set <dir> to be the system root directory
714 C ObjC C++ ObjC++ Joined Separate
715 -isystem <dir> Add <dir> to the start of the system include path
718 C ObjC C++ ObjC++ Joined Separate
719 -iwithprefix <dir> Add <dir> to the end of the system include path
722 C ObjC C++ ObjC++ Joined Separate
723 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
729 C ObjC C++ ObjC++ Undocumented
733 Do not search standard system include directories (those specified with -isystem will still be used)
737 Do not search standard system include directories for C++
740 C ObjC C++ ObjC++ Joined Separate
741 ; Documented in common.opt
745 ; Documented in common.opt
749 ; Documented in common.opt
751 print-objc-runtime-info
753 Generate C header of platform-specific features
757 Remap file names when including files
761 Conform to the ISO 1998 C++ standard
765 Conform to the ISO 1990 C standard
769 Conform to the ISO 1999 C standard
773 Deprecated in favor of -std=c99
777 Conform to the ISO 1998 C++ standard with GNU extensions
781 Conform to the ISO 1990 C standard with GNU extensions
785 Conform to the ISO 1999 C standard with GNU extensions
789 Deprecated in favor of -std=gnu99
793 Conform to the ISO 1990 C standard
797 Conform to the ISO 1990 C standard as amended in 1994
801 Conform to the ISO 1999 C standard
805 Deprecated in favor of -std=iso9899:1999
809 Enable traditional preprocessing
813 -trigraphs Support ISO C trigraphs
817 Do not predefine system-specific and GCC-specific macros
821 Enable verbose output
825 ; Documented in common.opt
829 Enable FreeBSD format extensions
831 ; This comment is to ensure we retain the blank line above.