1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003, 2004, 2005, 2006 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, 51 Franklin Street, Fifth Floor, 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) Warning
117 Warn about things that will change when compiling with an ABI-compliant compiler
120 C ObjC C++ ObjC++ Var(warn_address) Warning
121 Warn about suspicious uses of memory addresses
124 C ObjC C++ ObjC++ Warning
125 Enable most warning messages
128 ObjC ObjC++ Var(warn_assign_intercept) Warning
129 Warn whenever an Objective-C assignment is being intercepted by the garbage collector
132 C ObjC Var(warn_bad_function_cast) Warning
133 Warn about casting functions to incompatible types
136 C Var(warn_cxx_compat) Warning
137 Warn about C constructs that are not in the common subset of C and C++
140 C++ ObjC++ Var(warn_cxx0x_compat)
141 Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x
144 C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
145 Warn about casts which discard qualifiers
148 C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning
149 Warn about subscripts whose type is \"char\"
152 C ObjC C++ ObjC++ Var(warn_clobbered) Init(-1) Warning
153 Warn about variables that might be changed by \"longjmp\" or \"vfork\"
156 C ObjC C++ ObjC++ Warning
157 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
160 C ObjC C++ ObjC++ Warning
161 Synonym for -Wcomment
164 C ObjC C++ ObjC++ Var(warn_conversion) Warning
165 Warn for implicit type conversions that may change a value
168 C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning
169 Warn when all constructors and destructors are private
171 Wdeclaration-after-statement
172 C ObjC Var(warn_declaration_after_statement) Warning
173 Warn when a declaration is found after a statement
176 C++ ObjC++ Var(warn_deprecated) Init(1) Warning
177 Warn about deprecated compiler features
180 C ObjC C++ Var(warn_div_by_zero) Init(1) Warning
181 Warn about compile-time integer division by zero
184 C++ ObjC++ Var(warn_ecpp) Warning
185 Warn about violations of Effective C++ style rules
188 C ObjC C++ ObjC++ Var(warn_empty_body) Init(-1) Warning
189 Warn about an empty body in an if or else statement
192 C ObjC C++ ObjC++ Warning
193 Warn about stray tokens after #elif and #endif
197 ; Documented in common.opt
199 Werror-implicit-function-declaration
200 C ObjC RejectNegative Warning
201 This switch is deprecated; use -Werror=implicit-function-declaration instead
204 C ObjC C++ ObjC++ Var(warn_float_equal) Warning
205 Warn if testing floating point numbers for equality
208 C ObjC C++ ObjC++ Warning
209 Warn about printf/scanf/strftime/strfmon format string anomalies
212 C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning
213 Warn if passing too many arguments to a function for its format string
216 C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning
217 Warn about format strings that are not literals
220 C ObjC C++ ObjC++ Var(warn_format_security) Warning
221 Warn about possible security problems with format functions
224 C ObjC C++ ObjC++ Var(warn_format_y2k) Warning
225 Warn about strftime formats yielding 2-digit years
228 C ObjC Var(warn_format_zero_length) Warning
229 Warn about zero-length formats
232 C ObjC C++ ObjC++ Joined Warning
235 C ObjC C++ ObjC++ Var(warn_init_self) Warning
236 Warn about variables which are initialized to themselves
239 C ObjC C++ ObjC++ Warning
241 Wimplicit-function-declaration
242 C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning
243 Warn about implicit function declarations
246 C ObjC Var(warn_implicit_int) Warning
247 Warn when a declaration does not specify a type
251 Deprecated. This switch has no effect
254 C ObjC Var(warn_int_to_pointer_cast) Init(1) Warning
255 Warn when there is a cast to a pointer from an integer of a different size
258 C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning
259 Warn about invalid uses of the \"offsetof\" macro
262 C ObjC C++ ObjC++ Warning
263 Warn about PCH files that are found but not used
266 C ObjC C++ ObjC++ Var(warn_long_long) Init(1) Warning
267 Do not warn about using \"long long\" when -pedantic
271 Warn about suspicious declarations of \"main\"
274 C ObjC C++ ObjC++ Var(warn_missing_braces) Warning
275 Warn about possibly missing braces around initializers
277 Wmissing-declarations
278 C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
279 Warn about global functions without previous declarations
281 Wmissing-field-initializers
282 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1) Warning
283 Warn about missing fields in struct initializers
285 Wmissing-format-attribute
286 C ObjC C++ ObjC++ Var(warn_missing_format_attribute) Warning
287 Warn about functions which might be candidates for format attributes
289 Wmissing-include-dirs
290 C ObjC C++ ObjC++ Warning
291 Warn about user-specified include directories that do not exist
293 Wmissing-parameter-type
294 C ObjC Var(warn_missing_parameter_type) Init(-1) Warning
295 Warn about function parameters declared without a type specifier in K&R-style functions
298 C ObjC Var(warn_missing_prototypes) Warning
299 Warn about global functions without prototypes
302 C ObjC C++ ObjC++ Warning
303 Warn about use of multi-character character constants
306 C ObjC Var(warn_nested_externs) Warning
307 Warn about \"extern\" declarations not at file scope
310 C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
311 Warn when non-templatized friend functions are declared within a template
314 C++ ObjC++ Var(warn_nonvdtor) Warning
315 Warn about non-virtual destructors
318 C ObjC Var(warn_nonnull) Warning
319 Warn about NULL being passed to argument slots marked as requiring non-NULL
322 C ObjC C++ ObjC++ Joined Warning
323 -Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings
326 C++ ObjC++ Var(warn_old_style_cast) Warning
327 Warn if a C-style cast is used in a program
329 Wold-style-declaration
330 C ObjC Var(warn_old_style_declaration) Init(-1) Warning
331 Warn for obsolescent usage in a declaration
333 Wold-style-definition
334 C ObjC Var(warn_old_style_definition) Warning
335 Warn if an old-style parameter definition is used
338 C ObjC C++ ObjC++ Var(warn_overlength_strings) Init(-1) Warning
339 Warn if a string is longer than the maximum portable length specified by the standard
342 C++ ObjC++ Var(warn_overloaded_virtual) Warning
343 Warn about overloaded virtual function names
346 C ObjC Var(warn_override_init) Init(-1) Warning
347 Warn about overriding initializers without side effects
350 C ObjC C++ ObjC++ Var(warn_parentheses) Warning
351 Warn about possibly missing parentheses
354 C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
355 Warn when converting the type of pointers to member functions
358 C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning
359 Warn about function pointer arithmetic
362 C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
363 Warn when a pointer is cast to an integer of a different size
366 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
367 Warn about misuses of pragmas
370 ObjC ObjC++ Var(warn_protocol) Init(1) Warning
371 Warn if inherited methods are unimplemented
374 C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
375 Warn about multiple declarations of the same object
378 C++ ObjC++ Var(warn_reorder) Warning
379 Warn when the compiler reorders code
382 C ObjC C++ ObjC++ Var(warn_return_type) Warning
383 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
386 ObjC ObjC++ Var(warn_selector) Warning
387 Warn if a selector has multiple methods
390 C ObjC C++ ObjC++ Var(warn_sequence_point) Warning
391 Warn about possible violations of sequence point rules
394 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1) Warning
395 Warn about signed-unsigned comparisons
398 C++ ObjC++ Var(warn_sign_promo) Warning
399 Warn when overload promotes from unsigned to signed
401 Wstrict-null-sentinel
403 Warn about uncasted NULL used as sentinel
406 C ObjC Var(warn_strict_prototypes) Warning
407 Warn about unprototyped function declarations
409 Wstrict-selector-match
410 ObjC ObjC++ Var(warn_strict_selector_match) Warning
411 Warn if type signatures of candidate methods do not match exactly
414 C++ ObjC++ Var(warn_synth) Warning
415 Warn when synthesis behavior differs from Cfront
418 C ObjC C++ ObjC++ Warning
419 Do not suppress warnings from system headers
422 C ObjC Var(warn_traditional) Warning
423 Warn about features not present in traditional C
425 Wtraditional-conversion
426 C ObjC Var(warn_traditional_conversion) Warning
427 Warn of prototypes causing type conversions different from what would happen in the absence of prototype
430 C ObjC C++ ObjC++ Warning
431 Warn if trigraphs are encountered that might affect the meaning of the program
434 ObjC ObjC++ Var(warn_undeclared_selector) Warning
435 Warn about @selector()s without previously declared methods
438 C ObjC C++ ObjC++ Warning
439 Warn if an undefined macro is used in an #if directive
442 C ObjC C++ ObjC++ Warning
443 Warn about unrecognized pragmas
446 C ObjC C++ ObjC++ Warning
447 Warn about macros defined in the main file that are not used
450 C ObjC C++ ObjC++ Warning
451 Do not warn about using variadic macros when -pedantic
454 C ObjC C++ ObjC++ Var(warn_write_strings) Warning
455 In C++, nonzero means warn about deprecated conversion from string literals to `char *'. In C, similar warning, except that the conversion is of course not deprecated by the ISO C standard.
458 C ObjC Var(warn_pointer_sign) Init(-1) Warning
459 Warn when a pointer differs in signedness in an assignment
463 A synonym for -std=c89 (for C) or -std=c++98 (for C++)
466 C ObjC C++ ObjC++ Joined
467 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
471 Enforce class member access control semantics
476 falt-external-templates
478 Change when template instances are emitted
482 Recognize the \"asm\" keyword
486 Recognize built-in functions
489 C ObjC C++ ObjC++ Joined
493 Check the return value of new
497 Allow the arguments of the '?' operator to have different types
501 Reduce the size of object files
503 fconstant-string-class=
505 -fconst-string-class=<name> Use class <name> for constant strings
509 Inline member functions by default
511 fdollars-in-identifiers
513 Permit '$' as an identifier character
520 Generate code to check exception specifications
526 C ObjC C++ ObjC++ Joined RejectNegative
527 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
529 fextended-identifiers
531 Permit universal character names (\\u and \\U) in identifiers
534 C ObjC C++ ObjC++ Joined RejectNegative
535 -finput-charset=<cset> Specify the default character set for source files
543 Scope of for-init-statement variables is local to the loop
547 Do not assume that standard C libraries and \"main\" exist
551 Recognize GNU-defined keywords
555 Generate code for GNU runtime environment
561 C++ ObjC++ Optimization
568 Assume normal C execution environment
572 Enable support for huge objects
576 Export functions even if they can be inlined
578 fimplicit-inline-templates
580 Emit implicit instantiations of inline templates
584 Emit implicit instantiations of templates
587 C++ Var(flag_friend_injection)
588 Inject friend functions into enclosing namespace
593 flax-vector-conversions
595 Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
599 Don't warn about uses of Microsoft extensions
601 fname-mangling-version-
609 Generate code for NeXT (Apple Mac OS X) runtime environment
613 Assume that receivers of Objective-C messages may be nil
621 ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
622 ; to initialize any non-POD ivars in Objective-C++ classes.
623 fobjc-call-cxx-cdtors
624 ObjC++ Var(flag_objc_call_cxx_cdtors)
625 Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed
627 fobjc-direct-dispatch
628 ObjC ObjC++ Var(flag_objc_direct_dispatch)
629 Allow fast jumps to the message dispatcher
631 ; Nonzero means that we will allow new ObjC exception syntax (@throw,
632 ; @try, etc.) in source code.
634 ObjC ObjC++ Var(flag_objc_exceptions)
635 Enable Objective-C exception and synchronization syntax
638 ObjC ObjC++ Var(flag_objc_gc)
639 Enable garbage collection (GC) in Objective-C/Objective-C++ programs
641 ; Nonzero means that we generate NeXT setjmp based exceptions.
642 fobjc-sjlj-exceptions
643 ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
644 Enable Objective-C setjmp exception handling runtime
647 C ObjC C++ ObjC++ Var(flag_openmp)
652 Recognize C++ kewords like \"compl\" and \"xor\"
656 Enable optional diagnostics
663 Look for and use PCH files even when preprocessing
667 Downgrade conformance errors to warnings
671 Treat the input file as already preprocessed
673 freplace-objc-classes
675 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
679 Enable automatic template instantiation
682 C++ ObjC++ Optimization
683 Generate run time type descriptor information
686 C ObjC C++ ObjC++ Optimization
687 Use the same size for double as for float
690 C ObjC C++ ObjC++ Optimization
691 Use the narrowest integer type possible for enumeration types
694 C ObjC C++ ObjC++ Optimization
695 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
699 When \"signed\" or \"unsigned\" is not given make the bitfield signed
703 Make \"char\" signed by default
710 Display statistics accumulated during compilation
716 C ObjC C++ ObjC++ Joined RejectNegative UInteger
717 -ftabstop=<number> Distance between tab stops for column reporting
720 C++ ObjC++ Joined RejectNegative UInteger
721 -ftemplate-depth-<number> Specify maximum template instantiation depth
727 C++ ObjC++ Optimization
728 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
732 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
736 Make \"char\" unsigned by default
740 Use __cxa_atexit to register destructors
742 fuse-cxa-get-exception-ptr
744 Use __cxa_get_exception_ptr in exception handling
746 fvisibility-inlines-hidden
748 Marks all inlined methods as having hidden visibility
752 Discard unused virtual functions
756 Implement vtables using thunks
760 Emit common-like symbols as weak symbols
763 C ObjC C++ ObjC++ Joined RejectNegative
764 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
768 Generate a #line directive pointing at the current working directory
772 Emit cross referencing information
776 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
780 Dump declarations to a .decl file
783 C ObjC C++ ObjC++ Joined Separate
784 -idirafter <dir> Add <dir> to the end of the system include path
787 C ObjC C++ ObjC++ Joined Separate
788 -imacros <file> Accept definition of macros in <file>
791 C ObjC C++ ObjC++ Joined Separate
792 -imultilib <dir> Set <dir> to be the multilib include subdirectory
795 C ObjC C++ ObjC++ Joined Separate
796 -include <file> Include the contents of <file> before other files
799 C ObjC C++ ObjC++ Joined Separate
800 -iprefix <path> Specify <path> as a prefix for next two options
803 C ObjC C++ ObjC++ Joined Separate
804 -isysroot <dir> Set <dir> to be the system root directory
807 C ObjC C++ ObjC++ Joined Separate
808 -isystem <dir> Add <dir> to the start of the system include path
811 C ObjC C++ ObjC++ Joined Separate
812 -iquote <dir> Add <dir> to the end of the quote include path
815 C ObjC C++ ObjC++ Joined Separate
816 -iwithprefix <dir> Add <dir> to the end of the system include path
819 C ObjC C++ ObjC++ Joined Separate
820 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
829 C ObjC C++ ObjC++ Undocumented
833 Do not search standard system include directories (those specified with -isystem will still be used)
837 Do not search standard system include directories for C++
840 C ObjC C++ ObjC++ Joined Separate
841 ; Documented in common.opt
845 ; Documented in common.opt
849 ; Documented in common.opt
851 print-objc-runtime-info
853 Generate C header of platform-specific features
857 Print a checksum of the executable for PCH validity checking, and stop
861 Remap file names when including files
865 Conform to the ISO 1998 C++ standard
869 Conform to the ISO 1998 C++ standard, with extensions that are likely to
870 become a part of the upcoming ISO C++ standard, dubbed C++0x. Note that the
871 extensions enabled by this mode are experimental and may be removed in
872 future releases of GCC.
876 Conform to the ISO 1990 C standard
880 Conform to the ISO 1999 C standard
884 Deprecated in favor of -std=c99
888 Conform to the ISO 1998 C++ standard with GNU extensions
892 Conform to the ISO 1998 C++ standard, with GNU extensions and
893 extensions that are likely to become a part of the upcoming ISO C++
894 standard, dubbed C++0x. Note that the extensions enabled by this mode
895 are experimental and may be removed in future releases of GCC.
899 Conform to the ISO 1990 C standard with GNU extensions
903 Conform to the ISO 1999 C standard with GNU extensions
907 Deprecated in favor of -std=gnu99
911 Conform to the ISO 1990 C standard
915 Conform to the ISO 1990 C standard as amended in 1994
919 Conform to the ISO 1999 C standard
923 Deprecated in favor of -std=iso9899:1999
927 Enable traditional preprocessing
931 -trigraphs Support ISO C trigraphs
935 Do not predefine system-specific and GCC-specific macros
939 Enable verbose output
943 ; Documented in common.opt
945 ; This comment is to ensure we retain the blank line above.