1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003, 2004, 2005 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
21 ; See the GCC internals manual for a description of this file's format.
23 ; Please try to keep this file in ASCII collating order.
38 C ObjC C++ ObjC++ Joined Separate
41 C ObjC C++ ObjC++ Joined Separate
42 -A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>
46 Do not discard comments
50 Do not discard comments in macro expansions
53 C ObjC C++ ObjC++ Joined Separate
54 -D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
57 C ObjC C++ ObjC++ Undocumented
60 C ObjC C++ ObjC++ Joined Separate
61 -F <dir> Add <dir> to the end of the main framework include path
65 Print the name of header files as they are used
68 C ObjC C++ ObjC++ Joined Separate
69 -I <dir> Add <dir> to the end of the main include path
73 Generate make dependencies
76 C ObjC C++ ObjC++ Separate
77 Generate make dependencies and compile
80 C ObjC C++ ObjC++ Joined Separate
81 -MF <file> Write dependency output to the given file
85 Treat missing header files as generated files
89 Like -M but ignore system header files
92 C ObjC C++ ObjC++ Separate
93 Like -MD but ignore system header files
97 Generate phony targets for all headers
100 C ObjC C++ ObjC++ Joined Separate
101 -MQ <target> Add a MAKE-quoted target
104 C ObjC C++ ObjC++ Joined Separate
105 -MT <target> Add an unquoted target
109 Do not generate #line directives
112 C ObjC C++ ObjC++ Joined Separate
113 -U<macro> Undefine <macro>
116 C++ ObjC++ Var(warn_abi)
117 Warn about things that will change when compiling with an ABI-compliant compiler
121 Enable most warning messages
124 C ObjC Var(warn_bad_function_cast)
125 Warn about casting functions to incompatible types
128 C ObjC C++ ObjC++ Var(warn_cast_qual)
129 Warn about casts which discard qualifiers
132 C ObjC C++ ObjC++ Var(warn_char_subscripts)
133 Warn about subscripts whose type is \"char\"
137 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
141 Synonym for -Wcomment
144 C ObjC C++ ObjC++ Var(warn_conversion)
145 Warn about possibly confusing type conversions
148 C++ ObjC++ Var(warn_ctor_dtor_privacy)
149 Warn when all constructors and destructors are private
151 Wdeclaration-after-statement
152 C ObjC Var(warn_declaration_after_statement)
153 Warn when a declaration is found after a statement
156 C++ ObjC++ Var(warn_deprecated) Init(1)
157 Warn about deprecated compiler features
160 C ObjC Var(warn_div_by_zero) Init(1)
161 Warn about compile-time integer division by zero
164 C++ ObjC++ Var(warn_ecpp)
165 Warn about violations of Effective C++ style rules
169 Warn about stray tokens after #elif and #endif
173 ; Documented in common.opt
175 Werror-implicit-function-declaration
176 C ObjC RejectNegative
177 Make implicit function declarations an error
180 C ObjC C++ ObjC++ Var(warn_float_equal)
181 Warn if testing floating point numbers for equality
185 Warn about printf/scanf/strftime/strfmon format string anomalies
188 C ObjC C++ ObjC++ Var(warn_format_extra_args)
189 Warn if passing too many arguments to a function for its format string
192 C ObjC C++ ObjC++ Var(warn_format_nonliteral)
193 Warn about format strings that are not literals
196 C ObjC C++ ObjC++ Var(warn_format_security)
197 Warn about possible security problems with format functions
200 C ObjC C++ ObjC++ Var(warn_format_y2k)
201 Warn about strftime formats yielding 2-digit years
204 C ObjC Var(warn_format_zero_length)
205 Warn about zero-length formats
208 C ObjC C++ ObjC++ Joined
211 C ObjC C++ ObjC++ Var(warn_init_self)
212 Warn about variables which are initialized to themselves.
217 Wimplicit-function-declaration
218 C ObjC Var(mesg_implicit_function_declaration) Init(-1)
219 Warn about implicit function declarations
222 C ObjC Var(warn_implicit_int)
223 Warn when a declaration does not specify a type
227 Deprecated. This switch has no effect.
230 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
231 Warn about invalid uses of the \"offsetof\" macro
235 Warn about PCH files that are found but not used
238 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
239 Do not warn about using \"long long\" when -pedantic
243 Warn about suspicious declarations of \"main\"
246 C ObjC C++ ObjC++ Var(warn_missing_braces)
247 Warn about possibly missing braces around initializers
249 Wmissing-declarations
250 C ObjC Var(warn_missing_declarations)
251 Warn about global functions without previous declarations
253 Wmissing-field-initializers
254 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
255 Warn about missing fields in struct initializers
257 Wmissing-format-attribute
258 C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
259 Warn about functions which might be candidates for format attributes
261 Wmissing-include-dirs
263 Warn about user-specified include directories that do not exist
266 C ObjC Var(warn_missing_prototypes)
267 Warn about global functions without prototypes
271 Warn about use of multi-character character constants
274 C ObjC Var(warn_nested_externs)
275 Warn about \"extern\" declarations not at file scope
278 C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
279 Warn when non-templatized friend functions are declared within a template
282 C++ ObjC++ Var(warn_nonvdtor)
283 Warn about non-virtual destructors
286 C ObjC Var(warn_nonnull)
287 Warn about NULL being passed to argument slots marked as requiring non-NULL
290 C ObjC C++ ObjC++ Joined
291 -Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings
294 C++ ObjC++ Var(warn_old_style_cast)
295 Warn if a C-style cast is used in a program
297 Wold-style-definition
298 C ObjC Var(warn_old_style_definition)
299 Warn if an old-style parameter definition is used
302 C++ ObjC++ Var(warn_overloaded_virtual)
303 Warn about overloaded virtual function names
306 C ObjC C++ ObjC++ Var(warn_parentheses)
307 Warn about possibly missing parentheses
310 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
311 Warn when converting the type of pointers to member functions
314 C ObjC C++ ObjC++ Var(warn_pointer_arith)
315 Warn about function pointer arithmetic
318 ObjC ObjC++ Var(warn_protocol) Init(1)
319 Warn if inherited methods are unimplemented
322 C ObjC C++ ObjC++ Var(warn_redundant_decls)
323 Warn about multiple declarations of the same object
326 C++ ObjC++ Var(warn_reorder)
327 Warn when the compiler reorders code
331 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
334 ObjC ObjC++ Var(warn_selector)
335 Warn if a selector has multiple methods
338 C ObjC C++ ObjC++ Var(warn_sequence_point)
339 Warn about possible violations of sequence point rules
342 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
343 Warn about signed-unsigned comparisons
346 C++ ObjC++ Var(warn_sign_promo)
347 Warn when overload promotes from unsigned to signed
350 C ObjC Var(warn_strict_prototypes)
351 Warn about unprototyped function declarations
354 C++ ObjC++ Var(warn_synth)
355 Warn when synthesis behavior differs from Cfront
359 Do not suppress warnings from system headers
362 C ObjC Var(warn_traditional)
363 Warn about features not present in traditional C
367 Warn if trigraphs are encountered that might affect the meaning of the program
370 ObjC ObjC++ Var(warn_undeclared_selector)
371 Warn about @selector()s without previously declared methods
375 Warn if an undefined macro is used in an #if directive
379 Warn about unrecognized pragmas
383 Warn about macros defined in the main file that are not used
387 Do not warn about using variadic macros when -pedantic
391 Give strings the type \"array of char\"
394 C ObjC Var(warn_pointer_sign) Init(1)
395 Warn when a pointer differs in signedness in an assignment.
399 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
402 C ObjC C++ ObjC++ Joined
403 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
407 Enforce class member access control semantics
412 falt-external-templates
414 Change when template instances are emitted
418 Recognize the \"asm\" keyword
422 Recognize built-in functions
425 C ObjC C++ ObjC++ Joined
429 Check the return value of new
433 Allow the arguments of the '?' operator to have different types
437 Reduce the size of object files
441 Make string literals \"const char[]\" not \"char[]\"
443 fconstant-string-class=
445 -fconst-string-class=<name> Use class <name> for constant strings
449 Inline member functions by default
451 fdollars-in-identifiers
453 Permit '$' as an identifier character
460 Generate code to check exception specifications
466 C ObjC C++ ObjC++ Joined RejectNegative
467 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
470 C ObjC C++ ObjC++ Joined RejectNegative
471 -finput-charset=<cset> Specify the default character set for source files.
485 Scope of for-init-statement variables is local to the loop
489 Do not assume that standard C libraries and \"main\" exist
493 Recognize GNU-defined keywords
497 Generate code for GNU runtime environment
510 Assume normal C execution environment
514 Enable support for huge objects
518 Export functions even if they can be inlined
520 fimplicit-inline-templates
522 Emit implicit instantiations of inline templates
526 Emit implicit instantiations of templates
533 Don't warn about uses of Microsoft extensions
535 fname-mangling-version-
543 Generate code for NeXT (Apple Mac OS X) runtime environment
547 Assume that receivers of Objective-C messages may be nil
557 Enable Objective-C exception and synchronization syntax
559 fobjc-sjlj-exceptions
561 Enable Objective-C setjmp exception handling runtime
565 Recognize C++ kewords like \"compl\" and \"xor\"
569 Enable optional diagnostics
576 Look for and use PCH files even when preprocessing
580 Downgrade conformance errors to warnings
584 Treat the input file as already preprocessed
586 freplace-objc-classes
588 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
592 Enable automatic template instantiation
596 Generate run time type descriptor information
600 Use the same size for double as for float
604 Use the narrowest integer type possible for enumeration types
608 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
612 When \"signed\" or \"unsigned\" is not given make the bitfield signed
616 Make \"char\" signed by default
623 Display statistics accumulated during compilation
629 C ObjC C++ ObjC++ Joined RejectNegative UInteger
630 -ftabstop=<number> Distance between tab stops for column reporting
633 C++ ObjC++ Joined RejectNegative UInteger
634 -ftemplate-depth-<number> Specify maximum template instantiation depth
641 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
645 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
649 Make \"char\" unsigned by default
653 Use __cxa_atexit to register destructors
655 fvisibility-inlines-hidden
657 Marks all inlined methods as having hidden visibility
661 Discard unused virtual functions
665 Implement vtables using thunks
669 Emit common-like symbols as weak symbols
672 C ObjC C++ ObjC++ Joined RejectNegative
673 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
677 Generate a #line directive pointing at the current working directory
681 Emit cross referencing information
685 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
689 Dump declarations to a .decl file
692 C ObjC C++ ObjC++ Joined Separate
693 -idirafter <dir> Add <dir> to the end of the system include path
696 C ObjC C++ ObjC++ Joined Separate
697 -imacros <file> Accept definition of macros in <file>
700 C ObjC C++ ObjC++ Joined Separate
701 -include <file> Include the contents of <file> before other files
704 C ObjC C++ ObjC++ Joined Separate
705 -iprefix <path> Specify <path> as a prefix for next two options
708 C ObjC C++ ObjC++ Joined Separate
709 -isysroot <dir> Set <dir> to be the system root directory
712 C ObjC C++ ObjC++ Joined Separate
713 -isystem <dir> Add <dir> to the start of the system include path
716 C ObjC C++ ObjC++ Joined Separate
717 -iquote <dir> Add <dir> to the end of the quote include path
720 C ObjC C++ ObjC++ Joined Separate
721 -iwithprefix <dir> Add <dir> to the end of the system include path
724 C ObjC C++ ObjC++ Joined Separate
725 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
731 C ObjC C++ ObjC++ Undocumented
735 Do not search standard system include directories (those specified with -isystem will still be used)
739 Do not search standard system include directories for C++
742 C ObjC C++ ObjC++ Joined Separate
743 ; Documented in common.opt
747 ; Documented in common.opt
751 ; Documented in common.opt
753 print-objc-runtime-info
755 Generate C header of platform-specific features
759 Remap file names when including files
763 Conform to the ISO 1998 C++ standard
767 Conform to the ISO 1990 C standard
771 Conform to the ISO 1999 C standard
775 Deprecated in favor of -std=c99
779 Conform to the ISO 1998 C++ standard with GNU extensions
783 Conform to the ISO 1990 C standard with GNU extensions
787 Conform to the ISO 1999 C standard with GNU extensions
791 Deprecated in favor of -std=gnu99
795 Conform to the ISO 1990 C standard
799 Conform to the ISO 1990 C standard as amended in 1994
803 Conform to the ISO 1999 C standard
807 Deprecated in favor of -std=iso9899:1999
811 Enable traditional preprocessing
815 -trigraphs Support ISO C trigraphs
819 Do not predefine system-specific and GCC-specific macros
823 Enable verbose output
827 ; Documented in common.opt
829 ; This comment is to ensure we retain the blank line above.