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.
24 ; Please try to keep this file in ASCII collating order.
39 C ObjC C++ ObjC++ Joined Separate
42 C ObjC C++ ObjC++ Joined Separate
43 -A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>
47 Do not discard comments
51 Do not discard comments in macro expansions
54 C ObjC C++ ObjC++ Joined Separate
55 -D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
58 C ObjC C++ ObjC++ Undocumented
61 C ObjC C++ ObjC++ Joined Separate
62 -F <dir> Add <dir> to the end of the main framework include path
66 Print the name of header files as they are used
69 C ObjC C++ ObjC++ Joined Separate
70 -I <dir> Add <dir> to the end of the main include path
74 Generate make dependencies
77 C ObjC C++ ObjC++ Separate
78 Generate make dependencies and compile
81 C ObjC C++ ObjC++ Joined Separate
82 -MF <file> Write dependency output to the given file
86 Treat missing header files as generated files
90 Like -M but ignore system header files
93 C ObjC C++ ObjC++ Separate
94 Like -MD but ignore system header files
98 Generate phony targets for all headers
101 C ObjC C++ ObjC++ Joined Separate
102 -MQ <target> Add a MAKE-quoted target
105 C ObjC C++ ObjC++ Joined Separate
106 -MT <target> Add an unquoted target
110 Do not generate #line directives
113 C ObjC C++ ObjC++ Joined Separate
114 -U<macro> Undefine <macro>
117 C++ ObjC++ Var(warn_abi)
118 Warn about things that will change when compiling with an ABI-compliant compiler
121 C ObjC C++ ObjC++ Var(warn_address)
122 Warn about suspicious uses of memory addresses
126 Enable most warning messages
129 ObjC ObjC++ Var(warn_assign_intercept)
130 Warn whenever an Objective-C assignment is being intercepted by the garbage collector
133 C ObjC Var(warn_bad_function_cast)
134 Warn about casting functions to incompatible types
137 C ObjC Var(warn_cxx_compat)
138 Warn about C constructs that are not in the common subset of C and C++
142 C ObjC C++ ObjC++ Var(warn_cast_qual)
143 Warn about casts which discard qualifiers
146 C ObjC C++ ObjC++ Var(warn_char_subscripts)
147 Warn about subscripts whose type is \"char\"
151 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
155 Synonym for -Wcomment
158 C ObjC C++ ObjC++ Var(warn_conversion)
159 Warn about possibly confusing type conversions
162 C++ ObjC++ Var(warn_ctor_dtor_privacy)
163 Warn when all constructors and destructors are private
165 Wdeclaration-after-statement
166 C ObjC Var(warn_declaration_after_statement)
167 Warn when a declaration is found after a statement
170 C++ ObjC++ Var(warn_deprecated) Init(1)
171 Warn about deprecated compiler features
174 C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1)
175 Warn about compile-time integer division by zero
178 C++ ObjC++ Var(warn_ecpp)
179 Warn about violations of Effective C++ style rules
183 Warn about stray tokens after #elif and #endif
187 ; Documented in common.opt
189 Werror-implicit-function-declaration
190 C ObjC RejectNegative
191 Make implicit function declarations an error
194 C ObjC C++ ObjC++ Var(warn_float_equal)
195 Warn if testing floating point numbers for equality
199 Warn about printf/scanf/strftime/strfmon format string anomalies
202 C ObjC C++ ObjC++ Var(warn_format_extra_args)
203 Warn if passing too many arguments to a function for its format string
206 C ObjC C++ ObjC++ Var(warn_format_nonliteral)
207 Warn about format strings that are not literals
210 C ObjC C++ ObjC++ Var(warn_format_security)
211 Warn about possible security problems with format functions
214 C ObjC C++ ObjC++ Var(warn_format_y2k)
215 Warn about strftime formats yielding 2-digit years
218 C ObjC Var(warn_format_zero_length)
219 Warn about zero-length formats
222 C ObjC C++ ObjC++ Joined
225 C ObjC C++ ObjC++ Var(warn_init_self)
226 Warn about variables which are initialized to themselves
231 Wimplicit-function-declaration
232 C ObjC Var(mesg_implicit_function_declaration) Init(-1)
233 Warn about implicit function declarations
236 C ObjC Var(warn_implicit_int)
237 Warn when a declaration does not specify a type
241 Deprecated. This switch has no effect
244 C ObjC Var(warn_int_to_pointer_cast) Init(1)
245 Warn when there is a cast to a pointer from an integer of a different size
248 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
249 Warn about invalid uses of the \"offsetof\" macro
253 Warn about PCH files that are found but not used
256 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
257 Do not warn about using \"long long\" when -pedantic
261 Warn about suspicious declarations of \"main\"
264 C ObjC C++ ObjC++ Var(warn_missing_braces)
265 Warn about possibly missing braces around initializers
267 Wmissing-declarations
268 C ObjC Var(warn_missing_declarations)
269 Warn about global functions without previous declarations
271 Wmissing-field-initializers
272 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
273 Warn about missing fields in struct initializers
275 Wmissing-format-attribute
276 C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
277 Warn about functions which might be candidates for format attributes
279 Wmissing-include-dirs
281 Warn about user-specified include directories that do not exist
284 C ObjC Var(warn_missing_prototypes)
285 Warn about global functions without prototypes
287 ; APPLE LOCAL begin -Wmost
290 Like -Wall but without -Wparentheses
291 ; APPLE LOCAL end -Wmost
295 Warn about use of multi-character character constants
298 C ObjC Var(warn_nested_externs)
299 Warn about \"extern\" declarations not at file scope
301 ; APPLE LOCAL begin -Wnewline-eof
304 Warn about files missing a newline at the end of the file
305 ; APPLE LOCAL end -Wnewline-eof
308 C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
309 Warn when non-templatized friend functions are declared within a template
312 C++ ObjC++ Var(warn_nonvdtor)
313 Warn about non-virtual destructors
316 C ObjC Var(warn_nonnull)
317 Warn about NULL being passed to argument slots marked as requiring non-NULL
320 C ObjC C++ ObjC++ Joined
321 -Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings
324 C++ ObjC++ Var(warn_old_style_cast)
325 Warn if a C-style cast is used in a program
327 Wold-style-definition
328 C ObjC Var(warn_old_style_definition)
329 Warn if an old-style parameter definition is used
332 C ObjC C++ ObjC++ Var(warn_overlength_strings) Init(-1)
333 Warn if a string is longer than the maximum portable length specified by the standard
336 C++ ObjC++ Var(warn_overloaded_virtual)
337 Warn about overloaded virtual function names
340 C ObjC Var(warn_override_init) Init(-1)
341 Warn about overriding initializers without side effects
344 C ObjC C++ ObjC++ Var(warn_parentheses)
345 Warn about possibly missing parentheses
348 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
349 Warn when converting the type of pointers to member functions
352 C ObjC C++ ObjC++ Var(warn_pointer_arith)
353 Warn about function pointer arithmetic
356 C ObjC Var(warn_pointer_to_int_cast) Init(1)
357 Warn when a pointer is cast to an integer of a different size
360 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1)
361 Warn about misuses of pragmas
364 ObjC ObjC++ Var(warn_protocol) Init(1)
365 Warn if inherited methods are unimplemented
368 C ObjC C++ ObjC++ Var(warn_redundant_decls)
369 Warn about multiple declarations of the same object
372 C++ ObjC++ Var(warn_reorder)
373 Warn when the compiler reorders code
376 C ObjC C++ ObjC++ Var(warn_return_type)
377 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
380 ObjC ObjC++ Var(warn_selector)
381 Warn if a selector has multiple methods
384 C ObjC C++ ObjC++ Var(warn_sequence_point)
385 Warn about possible violations of sequence point rules
388 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
389 Warn about signed-unsigned comparisons
392 C++ ObjC++ Var(warn_sign_promo)
393 Warn when overload promotes from unsigned to signed
395 Wstrict-null-sentinel
397 Warn about uncasted NULL used as sentinel
400 C ObjC Var(warn_strict_prototypes)
401 Warn about unprototyped function declarations
403 Wstrict-selector-match
404 ObjC ObjC++ Var(warn_strict_selector_match)
405 Warn if type signatures of candidate methods do not match exactly
408 C++ ObjC++ Var(warn_synth)
409 Warn when synthesis behavior differs from Cfront
413 Do not suppress warnings from system headers
416 C ObjC Var(warn_traditional)
417 Warn about features not present in traditional C
420 Common Var(warn_trampolines)
421 Warn when trampolines are emitted
425 Warn if trigraphs are encountered that might affect the meaning of the program
428 ObjC ObjC++ Var(warn_undeclared_selector)
429 Warn about @selector()s without previously declared methods
433 Warn if an undefined macro is used in an #if directive
437 Warn about unrecognized pragmas
441 Warn about macros defined in the main file that are not used
445 Do not warn about using variadic macros when -pedantic
448 C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
449 Warn if a variable length array is used
452 C ObjC C++ ObjC++ Var(warn_write_strings)
453 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.
456 C ObjC Var(warn_pointer_sign) Init(-1)
457 Warn when a pointer differs in signedness in an assignment
461 A synonym for -std=c89 (for C) or -std=c++98 (for C++)
464 C ObjC C++ ObjC++ Joined
465 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
469 Enforce class member access control semantics
474 falt-external-templates
476 Change when template instances are emitted
480 Recognize the \"asm\" keyword
484 Recognize built-in functions
487 C ObjC C++ ObjC++ Joined
491 Check the return value of new
495 Allow the arguments of the '?' operator to have different types
499 Reduce the size of object files
501 fconstant-string-class=
503 -fconst-string-class=<name> Use class <name> for constant strings
507 Inline member functions by default
511 Preprocess directives only.
513 fdollars-in-identifiers
515 Permit '$' as an identifier character
522 Generate code to check exception specifications
528 C ObjC C++ ObjC++ Joined RejectNegative
529 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
531 fextended-identifiers
533 Permit universal character names (\\u and \\U) in identifiers
536 C ObjC C++ ObjC++ Joined RejectNegative
537 -finput-charset=<cset> Specify the default character set for source files
545 Scope of for-init-statement variables is local to the loop
549 Do not assume that standard C libraries and \"main\" exist
553 Recognize GNU-defined keywords
557 Generate code for GNU runtime environment
560 C ObjC Var(flag_gnu89_inline) Init(-1)
561 Use traditional GNU semantics for inline functions
574 Assume normal C execution environment
578 Enable support for huge objects
582 Export functions even if they can be inlined
584 fimplicit-inline-templates
586 Emit implicit instantiations of inline templates
590 Emit implicit instantiations of templates
593 C++ ObjC++ Var(flag_friend_injection)
594 Inject friend functions into enclosing namespace
599 flax-vector-conversions
601 Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
605 Don't warn about uses of Microsoft extensions
607 fname-mangling-version-
613 ; APPLE LOCAL begin nested functions 4258406 4357979
615 C ObjC Var(flag_nested_functions)
616 Allow nested functions.
617 ; APPLE LOCAL end nested functions 4258406 4357979
621 Generate code for NeXT (Apple Mac OS X) runtime environment
625 Assume that receivers of Objective-C messages may be nil
633 ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
634 ; to initialize any non-POD ivars in Objective-C++ classes.
635 fobjc-call-cxx-cdtors
636 ObjC++ Var(flag_objc_call_cxx_cdtors)
637 Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed
639 fobjc-direct-dispatch
640 ObjC ObjC++ Var(flag_objc_direct_dispatch)
641 Allow fast jumps to the message dispatcher
643 ; Nonzero means that we will allow new ObjC exception syntax (@throw,
644 ; @try, etc.) in source code.
646 ObjC ObjC++ Var(flag_objc_exceptions)
647 Enable Objective-C exception and synchronization syntax
650 ObjC ObjC++ Var(flag_objc_gc)
651 Enable garbage collection (GC) in Objective-C/Objective-C++ programs
653 ; APPLE LOCAL begin radar 5811887 - blocks
655 C ObjC C++ ObjC++ Var(flag_blocks) Init(-1)
656 Program supports c/objc extension blocks
657 ; APPLE LOCAL end radar 5811887 - blocks
659 ; Nonzero means that we generate NeXT setjmp based exceptions.
660 fobjc-sjlj-exceptions
661 ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
662 Enable Objective-C setjmp exception handling runtime
665 C ObjC C++ ObjC++ Var(flag_openmp)
670 Recognize C++ kewords like \"compl\" and \"xor\"
674 Enable optional diagnostics
681 Look for and use PCH files even when preprocessing
685 Downgrade conformance errors to warnings
689 Treat the input file as already preprocessed
691 freplace-objc-classes
693 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
697 Enable automatic template instantiation
701 Generate run time type descriptor information
705 Use the same size for double as for float
709 Use the narrowest integer type possible for enumeration types
713 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
717 When \"signed\" or \"unsigned\" is not given make the bitfield signed
721 Make \"char\" signed by default
728 Display statistics accumulated during compilation
734 C ObjC C++ ObjC++ Joined RejectNegative UInteger
735 -ftabstop=<number> Distance between tab stops for column reporting
738 C++ ObjC++ Joined RejectNegative UInteger
739 -ftemplate-depth-<number> Specify maximum template instantiation depth
746 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
750 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
754 Make \"char\" unsigned by default
758 Use __cxa_atexit to register destructors
760 fuse-cxa-get-exception-ptr
762 Use __cxa_get_exception_ptr in exception handling
764 fvisibility-inlines-hidden
766 Marks all inlined methods as having hidden visibility
768 fvisibility-ms-compat
769 C++ ObjC++ Var(flag_visibility_ms_compat)
770 Changes visibility to match Microsoft Visual Studio by default
774 Discard unused virtual functions
778 Implement vtables using thunks
782 Emit common-like symbols as weak symbols
785 C ObjC C++ ObjC++ Joined RejectNegative
786 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
790 Generate a #line directive pointing at the current working directory
794 Emit cross referencing information
798 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
802 Dump declarations to a .decl file
804 femit-struct-debug-baseonly
806 -femit-struct-debug-baseonly Aggressive reduced debug info for structs
808 femit-struct-debug-reduced
810 -femit-struct-debug-reduced Conservative reduced debug info for structs
812 femit-struct-debug-detailed=
813 C ObjC C++ ObjC++ Joined
814 -femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs
817 C ObjC C++ ObjC++ Joined Separate
818 -idirafter <dir> Add <dir> to the end of the system include path
821 C ObjC C++ ObjC++ Joined Separate
822 -imacros <file> Accept definition of macros in <file>
825 C ObjC C++ ObjC++ Joined Separate
826 -imultilib <dir> Set <dir> to be the multilib include subdirectory
829 C ObjC C++ ObjC++ Joined Separate
830 -include <file> Include the contents of <file> before other files
833 C ObjC C++ ObjC++ Joined Separate
834 -iprefix <path> Specify <path> as a prefix for next two options
837 C ObjC C++ ObjC++ Joined Separate
838 -isysroot <dir> Set <dir> to be the system root directory
841 C ObjC C++ ObjC++ Joined Separate
842 -isystem <dir> Add <dir> to the start of the system include path
845 C ObjC C++ ObjC++ Joined Separate
846 -iquote <dir> Add <dir> to the end of the quote include path
849 C ObjC C++ ObjC++ Joined Separate
850 -iwithprefix <dir> Add <dir> to the end of the system include path
853 C ObjC C++ ObjC++ Joined Separate
854 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
863 C ObjC C++ ObjC++ Undocumented
867 Do not search standard system include directories (those specified with -isystem will still be used)
871 Do not search standard system include directories for C++
874 C ObjC C++ ObjC++ Joined Separate
875 ; Documented in common.opt
879 ; Documented in common.opt
883 ; Documented in common.opt
885 print-objc-runtime-info
887 Generate C header of platform-specific features
891 Print a checksum of the executable for PCH validity checking, and stop
895 Remap file names when including files
899 Conform to the ISO 1998 C++ standard
903 Conform to the ISO 1990 C standard
907 Conform to the ISO 1999 C standard
911 Deprecated in favor of -std=c99
915 Conform to the ISO 1998 C++ standard with GNU extensions
919 Conform to the ISO 1990 C standard with GNU extensions
923 Conform to the ISO 1999 C standard with GNU extensions
927 Deprecated in favor of -std=gnu99
931 Conform to the ISO 1990 C standard
935 Conform to the ISO 1990 C standard as amended in 1994
939 Conform to the ISO 1999 C standard
943 Deprecated in favor of -std=iso9899:1999
947 Enable traditional preprocessing
951 -trigraphs Support ISO C trigraphs
955 Do not predefine system-specific and GCC-specific macros
959 Enable verbose output
963 ; Documented in common.opt
965 ; This comment is to ensure we retain the blank line above.