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
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
120 Enable most warning messages
123 C ObjC Var(warn_bad_function_cast)
124 Warn about casting functions to incompatible types
127 C ObjC C++ ObjC++ Var(warn_cast_qual)
128 Warn about casts which discard qualifiers
131 C ObjC C++ ObjC++ Var(warn_char_subscripts)
132 Warn about subscripts whose type is \"char\"
136 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
140 Synonym for -Wcomment
143 C ObjC C++ ObjC++ Var(warn_conversion)
144 Warn about possibly confusing type conversions
147 C++ ObjC++ Var(warn_ctor_dtor_privacy)
148 Warn when all constructors and destructors are private
150 Wdeclaration-after-statement
151 C ObjC Var(warn_declaration_after_statement)
152 Warn when a declaration is found after a statement
155 C++ ObjC++ Var(warn_deprecated) Init(1)
156 Warn about deprecated compiler features
159 C ObjC Var(warn_div_by_zero) Init(1)
160 Warn about compile-time integer division by zero
163 C++ ObjC++ Var(warn_ecpp)
164 Warn about violations of Effective C++ style rules
168 Warn about stray tokens after #elif and #endif
172 ; Documented in common.opt
174 Werror-implicit-function-declaration
175 C ObjC RejectNegative
176 Make implicit function declarations an error
179 C ObjC C++ ObjC++ Var(warn_float_equal)
180 Warn if testing floating point numbers for equality
184 Warn about printf/scanf/strftime/strfmon format string anomalies
187 C ObjC C++ ObjC++ Var(warn_format_extra_args)
188 Warn if passing too many arguments to a function for its format string
191 C ObjC C++ ObjC++ Var(warn_format_nonliteral)
192 Warn about format strings that are not literals
195 C ObjC C++ ObjC++ Var(warn_format_security)
196 Warn about possible security problems with format functions
199 C ObjC C++ ObjC++ Var(warn_format_y2k)
200 Warn about strftime formats yielding 2-digit years
203 C ObjC Var(warn_format_zero_length)
204 Warn about zero-length formats
207 C ObjC C++ ObjC++ Joined
210 C ObjC C++ ObjC++ Var(warn_init_self)
211 Warn about variables which are initialized to themselves.
216 Wimplicit-function-declaration
217 C ObjC Var(mesg_implicit_function_declaration) Init(-1)
218 Warn about implicit function declarations
221 C ObjC Var(warn_implicit_int)
222 Warn when a declaration does not specify a type
226 Deprecated. This switch has no effect.
229 C++ ObjC++ Var(warn_invalid_offsetof) Init(1)
230 Warn about invalid uses of the \"offsetof\" macro
234 Warn about PCH files that are found but not used
237 C ObjC C++ ObjC++ Var(warn_long_long) Init(1)
238 Do not warn about using \"long long\" when -pedantic
242 Warn about suspicious declarations of \"main\"
245 C ObjC C++ ObjC++ Var(warn_missing_braces)
246 Warn about possibly missing braces around initializers
248 Wmissing-declarations
249 C ObjC Var(warn_missing_declarations)
250 Warn about global functions without previous declarations
252 Wmissing-field-initializers
253 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1)
254 Warn about missing fields in struct initializers
256 Wmissing-format-attribute
257 C ObjC C++ ObjC++ Var(warn_missing_format_attribute)
258 Warn about functions which might be candidates for format attributes
260 Wmissing-include-dirs
262 Warn about user-specified include directories that do not exist
265 C ObjC Var(warn_missing_prototypes)
266 Warn about global functions without prototypes
270 Warn about use of multi-character character constants
273 C ObjC Var(warn_nested_externs)
274 Warn about \"extern\" declarations not at file scope
277 C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
278 Warn when non-templatized friend functions are declared within a template
281 C++ ObjC++ Var(warn_nonvdtor)
282 Warn about non-virtual destructors
285 C ObjC Var(warn_nonnull)
286 Warn about NULL being passed to argument slots marked as requiring non-NULL
289 C ObjC C++ ObjC++ Joined
290 -Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings
293 C++ ObjC++ Var(warn_old_style_cast)
294 Warn if a C-style cast is used in a program
296 Wold-style-definition
297 C ObjC Var(warn_old_style_definition)
298 Warn if an old-style parameter definition is used
301 C++ ObjC++ Var(warn_overloaded_virtual)
302 Warn about overloaded virtual function names
305 C ObjC C++ ObjC++ Var(warn_parentheses)
306 Warn about possibly missing parentheses
309 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
310 Warn when converting the type of pointers to member functions
313 C ObjC C++ ObjC++ Var(warn_pointer_arith)
314 Warn about function pointer arithmetic
317 ObjC ObjC++ Var(warn_protocol) Init(1)
318 Warn if inherited methods are unimplemented
321 C ObjC C++ ObjC++ Var(warn_redundant_decls)
322 Warn about multiple declarations of the same object
325 C++ ObjC++ Var(warn_reorder)
326 Warn when the compiler reorders code
330 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
333 ObjC ObjC++ Var(warn_selector)
334 Warn if a selector has multiple methods
337 C ObjC C++ ObjC++ Var(warn_sequence_point)
338 Warn about possible violations of sequence point rules
341 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
342 Warn about signed-unsigned comparisons
345 C++ ObjC++ Var(warn_sign_promo)
346 Warn when overload promotes from unsigned to signed
349 C ObjC Var(warn_strict_prototypes)
350 Warn about unprototyped function declarations
353 C++ ObjC++ Var(warn_synth)
354 Warn when synthesis behavior differs from Cfront
358 Do not suppress warnings from system headers
361 C ObjC Var(warn_traditional)
362 Warn about features not present in traditional C
366 Warn if trigraphs are encountered that might affect the meaning of the program
369 ObjC ObjC++ Var(warn_undeclared_selector)
370 Warn about @selector()s without previously declared methods
374 Warn if an undefined macro is used in an #if directive
378 Warn about unrecognized pragmas
382 Warn about macros defined in the main file that are not used
386 Do not warn about using variadic macros when -pedantic
390 Give strings the type \"array of char\"
393 C ObjC Var(warn_pointer_sign) Init(1)
394 Warn when a pointer differs in signedness in an assignment.
398 A synonym for -std=c89. In a future version of GCC it will become synonymous with -std=c99 instead
401 C ObjC C++ ObjC++ Joined
402 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
406 Enforce class member access control semantics
411 falt-external-templates
413 Change when template instances are emitted
417 Recognize the \"asm\" keyword
421 Recognize built-in functions
424 C ObjC C++ ObjC++ Joined
428 Check the return value of new
432 Allow the arguments of the '?' operator to have different types
436 Reduce the size of object files
440 Make string literals \"const char[]\" not \"char[]\"
442 fconstant-string-class=
444 -fconst-string-class=<name> Use class <name> for constant strings
448 Inline member functions by default
450 fdollars-in-identifiers
452 Permit '$' as an identifier character
459 Generate code to check exception specifications
465 C ObjC C++ ObjC++ Joined RejectNegative
466 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
469 C ObjC C++ ObjC++ Joined RejectNegative
470 -finput-charset=<cset> Specify the default character set for source files.
484 Scope of for-init-statement variables is local to the loop
488 Do not assume that standard C libraries and \"main\" exist
492 Recognize GNU-defined keywords
496 Generate code for GNU runtime environment
509 Assume normal C execution environment
513 Enable support for huge objects
517 Export functions even if they can be inlined
519 fimplicit-inline-templates
521 Emit implicit instantiations of inline templates
525 Emit implicit instantiations of templates
532 Don't warn about uses of Microsoft extensions
534 fname-mangling-version-
542 Generate code for NeXT (Apple Mac OS X) runtime environment
546 Assume that receivers of Objective-C messages may be nil
556 Enable Objective-C exception and synchronization syntax
558 fobjc-sjlj-exceptions
560 Enable Objective-C setjmp exception handling runtime
564 Recognize C++ kewords like \"compl\" and \"xor\"
568 Enable optional diagnostics
575 Look for and use PCH files even when preprocessing
579 Downgrade conformance errors to warnings
583 Treat the input file as already preprocessed
585 freplace-objc-classes
587 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
591 Enable automatic template instantiation
595 Generate run time type descriptor information
599 Use the same size for double as for float
603 Use the narrowest integer type possible for enumeration types
607 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
614 When \"signed\" or \"unsigned\" is not given make the bitfield signed
618 Make \"char\" signed by default
625 Display statistics accumulated during compilation
631 C ObjC C++ ObjC++ Joined RejectNegative UInteger
632 -ftabstop=<number> Distance between tab stops for column reporting
635 C++ ObjC++ Joined RejectNegative UInteger
636 -ftemplate-depth-<number> Specify maximum template instantiation depth
643 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
647 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
651 Make \"char\" unsigned by default
655 Use __cxa_atexit to register destructors
657 fvisibility-inlines-hidden
659 Marks all inlined methods as having hidden visibility
663 Discard unused virtual functions
667 Implement vtables using thunks
671 Emit common-like symbols as weak symbols
674 C ObjC C++ ObjC++ Joined RejectNegative
675 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
679 Generate a #line directive pointing at the current working directory
683 Emit cross referencing information
687 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
691 Dump declarations to a .decl file
694 C ObjC C++ ObjC++ Joined Separate
695 -idirafter <dir> Add <dir> to the end of the system include path
698 C ObjC C++ ObjC++ Joined Separate
699 -imacros <file> Accept definition of macros in <file>
702 C ObjC C++ ObjC++ Joined Separate
703 -include <file> Include the contents of <file> before other files
706 C ObjC C++ ObjC++ Joined Separate
707 -iprefix <path> Specify <path> as a prefix for next two options
710 C ObjC C++ ObjC++ Joined Separate
711 -isysroot <dir> Set <dir> to be the system root directory
714 C ObjC C++ ObjC++ Joined Separate
715 -isystem <dir> Add <dir> to the start of the system include path
718 C ObjC C++ ObjC++ Joined Separate
719 -iquote <dir> Add <dir> to the end of the quote include path
722 C ObjC C++ ObjC++ Joined Separate
723 -iwithprefix <dir> Add <dir> to the end of the system include path
726 C ObjC C++ ObjC++ Joined Separate
727 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
733 C ObjC C++ ObjC++ Undocumented
737 Do not search standard system include directories (those specified with -isystem will still be used)
741 Do not search standard system include directories for C++
744 C ObjC C++ ObjC++ Joined Separate
745 ; Documented in common.opt
749 ; Documented in common.opt
753 ; Documented in common.opt
755 print-objc-runtime-info
757 Generate C header of platform-specific features
761 Remap file names when including files
765 Conform to the ISO 1998 C++ standard
769 Conform to the ISO 1990 C standard
773 Conform to the ISO 1999 C standard
777 Deprecated in favor of -std=c99
781 Conform to the ISO 1998 C++ standard with GNU extensions
785 Conform to the ISO 1990 C standard with GNU extensions
789 Conform to the ISO 1999 C standard with GNU extensions
793 Deprecated in favor of -std=gnu99
797 Deprecated in favor of -std=c89
801 Conform to the ISO 1990 C standard as amended in 1994
805 Deprecated in favor of -std=c99
809 Deprecated in favor of -std=c99
813 Enable traditional preprocessing
817 -trigraphs Support ISO C trigraphs
821 Do not predefine system-specific and GCC-specific macros
825 Enable verbose output
829 ; Documented in common.opt
831 ; This comment is to ensure we retain the blank line above.