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.
49 ; Comments can appear on their own line anwhere in the file, preceded
50 ; by a semicolon. Whitespace is permitted before the semicolon.
52 ; For each switch XXX below, an enumeration constant is created by the
53 ; script opts.sh spelt OPT_XXX, but with all non-alphanumeric
54 ; characters replaced with an underscore.
56 ; Please try to keep this file in ASCII collating order.
71 C ObjC C++ ObjC++ Joined Separate
74 C ObjC C++ ObjC++ Joined Separate
75 -A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>
79 Do not discard comments
83 Do not discard comments in macro expansions
86 C ObjC C++ ObjC++ Joined Separate
87 -D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
94 Print the name of header files as they are used
97 C ObjC C++ ObjC++ Joined Separate
98 -I <dir> Add <dir> to the end of the main include path. -I- gives more include path control; see info documentation
102 Generate make dependencies
105 C ObjC C++ ObjC++ Separate
106 Generate make dependencies and compile
109 C ObjC C++ ObjC++ Joined Separate
110 -MF <file> Write dependency output to the given file
114 Treat missing header files as generated files
118 Like -M but ignore system header files
121 C ObjC C++ ObjC++ Separate
122 Like -MD but ignore system header files
126 Generate phony targets for all headers
129 C ObjC C++ ObjC++ Joined Separate
130 -MQ <target> Add a MAKE-quoted target
133 C ObjC C++ ObjC++ Joined Separate
134 -MT <target> Add an unquoted target
138 Do not generate #line directives
141 C ObjC C++ ObjC++ Joined Separate
142 -U<macro> Undefine <macro>
149 Enable most warning messages
153 Warn about casting functions to incompatible types
157 Warn about casts which discard qualifiers
161 Warn about subscripts whose type is \"char\"
165 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
169 Synonym for -Wcomment
173 Warn about possibly confusing type conversions
177 Warn when all constructors and destructors are private
181 Warn about deprecated compiler features
185 Warn about compile-time integer division by zero
189 Warn about violations of Effective C++ style rules
193 Warn about stray tokens after #elif and #endif
197 ; Documented in common.opt
199 Werror-implicit-function-declaration
200 C ObjC RejectNegative
201 Make implicit function declarations an error
205 Warn if testing floating point numbers for equality
209 Warn about printf/scanf/strftime/strfmon format string anomalies
213 Warn if passing too many arguments to a function for its format string
217 Warn about format strings that are not literals
221 Warn about possible security problems with format functions
225 Warn about strftime formats yielding 2-digit years
231 C ObjC C++ ObjC++ Joined
236 Wimplicit-function-declaration
238 Warn about implicit function declarations
242 Warn when a declaration does not specify a type
246 Warn about uses of the \"#import\" directive
250 Warn about invalid uses of the \"offsetof\" macro
254 Warn about PCH files that are found but not used
258 Do not warn about using \"long long\" when -pedantic
262 Warn about suspicious declarations of \"main\"
266 Warn about possibly missing braces around initializers
268 Wmissing-declarations
270 Warn about global functions without previous declarations
272 Wmissing-format-attribute
274 Warn about functions which might be candidates for format attributes
278 Warn about global functions without prototypes
282 Warn about use of multi-character character constants
286 Warn about \"extern\" declarations not at file scope
290 Warn when non-templatized friend functions are declared within a template
294 Warn about non-virtual destructors
301 Warn if a C-style cast is used in a program
305 Warn about overloaded virtual function names
309 Warn about possibly missing parentheses
313 Warn when converting the type of pointers to member functions
317 Warn about function pointer arithmetic
324 Warn about multiple declarations of the same object
328 Warn when the compiler reorders code
332 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
339 Warn about possible violations of sequence point rules
343 Warn about signed-unsigned comparisons
347 Warn when overload promotes from unsigned to signed
351 Warn about unprototyped function declarations
355 Warn when synthesis behavior differs from Cfront
359 Do not suppress warnings from system headers
363 Warn about features not present in traditional C
367 Warn if trigraphs are encountered that might affect the meaning of the program
374 Warn if an undefined macro is used in an #if directive
378 Warn about unrecognized pragmas
382 Warn about macros defined in the main file that are not used
386 Give strings the type \"array of char\"
390 A synonym for -std=c89. In a future version of GCC it will become synonymous with -std=c99 instead
393 C ObjC C++ ObjC++ Joined
394 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
397 C++ ObjC++ Joined UInteger
401 Enforce class member access control semantics
406 falt-external-templates
408 Change when template instances are emitted
412 Recognize the \"asm\" keyword
416 Recognize built-in functions
419 C ObjC C++ ObjC++ Joined
423 Check the return value of new
427 Allow the arguments of the '?' operator to have different types
431 Reduce the size of object files
435 Make string literals \"const char[]\" not \"char[]\"
437 fconstant-string-class=
442 Inline member functions by default
444 fdollars-in-identifiers
446 Permit '$' as an identifier character
449 C ObjC C++ ObjC++ Joined RejectNegative
450 -fdump-<type> Dump various compiler internals to a file
457 Generate code to check exception specifications
463 C ObjC C++ ObjC++ Joined RejectNegative
464 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
477 Scope of for-init-statement variables is local to the loop
481 Do not assume that standard C libraries and \"main\" exist
485 Recognize GNU-defined keywords
501 Assume normal C execution environment
505 Enable support for huge objects
509 Export functions even if they can be inlined
511 fimplicit-inline-templates
513 Emit implicit instantiations of inline templates
517 Emit implicit instantiations of templates
524 Don't warn about uses of Microsoft extensions
526 fname-mangling-version-
543 Recognize C++ kewords like \"compl\" and \"xor\"
547 Enable optional diagnostics
554 Downgrade conformance errors to warnings
558 Treat the input file as already preprocessed
562 Enable automatic template instantiation
566 Generate run time type descriptor information
570 Use the same size for double as for float
574 Use the narrowest integer type possible for enumeration types
578 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
585 When \"signed\" or \"unsigned\" is not given make the bitfield signed
589 Make \"char\" signed by default
596 Display statistics accumulated during compilation
602 C ObjC C++ ObjC++ Joined RejectNegative UInteger
603 -ftabstop=<number> Distance between tab stops for column reporting
606 C++ ObjC++ Joined RejectNegative UInteger
607 -ftemplate-depth-<number> Specify maximum template instantiation depth
614 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
618 Make \"char\" unsigned by default
622 Use __cxa_atexit to register destructors
626 Discard unused virtual functions
630 Implement vtables using thunks
634 Emit common-like symbols as weak symbols
637 C ObjC C++ ObjC++ Joined RejectNegative
638 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
642 Emit cross referencing information
648 C ObjC C++ ObjC++ Joined Separate
649 -idirafter <dir> Add <dir> to the end of the system include path
652 C ObjC C++ ObjC++ Joined Separate
653 -imacros <file> Accept definition of macros in <file>
656 C ObjC C++ ObjC++ Joined Separate
657 -include <file> Include the contents of <file> before other files
660 C ObjC C++ ObjC++ Joined Separate
661 -iprefix <path> Specify <path> as a prefix for next two options
664 C ObjC C++ ObjC++ Joined Separate
665 -isysroot <dir> Set <dir> to be the system root directory
668 C ObjC C++ ObjC++ Joined Separate
669 -isystem <dir> Add <dir> to the start of the system include path
672 C ObjC C++ ObjC++ Joined Separate
673 -iwithprefix <dir> Add <dir> to the end of the system include path
676 C ObjC C++ ObjC++ Joined Separate
677 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
681 For internal use only
685 For internal use only
689 Do not search standard system include directories (those specified with -isystem will still be used)
693 Do not search standard system include directories for C++
696 C ObjC C++ ObjC++ Joined Separate
697 ; Documented in common.opt
701 ; Documented in common.opt
705 ; Documented in common.opt
707 print-objc-runtime-info
712 Remap file names when including files
716 Conform to the ISO 1998 C++ standard
720 Conform to the ISO 1990 C standard
724 Conform to the ISO 1999 C standard
728 Deprecated in favor of -std=c99
732 Conform to the ISO 1998 C++ standard with GNU extensions
736 Conform to the ISO 1990 C standard with GNU extensions
740 Conform to the ISO 1999 C standard with GNU extensions
744 Deprecated in favor of -std=gnu99
748 Deprecated in favor of -std=c89
752 Conform to the ISO 1990 C standard as amended in 1994
756 Deprecated in favor of -std=c99
760 Deprecated in favor of -std=c99
764 Enable traditional preprocessing
768 -trigraphs Support ISO C trigraphs
772 Do not predefine system-specific and GCC-specific macros
776 Enable verbose output
780 ; Documented in common.opt
782 ; This comment is to ensure we retain the blank line above.