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++ Var(warn_old_style_cast)
290 Warn if a C-style cast is used in a program
292 Wold-style-definition
293 C ObjC Var(warn_old_style_definition)
294 Warn if an old-style parameter definition is used
297 C++ ObjC++ Var(warn_overloaded_virtual)
298 Warn about overloaded virtual function names
301 C ObjC C++ ObjC++ Var(warn_parentheses)
302 Warn about possibly missing parentheses
305 C++ ObjC++ Var(warn_pmf2ptr) Init(1)
306 Warn when converting the type of pointers to member functions
309 C ObjC C++ ObjC++ Var(warn_pointer_arith)
310 Warn about function pointer arithmetic
313 ObjC ObjC++ Var(warn_protocol) Init(1)
314 Warn if inherited methods are unimplemented
317 C ObjC C++ ObjC++ Var(warn_redundant_decls)
318 Warn about multiple declarations of the same object
321 C++ ObjC++ Var(warn_reorder)
322 Warn when the compiler reorders code
326 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
329 ObjC ObjC++ Var(warn_selector)
330 Warn if a selector has multiple methods
333 C ObjC C++ ObjC++ Var(warn_sequence_point)
334 Warn about possible violations of sequence point rules
337 C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1)
338 Warn about signed-unsigned comparisons
341 C++ ObjC++ Var(warn_sign_promo)
342 Warn when overload promotes from unsigned to signed
345 C ObjC Var(warn_strict_prototypes)
346 Warn about unprototyped function declarations
349 C++ ObjC++ Var(warn_synth)
350 Warn when synthesis behavior differs from Cfront
354 Do not suppress warnings from system headers
357 C ObjC Var(warn_traditional)
358 Warn about features not present in traditional C
362 Warn if trigraphs are encountered that might affect the meaning of the program
365 ObjC ObjC++ Var(warn_undeclared_selector)
366 Warn about @selector()s without previously declared methods
370 Warn if an undefined macro is used in an #if directive
374 Warn about unrecognized pragmas
378 Warn about macros defined in the main file that are not used
382 Do not warn about using variadic macros when -pedantic
386 Give strings the type \"array of char\"
389 C ObjC Var(warn_pointer_sign) Init(1)
390 Warn when a pointer differs in signedness in an assignment.
394 A synonym for -std=c89. In a future version of GCC it will become synonymous with -std=c99 instead
397 C ObjC C++ ObjC++ Joined
398 ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
402 Enforce class member access control semantics
407 falt-external-templates
409 Change when template instances are emitted
413 Recognize the \"asm\" keyword
417 Recognize built-in functions
420 C ObjC C++ ObjC++ Joined
424 Check the return value of new
428 Allow the arguments of the '?' operator to have different types
432 Reduce the size of object files
436 Make string literals \"const char[]\" not \"char[]\"
438 fconstant-string-class=
440 -fconst-string-class=<name> Use class <name> for constant strings
444 Inline member functions by default
446 fdollars-in-identifiers
448 Permit '$' as an identifier character
455 Generate code to check exception specifications
461 C ObjC C++ ObjC++ Joined RejectNegative
462 -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
465 C ObjC C++ ObjC++ Joined RejectNegative
466 -finput-charset=<cset> Specify the default character set for source files.
480 Scope of for-init-statement variables is local to the loop
484 Do not assume that standard C libraries and \"main\" exist
488 Recognize GNU-defined keywords
492 Generate code for GNU runtime environment
505 Assume normal C execution environment
509 Enable support for huge objects
513 Export functions even if they can be inlined
515 fimplicit-inline-templates
517 Emit implicit instantiations of inline templates
521 Emit implicit instantiations of templates
528 Don't warn about uses of Microsoft extensions
530 fname-mangling-version-
538 Generate code for NeXT (Apple Mac OS X) runtime environment
542 Assume that receivers of Objective-C messages may be nil
552 Enable Objective-C exception and synchronization syntax
554 fobjc-sjlj-exceptions
556 Enable Objective-C setjmp exception handling runtime
560 Recognize C++ kewords like \"compl\" and \"xor\"
564 Enable optional diagnostics
571 Look for and use PCH files even when preprocessing
575 Downgrade conformance errors to warnings
579 Treat the input file as already preprocessed
581 freplace-objc-classes
583 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
587 Enable automatic template instantiation
591 Generate run time type descriptor information
595 Use the same size for double as for float
599 Use the narrowest integer type possible for enumeration types
603 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
610 When \"signed\" or \"unsigned\" is not given make the bitfield signed
614 Make \"char\" signed by default
621 Display statistics accumulated during compilation
627 C ObjC C++ ObjC++ Joined RejectNegative UInteger
628 -ftabstop=<number> Distance between tab stops for column reporting
631 C++ ObjC++ Joined RejectNegative UInteger
632 -ftemplate-depth-<number> Specify maximum template instantiation depth
639 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
643 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
647 Make \"char\" unsigned by default
651 Use __cxa_atexit to register destructors
653 fvisibility-inlines-hidden
655 Marks all inlined methods as having hidden visibility
659 Discard unused virtual functions
663 Implement vtables using thunks
667 Emit common-like symbols as weak symbols
670 C ObjC C++ ObjC++ Joined RejectNegative
671 -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
675 Generate a #line directive pointing at the current working directory
679 Emit cross referencing information
683 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
687 Dump declarations to a .decl file
690 C ObjC C++ ObjC++ Joined Separate
691 -idirafter <dir> Add <dir> to the end of the system include path
694 C ObjC C++ ObjC++ Joined Separate
695 -imacros <file> Accept definition of macros in <file>
698 C ObjC C++ ObjC++ Joined Separate
699 -include <file> Include the contents of <file> before other files
702 C ObjC C++ ObjC++ Joined Separate
703 -iprefix <path> Specify <path> as a prefix for next two options
706 C ObjC C++ ObjC++ Joined Separate
707 -isysroot <dir> Set <dir> to be the system root directory
710 C ObjC C++ ObjC++ Joined Separate
711 -isystem <dir> Add <dir> to the start of the system include path
714 C ObjC C++ ObjC++ Joined Separate
715 -iquote <dir> Add <dir> to the end of the quote include path
718 C ObjC C++ ObjC++ Joined Separate
719 -iwithprefix <dir> Add <dir> to the end of the system include path
722 C ObjC C++ ObjC++ Joined Separate
723 -iwithprefixbefore <dir> Add <dir> to the end of the main include path
729 C ObjC C++ ObjC++ Undocumented
733 Do not search standard system include directories (those specified with -isystem will still be used)
737 Do not search standard system include directories for C++
740 C ObjC C++ ObjC++ Joined Separate
741 ; Documented in common.opt
745 ; Documented in common.opt
749 ; Documented in common.opt
751 print-objc-runtime-info
753 Generate C header of platform-specific features
757 Remap file names when including files
761 Conform to the ISO 1998 C++ standard
765 Conform to the ISO 1990 C standard
769 Conform to the ISO 1999 C standard
773 Deprecated in favor of -std=c99
777 Conform to the ISO 1998 C++ standard with GNU extensions
781 Conform to the ISO 1990 C standard with GNU extensions
785 Conform to the ISO 1999 C standard with GNU extensions
789 Deprecated in favor of -std=gnu99
793 Deprecated in favor of -std=c89
797 Conform to the ISO 1990 C standard as amended in 1994
801 Deprecated in favor of -std=c99
805 Deprecated in favor of -std=c99
809 Enable traditional preprocessing
813 -trigraphs Support ISO C trigraphs
817 Do not predefine system-specific and GCC-specific macros
821 Enable verbose output
825 ; Documented in common.opt
827 ; This comment is to ensure we retain the blank line above.