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, 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)
117 Warn about things that will change when compiling with an ABI-compliant compiler
121 Enable most warning messages
124 ObjC ObjC++ Var(warn_assign_intercept)
125 Warn whenever an Objective-C assignment is being intercepted by the garbage collector
128 C ObjC Var(warn_bad_function_cast)
129 Warn about casting functions to incompatible types
132 C Var(warn_cxx_compat)
133 Warn about C constructs that are not in the common subset of C and C++
137 C ObjC C++ ObjC++ Var(warn_cast_qual)
138 Warn about casts which discard qualifiers
141 C ObjC C++ ObjC++ Var(warn_char_subscripts)
142 Warn about subscripts whose type is \"char\"
146 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
150 Synonym for -Wcomment
153 C ObjC C++ ObjC++ Var(warn_conversion)
154 Warn about possibly confusing type conversions
157 C++ ObjC++ Var(warn_ctor_dtor_privacy)
158 Warn when all constructors and destructors are private
160 Wdeclaration-after-statement
161 C ObjC Var(warn_declaration_after_statement)
162 Warn when a declaration is found after a statement
165 C++ ObjC++ Var(warn_deprecated) Init(1)
166 Warn about deprecated compiler features
169 C ObjC Var(warn_div_by_zero) Init(1)
170 Warn about compile-time integer division by zero
173 C++ ObjC++ Var(warn_ecpp)
174 Warn about violations of Effective C++ style rules
178 Warn about stray tokens after #elif and #endif
182 ; Documented in common.opt
184 Werror-implicit-function-declaration
185 C ObjC RejectNegative
186 Make implicit function declarations an error
189 C ObjC C++ ObjC++ Var(warn_float_equal)
190 Warn if testing floating point numbers for equality
194 Warn about printf/scanf/strftime/strfmon format string anomalies
197 C ObjC C++ ObjC++ Var(warn_format_extra_args)
198 Warn if passing too many arguments to a function for its format string
201 C ObjC C++ ObjC++ Var(warn_format_nonliteral)
202 Warn about format strings that are not literals
205 C ObjC C++ ObjC++ Var(warn_format_security)
206 Warn about possible security problems with format functions
209 C ObjC C++ ObjC++ Var(warn_format_y2k)
210 Warn about strftime formats yielding 2-digit years
213 C ObjC Var(warn_format_zero_length)
214 Warn about zero-length formats
217 C ObjC C++ ObjC++ Joined
220 C ObjC C++ ObjC++ Var(warn_init_self)
221 Warn about variables which are initialized to themselves
226 Wimplicit-function-declaration
227 C ObjC Var(mesg_implicit_function_declaration) Init(-1)
228 Warn about implicit function declarations
231 C ObjC Var(warn_implicit_int)
232 Warn when a declaration does not specify a type
236 Deprecated. This switch has no effect
239 C ObjC Var(warn_int_to_pointer_cast) Init(1)
240 Warn when there is a cast to a pointer from an integer of a different size
243 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
244 Warn about invalid uses of the \"offsetof\" macro
248 Warn about PCH files that are found but not used
251 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
252 Do not warn about using \"long long\" when -pedantic
256 Warn about suspicious declarations of \"main\"
259 C ObjC C++ ObjC++ Var(warn_missing_braces)
260 Warn about possibly missing braces around initializers
262 Wmissing-declarations
263 C ObjC Var(warn_missing_declarations)
264 Warn about global functions without previous declarations
266 Wmissing-field-initializers
267 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
268 Warn about missing fields in struct initializers
270 Wmissing-format-attribute
271 C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
272 Warn about functions which might be candidates for format attributes
274 Wmissing-include-dirs
276 Warn about user-specified include directories that do not exist
279 C ObjC Var(warn_missing_prototypes)
280 Warn about global functions without prototypes
284 Warn about use of multi-character character constants
287 C ObjC Var(warn_nested_externs)
288 Warn about \"extern\" declarations not at file scope
291 C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
292 Warn when non-templatized friend functions are declared within a template
295 C++ ObjC++ Var(warn_nonvdtor)
296 Warn about non-virtual destructors
299 C ObjC Var(warn_nonnull)
300 Warn about NULL being passed to argument slots marked as requiring non-NULL
303 C ObjC C++ ObjC++ Joined
304 -Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings
307 C++ ObjC++ Var(warn_old_style_cast)
308 Warn if a C-style cast is used in a program
310 Wold-style-definition
311 C ObjC Var(warn_old_style_definition)
312 Warn if an old-style parameter definition is used
315 C++ ObjC++ Var(warn_overloaded_virtual)
316 Warn about overloaded virtual function names
319 C ObjC C++ ObjC++ Var(warn_parentheses)
320 Warn about possibly missing parentheses
323 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
324 Warn when converting the type of pointers to member functions
327 C ObjC C++ ObjC++ Var(warn_pointer_arith)
328 Warn about function pointer arithmetic
331 C ObjC Var(warn_pointer_to_int_cast) Init(1)
332 Warn when a pointer is cast to an integer of a different size
335 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1)
336 Warn about misuses of pragmas
339 ObjC ObjC++ Var(warn_protocol) Init(1)
340 Warn if inherited methods are unimplemented
343 C ObjC C++ ObjC++ Var(warn_redundant_decls)
344 Warn about multiple declarations of the same object
347 C++ ObjC++ Var(warn_reorder)
348 Warn when the compiler reorders code
351 C ObjC C++ ObjC++ Var(warn_return_type)
352 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
355 ObjC ObjC++ Var(warn_selector)
356 Warn if a selector has multiple methods
359 C ObjC C++ ObjC++ Var(warn_sequence_point)
360 Warn about possible violations of sequence point rules
363 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
364 Warn about signed-unsigned comparisons
367 C++ ObjC++ Var(warn_sign_promo)
368 Warn when overload promotes from unsigned to signed
370 Wstrict-null-sentinel
372 Warn about uncasted NULL used as sentinel
375 C ObjC Var(warn_strict_prototypes)
376 Warn about unprototyped function declarations
378 Wstrict-selector-match
379 ObjC ObjC++ Var(warn_strict_selector_match)
380 Warn if type signatures of candidate methods do not match exactly
383 C++ ObjC++ Var(warn_synth)
384 Warn when synthesis behavior differs from Cfront
388 Do not suppress warnings from system headers
391 C ObjC Var(warn_traditional)
392 Warn about features not present in traditional C
396 Warn if trigraphs are encountered that might affect the meaning of the program
399 ObjC ObjC++ Var(warn_undeclared_selector)
400 Warn about @selector()s without previously declared methods
404 Warn if an undefined macro is used in an #if directive
408 Warn about unrecognized pragmas
412 Warn about macros defined in the main file that are not used
416 Do not warn about using variadic macros when -pedantic
420 Give strings the type \"array of char\"
423 C ObjC Var(warn_pointer_sign) Init(1)
424 Warn when a pointer differs in signedness in an assignment
428 A synonym for -std=c89 (for C) or -std=c++98 (for C++)
431 C ObjC C++ ObjC++ Joined
432 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
436 Enforce class member access control semantics
441 falt-external-templates
443 Change when template instances are emitted
447 Recognize the \"asm\" keyword
451 Recognize built-in functions
454 C ObjC C++ ObjC++ Joined
458 Check the return value of new
462 Allow the arguments of the '?' operator to have different types
466 Reduce the size of object files
470 Make string literals \"const char[]\" not \"char[]\"
472 fconstant-string-class=
474 -fconst-string-class=<name> Use class <name> for constant strings
478 Inline member functions by default
480 fdollars-in-identifiers
482 Permit '$' as an identifier character
489 Generate code to check exception specifications
495 C ObjC C++ ObjC++ Joined RejectNegative
496 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
498 fextended-identifiers
500 Permit universal character names (\\u and \\U) in identifiers
503 C ObjC C++ ObjC++ Joined RejectNegative
504 -finput-charset=<cset> Specify the default character set for source files
518 Scope of for-init-statement variables is local to the loop
522 Do not assume that standard C libraries and \"main\" exist
526 Recognize GNU-defined keywords
530 Generate code for GNU runtime environment
543 Assume normal C execution environment
547 Enable support for huge objects
551 Export functions even if they can be inlined
553 fimplicit-inline-templates
555 Emit implicit instantiations of inline templates
559 Emit implicit instantiations of templates
562 C++ Var(flag_friend_injection)
563 Inject friend functions into enclosing namespace
570 Don't warn about uses of Microsoft extensions
572 fname-mangling-version-
580 Generate code for NeXT (Apple Mac OS X) runtime environment
584 Assume that receivers of Objective-C messages may be nil
592 ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
593 ; to initialize any non-POD ivars in Objective-C++ classes.
594 fobjc-call-cxx-cdtors
595 ObjC++ Var(flag_objc_call_cxx_cdtors)
596 Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed
598 fobjc-direct-dispatch
599 ObjC ObjC++ Var(flag_objc_direct_dispatch)
600 Allow fast jumps to the message dispatcher
602 ; Nonzero means that we will allow new ObjC exception syntax (@throw,
603 ; @try, etc.) in source code.
605 ObjC ObjC++ Var(flag_objc_exceptions)
606 Enable Objective-C exception and synchronization syntax
609 ObjC ObjC++ Var(flag_objc_gc)
610 Enable garbage collection (GC) in Objective-C/Objective-C++ programs
612 ; Nonzero means that we generate NeXT setjmp based exceptions.
613 fobjc-sjlj-exceptions
614 ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
615 Enable Objective-C setjmp exception handling runtime
619 Recognize C++ kewords like \"compl\" and \"xor\"
623 Enable optional diagnostics
630 Look for and use PCH files even when preprocessing
634 Downgrade conformance errors to warnings
638 Treat the input file as already preprocessed
640 freplace-objc-classes
642 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
646 Enable automatic template instantiation
650 Generate run time type descriptor information
654 Use the same size for double as for float
658 Use the narrowest integer type possible for enumeration types
662 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
666 When \"signed\" or \"unsigned\" is not given make the bitfield signed
670 Make \"char\" signed by default
677 Display statistics accumulated during compilation
683 C ObjC C++ ObjC++ Joined RejectNegative UInteger
684 -ftabstop=<number> Distance between tab stops for column reporting
687 C++ ObjC++ Joined RejectNegative UInteger
688 -ftemplate-depth-<number> Specify maximum template instantiation depth
695 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
699 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
703 Make \"char\" unsigned by default
707 Use __cxa_atexit to register destructors
709 fvisibility-inlines-hidden
711 Marks all inlined methods as having hidden visibility
715 Discard unused virtual functions
719 Implement vtables using thunks
723 Emit common-like symbols as weak symbols
726 C ObjC C++ ObjC++ Joined RejectNegative
727 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
731 Generate a #line directive pointing at the current working directory
735 Emit cross referencing information
739 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
743 Dump declarations to a .decl file
746 C ObjC C++ ObjC++ Joined Separate
747 -idirafter <dir> Add <dir> to the end of the system include path
750 C ObjC C++ ObjC++ Joined Separate
751 -imacros <file> Accept definition of macros in <file>
754 C ObjC C++ ObjC++ Joined Separate
755 -include <file> Include the contents of <file> before other files
758 C ObjC C++ ObjC++ Joined Separate
759 -iprefix <path> Specify <path> as a prefix for next two options
762 C ObjC C++ ObjC++ Joined Separate
763 -isysroot <dir> Set <dir> to be the system root directory
766 C ObjC C++ ObjC++ Joined Separate
767 -isystem <dir> Add <dir> to the start of the system include path
770 C ObjC C++ ObjC++ Joined Separate
771 -iquote <dir> Add <dir> to the end of the quote include path
774 C ObjC C++ ObjC++ Joined Separate
775 -iwithprefix <dir> Add <dir> to the end of the system include path
778 C ObjC C++ ObjC++ Joined Separate
779 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
788 C ObjC C++ ObjC++ Undocumented
792 Do not search standard system include directories (those specified with -isystem will still be used)
796 Do not search standard system include directories for C++
799 C ObjC C++ ObjC++ Joined Separate
800 ; Documented in common.opt
804 ; Documented in common.opt
808 ; Documented in common.opt
810 print-objc-runtime-info
812 Generate C header of platform-specific features
816 Print a checksum of the executable for PCH validity checking, and stop
820 Remap file names when including files
824 Conform to the ISO 1998 C++ standard
828 Conform to the ISO 1990 C standard
832 Conform to the ISO 1999 C standard
836 Deprecated in favor of -std=c99
840 Conform to the ISO 1998 C++ standard with GNU extensions
844 Conform to the ISO 1990 C standard with GNU extensions
848 Conform to the ISO 1999 C standard with GNU extensions
852 Deprecated in favor of -std=gnu99
856 Conform to the ISO 1990 C standard
860 Conform to the ISO 1990 C standard as amended in 1994
864 Conform to the ISO 1999 C standard
868 Deprecated in favor of -std=iso9899:1999
872 Enable traditional preprocessing
876 -trigraphs Support ISO C trigraphs
880 Do not predefine system-specific and GCC-specific macros
884 Enable verbose output
888 ; Documented in common.opt
890 ; This comment is to ensure we retain the blank line above.