1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003, 2004, 2005, 2006, 2007 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 3, 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 COPYING3. If not see
18 ; <http://www.gnu.org/licenses/>.
20 ; See the GCC internals manual for a description of this file's format.
22 ; Please try to keep this file in ASCII collating order.
37 C ObjC C++ ObjC++ Joined Separate
40 C ObjC C++ ObjC++ Joined Separate
41 -A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>
45 Do not discard comments
49 Do not discard comments in macro expansions
52 C ObjC C++ ObjC++ Joined Separate
53 -D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
56 C ObjC C++ ObjC++ Undocumented
59 C ObjC C++ ObjC++ Joined Separate
60 -F <dir> Add <dir> to the end of the main framework include path
64 Print the name of header files as they are used
67 C ObjC C++ ObjC++ Joined Separate
68 -I <dir> Add <dir> to the end of the main include path
72 Generate make dependencies
75 C ObjC C++ ObjC++ Separate
76 Generate make dependencies and compile
79 C ObjC C++ ObjC++ Joined Separate
80 -MF <file> Write dependency output to the given file
84 Treat missing header files as generated files
88 Like -M but ignore system header files
91 C ObjC C++ ObjC++ Separate
92 Like -MD but ignore system header files
96 Generate phony targets for all headers
99 C ObjC C++ ObjC++ Joined Separate
100 -MQ <target> Add a MAKE-quoted target
103 C ObjC C++ ObjC++ Joined Separate
104 -MT <target> Add an unquoted target
108 Do not generate #line directives
111 C ObjC C++ ObjC++ Joined Separate
112 -U<macro> Undefine <macro>
115 C++ ObjC++ Var(warn_abi)
116 Warn about things that will change when compiling with an ABI-compliant compiler
119 C ObjC C++ ObjC++ Var(warn_address)
120 Warn about suspicious uses of memory addresses
124 Enable most warning messages
127 ObjC ObjC++ Var(warn_assign_intercept)
128 Warn whenever an Objective-C assignment is being intercepted by the garbage collector
131 C ObjC Var(warn_bad_function_cast)
132 Warn about casting functions to incompatible types
135 C ObjC Var(warn_cxx_compat)
136 Warn about C constructs that are not in the common subset of C and C++
140 C ObjC C++ ObjC++ Var(warn_cast_qual)
141 Warn about casts which discard qualifiers
144 C ObjC C++ ObjC++ Var(warn_char_subscripts)
145 Warn about subscripts whose type is \"char\"
149 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
153 Synonym for -Wcomment
156 C ObjC C++ ObjC++ Var(warn_conversion)
157 Warn about possibly confusing type conversions
160 C++ ObjC++ Var(warn_ctor_dtor_privacy)
161 Warn when all constructors and destructors are private
163 Wdeclaration-after-statement
164 C ObjC Var(warn_declaration_after_statement)
165 Warn when a declaration is found after a statement
168 C++ ObjC++ Var(warn_deprecated) Init(1)
169 Warn about deprecated compiler features
172 C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1)
173 Warn about compile-time integer division by zero
176 C++ ObjC++ Var(warn_ecpp)
177 Warn about violations of Effective C++ style rules
181 Warn about stray tokens after #elif and #endif
185 ; Documented in common.opt
187 Werror-implicit-function-declaration
188 C ObjC RejectNegative
189 Make implicit function declarations an error
192 C ObjC C++ ObjC++ Var(warn_float_equal)
193 Warn if testing floating point numbers for equality
197 Warn about printf/scanf/strftime/strfmon format string anomalies
200 C ObjC C++ ObjC++ Var(warn_format_extra_args)
201 Warn if passing too many arguments to a function for its format string
204 C ObjC C++ ObjC++ Var(warn_format_nonliteral)
205 Warn about format strings that are not literals
208 C ObjC C++ ObjC++ Var(warn_format_security)
209 Warn about possible security problems with format functions
212 C ObjC C++ ObjC++ Var(warn_format_y2k)
213 Warn about strftime formats yielding 2-digit years
216 C ObjC Var(warn_format_zero_length)
217 Warn about zero-length formats
220 C ObjC C++ ObjC++ Joined
223 C ObjC C++ ObjC++ Var(warn_init_self)
224 Warn about variables which are initialized to themselves
229 Wimplicit-function-declaration
230 C ObjC Var(mesg_implicit_function_declaration) Init(-1)
231 Warn about implicit function declarations
234 C ObjC Var(warn_implicit_int)
235 Warn when a declaration does not specify a type
239 Deprecated. This switch has no effect
242 C ObjC Var(warn_int_to_pointer_cast) Init(1)
243 Warn when there is a cast to a pointer from an integer of a different size
246 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
247 Warn about invalid uses of the \"offsetof\" macro
251 Warn about PCH files that are found but not used
254 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
255 Do not warn about using \"long long\" when -pedantic
259 Warn about suspicious declarations of \"main\"
262 C ObjC C++ ObjC++ Var(warn_missing_braces)
263 Warn about possibly missing braces around initializers
265 Wmissing-declarations
266 C ObjC Var(warn_missing_declarations)
267 Warn about global functions without previous declarations
269 Wmissing-field-initializers
270 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
271 Warn about missing fields in struct initializers
273 Wmissing-format-attribute
274 C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
275 Warn about functions which might be candidates for format attributes
277 Wmissing-include-dirs
279 Warn about user-specified include directories that do not exist
282 C ObjC Var(warn_missing_prototypes)
283 Warn about global functions without prototypes
287 Warn about use of multi-character character constants
290 C ObjC Var(warn_nested_externs)
291 Warn about \"extern\" declarations not at file scope
294 C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
295 Warn when non-templatized friend functions are declared within a template
298 C++ ObjC++ Var(warn_nonvdtor)
299 Warn about non-virtual destructors
302 C ObjC Var(warn_nonnull)
303 Warn about NULL being passed to argument slots marked as requiring non-NULL
306 C ObjC C++ ObjC++ Joined
307 -Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings
310 C++ ObjC++ Var(warn_old_style_cast)
311 Warn if a C-style cast is used in a program
313 Wold-style-definition
314 C ObjC Var(warn_old_style_definition)
315 Warn if an old-style parameter definition is used
318 C ObjC C++ ObjC++ Var(warn_overlength_strings) Init(-1)
319 Warn if a string is longer than the maximum portable length specified by the standard
322 C++ ObjC++ Var(warn_overloaded_virtual)
323 Warn about overloaded virtual function names
326 C ObjC Var(warn_override_init) Init(-1)
327 Warn about overriding initializers without side effects
330 C ObjC C++ ObjC++ Var(warn_parentheses)
331 Warn about possibly missing parentheses
334 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
335 Warn when converting the type of pointers to member functions
338 C ObjC C++ ObjC++ Var(warn_pointer_arith)
339 Warn about function pointer arithmetic
342 C ObjC Var(warn_pointer_to_int_cast) Init(1)
343 Warn when a pointer is cast to an integer of a different size
346 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1)
347 Warn about misuses of pragmas
350 ObjC ObjC++ Var(warn_protocol) Init(1)
351 Warn if inherited methods are unimplemented
354 C ObjC C++ ObjC++ Var(warn_redundant_decls)
355 Warn about multiple declarations of the same object
358 C++ ObjC++ Var(warn_reorder)
359 Warn when the compiler reorders code
362 C ObjC C++ ObjC++ Var(warn_return_type)
363 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
366 ObjC ObjC++ Var(warn_selector)
367 Warn if a selector has multiple methods
370 C ObjC C++ ObjC++ Var(warn_sequence_point)
371 Warn about possible violations of sequence point rules
374 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
375 Warn about signed-unsigned comparisons
378 C++ ObjC++ Var(warn_sign_promo)
379 Warn when overload promotes from unsigned to signed
381 Wstrict-null-sentinel
383 Warn about uncasted NULL used as sentinel
386 C ObjC Var(warn_strict_prototypes)
387 Warn about unprototyped function declarations
389 Wstrict-selector-match
390 ObjC ObjC++ Var(warn_strict_selector_match)
391 Warn if type signatures of candidate methods do not match exactly
394 C++ ObjC++ Var(warn_synth)
395 Warn when synthesis behavior differs from Cfront
399 Do not suppress warnings from system headers
402 C ObjC Var(warn_traditional)
403 Warn about features not present in traditional C
407 Warn if trigraphs are encountered that might affect the meaning of the program
410 ObjC ObjC++ Var(warn_undeclared_selector)
411 Warn about @selector()s without previously declared methods
415 Warn if an undefined macro is used in an #if directive
419 Warn about unrecognized pragmas
423 Warn about macros defined in the main file that are not used
427 Do not warn about using variadic macros when -pedantic
430 C ObjC C++ ObjC++ Var(warn_write_strings)
431 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.
434 C ObjC Var(warn_pointer_sign) Init(-1)
435 Warn when a pointer differs in signedness in an assignment
439 A synonym for -std=c89 (for C) or -std=c++98 (for C++)
442 C ObjC C++ ObjC++ Joined
443 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
447 Enforce class member access control semantics
452 falt-external-templates
454 Change when template instances are emitted
458 Recognize the \"asm\" keyword
462 Recognize built-in functions
465 C ObjC C++ ObjC++ Joined
469 Check the return value of new
473 Allow the arguments of the '?' operator to have different types
477 Reduce the size of object files
479 fconstant-string-class=
481 -fconst-string-class=<name> Use class <name> for constant strings
485 Inline member functions by default
487 fdollars-in-identifiers
489 Permit '$' as an identifier character
496 Generate code to check exception specifications
502 C ObjC C++ ObjC++ Joined RejectNegative
503 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
505 fextended-identifiers
507 Permit universal character names (\\u and \\U) in identifiers
510 C ObjC C++ ObjC++ Joined RejectNegative
511 -finput-charset=<cset> Specify the default character set for source files
519 Scope of for-init-statement variables is local to the loop
523 Do not assume that standard C libraries and \"main\" exist
527 Recognize GNU-defined keywords
531 Generate code for GNU runtime environment
534 C ObjC Var(flag_gnu89_inline) Init(-1)
535 Use traditional GNU semantics for inline functions
548 Assume normal C execution environment
552 Enable support for huge objects
556 Export functions even if they can be inlined
558 fimplicit-inline-templates
560 Emit implicit instantiations of inline templates
564 Emit implicit instantiations of templates
567 C++ ObjC++ Var(flag_friend_injection)
568 Inject friend functions into enclosing namespace
575 Don't warn about uses of Microsoft extensions
577 fname-mangling-version-
585 Generate code for NeXT (Apple Mac OS X) runtime environment
589 Assume that receivers of Objective-C messages may be nil
597 ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
598 ; to initialize any non-POD ivars in Objective-C++ classes.
599 fobjc-call-cxx-cdtors
600 ObjC++ Var(flag_objc_call_cxx_cdtors)
601 Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed
603 fobjc-direct-dispatch
604 ObjC ObjC++ Var(flag_objc_direct_dispatch)
605 Allow fast jumps to the message dispatcher
607 ; Nonzero means that we will allow new ObjC exception syntax (@throw,
608 ; @try, etc.) in source code.
610 ObjC ObjC++ Var(flag_objc_exceptions)
611 Enable Objective-C exception and synchronization syntax
614 ObjC ObjC++ Var(flag_objc_gc)
615 Enable garbage collection (GC) in Objective-C/Objective-C++ programs
617 ; Nonzero means that we generate NeXT setjmp based exceptions.
618 fobjc-sjlj-exceptions
619 ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
620 Enable Objective-C setjmp exception handling runtime
623 C ObjC C++ ObjC++ Var(flag_openmp)
628 Recognize C++ kewords like \"compl\" and \"xor\"
632 Enable optional diagnostics
639 Look for and use PCH files even when preprocessing
643 Downgrade conformance errors to warnings
647 Treat the input file as already preprocessed
649 freplace-objc-classes
651 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
655 Enable automatic template instantiation
659 Generate run time type descriptor information
663 Use the same size for double as for float
667 Use the narrowest integer type possible for enumeration types
671 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
675 When \"signed\" or \"unsigned\" is not given make the bitfield signed
679 Make \"char\" signed by default
686 Display statistics accumulated during compilation
692 C ObjC C++ ObjC++ Joined RejectNegative UInteger
693 -ftabstop=<number> Distance between tab stops for column reporting
696 C++ ObjC++ Joined RejectNegative UInteger
697 -ftemplate-depth-<number> Specify maximum template instantiation depth
704 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
708 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
712 Make \"char\" unsigned by default
716 Use __cxa_atexit to register destructors
718 fuse-cxa-get-exception-ptr
720 Use __cxa_get_exception_ptr in exception handling
722 fvisibility-inlines-hidden
724 Marks all inlined methods as having hidden visibility
728 Discard unused virtual functions
732 Implement vtables using thunks
736 Emit common-like symbols as weak symbols
739 C ObjC C++ ObjC++ Joined RejectNegative
740 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
744 Generate a #line directive pointing at the current working directory
748 Emit cross referencing information
752 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
756 Dump declarations to a .decl file
759 C ObjC C++ ObjC++ Joined Separate
760 -idirafter <dir> Add <dir> to the end of the system include path
763 C ObjC C++ ObjC++ Joined Separate
764 -imacros <file> Accept definition of macros in <file>
767 C ObjC C++ ObjC++ Joined Separate
768 -imultilib <dir> Set <dir> to be the multilib include subdirectory
771 C ObjC C++ ObjC++ Joined Separate
772 -include <file> Include the contents of <file> before other files
775 C ObjC C++ ObjC++ Joined Separate
776 -iprefix <path> Specify <path> as a prefix for next two options
779 C ObjC C++ ObjC++ Joined Separate
780 -isysroot <dir> Set <dir> to be the system root directory
783 C ObjC C++ ObjC++ Joined Separate
784 -isystem <dir> Add <dir> to the start of the system include path
787 C ObjC C++ ObjC++ Joined Separate
788 -iquote <dir> Add <dir> to the end of the quote include path
791 C ObjC C++ ObjC++ Joined Separate
792 -iwithprefix <dir> Add <dir> to the end of the system include path
795 C ObjC C++ ObjC++ Joined Separate
796 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
805 C ObjC C++ ObjC++ Undocumented
809 Do not search standard system include directories (those specified with -isystem will still be used)
813 Do not search standard system include directories for C++
816 C ObjC C++ ObjC++ Joined Separate
817 ; Documented in common.opt
821 ; Documented in common.opt
825 ; Documented in common.opt
827 print-objc-runtime-info
829 Generate C header of platform-specific features
833 Print a checksum of the executable for PCH validity checking, and stop
837 Remap file names when including files
841 Conform to the ISO 1998 C++ standard
845 Conform to the ISO 1990 C standard
849 Conform to the ISO 1999 C standard
853 Deprecated in favor of -std=c99
857 Conform to the ISO 1998 C++ standard with GNU extensions
861 Conform to the ISO 1990 C standard with GNU extensions
865 Conform to the ISO 1999 C standard with GNU extensions
869 Deprecated in favor of -std=gnu99
873 Conform to the ISO 1990 C standard
877 Conform to the ISO 1990 C standard as amended in 1994
881 Conform to the ISO 1999 C standard
885 Deprecated in favor of -std=iso9899:1999
889 Enable traditional preprocessing
893 -trigraphs Support ISO C trigraphs
897 Do not predefine system-specific and GCC-specific macros
901 Enable verbose output
905 ; Documented in common.opt
907 ; This comment is to ensure we retain the blank line above.