]> gcc.gnu.org Git - gcc.git/blame - gcc/c.opt
2009-04-19 Paolo Carlini <paolo.carlini@oracle.com>
[gcc.git] / gcc / c.opt
CommitLineData
fef3106c 1; Options for the C, ObjC, C++ and ObjC++ front ends.
66647d44
JJ
2; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
3; Free Software Foundation, Inc.
fef3106c
NB
4;
5; This file is part of GCC.
6;
7; GCC is free software; you can redistribute it and/or modify it under
8; the terms of the GNU General Public License as published by the Free
9dcd6f09 9; Software Foundation; either version 3, or (at your option) any later
fef3106c 10; version.
c22cacf3 11;
fef3106c
NB
12; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15; for more details.
c22cacf3 16;
fef3106c 17; You should have received a copy of the GNU General Public License
9dcd6f09
NC
18; along with GCC; see the file COPYING3. If not see
19; <http://www.gnu.org/licenses/>.
fef3106c 20
8abb6b22 21; See the GCC internals manual for a description of this file's format.
fef3106c 22
fef3106c
NB
23; Please try to keep this file in ASCII collating order.
24
be43ab4e
NB
25Language
26C
27
28Language
29ObjC
30
31Language
32C++
33
34Language
35ObjC++
36
fef3106c
NB
37-output-pch=
38C ObjC C++ ObjC++ Joined Separate
39
40A
41C ObjC C++ ObjC++ Joined Separate
72de27ea 42-A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>
fef3106c
NB
43
44C
45C ObjC C++ ObjC++
72de27ea 46Do not discard comments
fef3106c
NB
47
48CC
49C ObjC C++ ObjC++
72de27ea 50Do not discard comments in macro expansions
fef3106c
NB
51
52D
53C ObjC C++ ObjC++ Joined Separate
72de27ea 54-D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
fef3106c
NB
55
56E
f2ac9964 57C ObjC C++ ObjC++ Undocumented
fef3106c 58
94d1613b
MS
59F
60C ObjC C++ ObjC++ Joined Separate
4e994432 61-F <dir> Add <dir> to the end of the main framework include path
94d1613b 62
fef3106c
NB
63H
64C ObjC C++ ObjC++
72de27ea 65Print the name of header files as they are used
fef3106c
NB
66
67I
68C ObjC C++ ObjC++ Joined Separate
4bed3787 69-I <dir> Add <dir> to the end of the main include path
fef3106c
NB
70
71M
72C ObjC C++ ObjC++
72de27ea 73Generate make dependencies
fef3106c
NB
74
75MD
76C ObjC C++ ObjC++ Separate
72de27ea 77Generate make dependencies and compile
fef3106c
NB
78
79MF
80C ObjC C++ ObjC++ Joined Separate
72de27ea 81-MF <file> Write dependency output to the given file
fef3106c
NB
82
83MG
84C ObjC C++ ObjC++
72de27ea 85Treat missing header files as generated files
fef3106c
NB
86
87MM
88C ObjC C++ ObjC++
72de27ea 89Like -M but ignore system header files
fef3106c
NB
90
91MMD
92C ObjC C++ ObjC++ Separate
72de27ea 93Like -MD but ignore system header files
fef3106c
NB
94
95MP
96C ObjC C++ ObjC++
72de27ea 97Generate phony targets for all headers
fef3106c
NB
98
99MQ
100C ObjC C++ ObjC++ Joined Separate
72de27ea 101-MQ <target> Add a MAKE-quoted target
fef3106c
NB
102
103MT
104C ObjC C++ ObjC++ Joined Separate
72de27ea 105-MT <target> Add an unquoted target
fef3106c
NB
106
107P
108C ObjC C++ ObjC++
72de27ea 109Do not generate #line directives
fef3106c
NB
110
111U
112C ObjC C++ ObjC++ Joined Separate
72de27ea 113-U<macro> Undefine <macro>
fef3106c
NB
114
115Wabi
bce08d50 116C ObjC C++ ObjC++ Var(warn_abi) Warning
7619c085 117Warn about things that will change when compiling with an ABI-compliant compiler
fef3106c 118
bce08d50
L
119Wpsabi
120C ObjC C++ ObjC++ Var(warn_psabi) Init(1) Undocumented
121
c116cd05
MLI
122Waddress
123C ObjC C++ ObjC++ Var(warn_address) Warning
124Warn about suspicious uses of memory addresses
125
fef3106c 126Wall
c662432e 127C ObjC C++ ObjC++ Warning
5a170a05 128Enable most warning messages
fef3106c 129
6e955430 130Wassign-intercept
c662432e 131ObjC ObjC++ Var(warn_assign_intercept) Warning
6e955430
ZL
132Warn whenever an Objective-C assignment is being intercepted by the garbage collector
133
fef3106c 134Wbad-function-cast
c662432e 135C ObjC Var(warn_bad_function_cast) Warning
5a170a05 136Warn about casting functions to incompatible types
fef3106c 137
c047ce93
SB
138Wbuiltin-macro-redefined
139C ObjC C++ ObjC++ Warning
140Warn when a built-in preprocessor macro is undefined or redefined
141
b7e20b53 142Wc++-compat
2cbac420 143C ObjC Var(warn_cxx_compat) Warning
b7e20b53
GDR
144Warn about C constructs that are not in the common subset of C and C++
145
e1f1ee86 146Wc++0x-compat
21af5cdf 147C++ ObjC++ Var(warn_cxx0x_compat) Warning
e1f1ee86 148Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x
b7e20b53 149
fef3106c 150Wcast-qual
c662432e 151C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
5a170a05 152Warn about casts which discard qualifiers
fef3106c
NB
153
154Wchar-subscripts
c662432e 155C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning
5a170a05 156Warn about subscripts whose type is \"char\"
fef3106c 157
2b001724 158Wclobbered
c662432e 159C ObjC C++ ObjC++ Var(warn_clobbered) Init(-1) Warning
2b001724
MLI
160Warn about variables that might be changed by \"longjmp\" or \"vfork\"
161
fef3106c 162Wcomment
c662432e 163C ObjC C++ ObjC++ Warning
72de27ea 164Warn about possibly nested block comments, and C++ comments spanning more than one physical line
fef3106c
NB
165
166Wcomments
c662432e 167C ObjC C++ ObjC++ Warning
72de27ea 168Synonym for -Wcomment
fef3106c
NB
169
170Wconversion
c662432e 171C ObjC C++ ObjC++ Var(warn_conversion) Warning
05170031 172Warn for implicit type conversions that may change a value
fef3106c 173
7060db96
MLI
174Wsign-conversion
175C ObjC C++ ObjC++ Var(warn_sign_conversion) Init(-1)
176Warn for implicit type conversions between signed and unsigned integers
177
fef3106c 178Wctor-dtor-privacy
c662432e 179C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning
bae92bf3 180Warn when all constructors and destructors are private
fef3106c 181
85617eba 182Wdeclaration-after-statement
c662432e 183C ObjC Var(warn_declaration_after_statement) Warning
85617eba
HPN
184Warn when a declaration is found after a statement
185
fef3106c 186Wdeprecated
899015a0 187C C++ ObjC ObjC++ Var(warn_deprecated) Init(1) Warning
9a0f3e86 188Warn if a deprecated compiler feature, class, method, or field is used
fef3106c
NB
189
190Wdiv-by-zero
2cbac420 191C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
5a170a05 192Warn about compile-time integer division by zero
fef3106c
NB
193
194Weffc++
c662432e 195C++ ObjC++ Var(warn_ecpp) Warning
bae92bf3 196Warn about violations of Effective C++ style rules
fef3106c 197
b3b433c5 198Wempty-body
c662432e 199C ObjC C++ ObjC++ Var(warn_empty_body) Init(-1) Warning
b3b433c5
MLI
200Warn about an empty body in an if or else statement
201
fef3106c 202Wendif-labels
c662432e 203C ObjC C++ ObjC++ Warning
72de27ea 204Warn about stray tokens after #elif and #endif
fef3106c 205
a3299096 206Wenum-compare
6866c6e8 207C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning
a3299096
MM
208Warn about comparison of different enum types
209
fef3106c
NB
210Werror
211C ObjC C++ ObjC++
72de27ea 212; Documented in common.opt
fef3106c
NB
213
214Werror-implicit-function-declaration
c662432e 215C ObjC RejectNegative Warning
dc90f45b 216This switch is deprecated; use -Werror=implicit-function-declaration instead
fef3106c
NB
217
218Wfloat-equal
c662432e 219C ObjC C++ ObjC++ Var(warn_float_equal) Warning
5a170a05 220Warn if testing floating point numbers for equality
fef3106c
NB
221
222Wformat
c662432e 223C ObjC C++ ObjC++ Warning
5a170a05 224Warn about printf/scanf/strftime/strfmon format string anomalies
fef3106c
NB
225
226Wformat-extra-args
c662432e 227C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning
5a170a05 228Warn if passing too many arguments to a function for its format string
fef3106c
NB
229
230Wformat-nonliteral
c662432e 231C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning
5a170a05 232Warn about format strings that are not literals
fef3106c 233
ca178f85 234Wformat-contains-nul
6d16b6e7 235C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning
ca178f85
BK
236Warn about format strings that contain NUL bytes
237
fef3106c 238Wformat-security
c662432e 239C ObjC C++ ObjC++ Var(warn_format_security) Warning
5a170a05 240Warn about possible security problems with format functions
fef3106c
NB
241
242Wformat-y2k
c662432e 243C ObjC C++ ObjC++ Var(warn_format_y2k) Warning
5a170a05 244Warn about strftime formats yielding 2-digit years
fef3106c
NB
245
246Wformat-zero-length
c662432e 247C ObjC Var(warn_format_zero_length) Warning
7619c085 248Warn about zero-length formats
fef3106c
NB
249
250Wformat=
c662432e 251C ObjC C++ ObjC++ Joined Warning
fef3106c 252
5db2e9ca
DK
253Wignored-qualifiers
254C C++ Var(warn_ignored_qualifiers) Init(-1) Warning
255Warn whenever type qualifiers are ignored.
256
3390f9c9 257Winit-self
c662432e 258C ObjC C++ ObjC++ Var(warn_init_self) Warning
ab532386 259Warn about variables which are initialized to themselves
3390f9c9 260
fef3106c 261Wimplicit
c662432e 262C ObjC C++ ObjC++ Warning
fef3106c
NB
263
264Wimplicit-function-declaration
dc90f45b 265C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning
5a170a05 266Warn about implicit function declarations
fef3106c
NB
267
268Wimplicit-int
c662432e 269C ObjC Var(warn_implicit_int) Warning
5a170a05 270Warn when a declaration does not specify a type
fef3106c
NB
271
272Wimport
c24d4112 273C ObjC C++ ObjC++ Undocumented
fef3106c 274
53a2494e 275Wint-to-pointer-cast
c662432e 276C ObjC Var(warn_int_to_pointer_cast) Init(1) Warning
53a2494e
JM
277Warn when there is a cast to a pointer from an integer of a different size
278
fef3106c 279Winvalid-offsetof
c662432e 280C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning
bae92bf3 281Warn about invalid uses of the \"offsetof\" macro
fef3106c
NB
282
283Winvalid-pch
c662432e 284C ObjC C++ ObjC++ Warning
5a170a05 285Warn about PCH files that are found but not used
fef3106c
NB
286
287Wlong-long
c662432e 288C ObjC C++ ObjC++ Var(warn_long_long) Init(1) Warning
5a170a05 289Do not warn about using \"long long\" when -pedantic
fef3106c
NB
290
291Wmain
4003301d 292C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning
5a170a05 293Warn about suspicious declarations of \"main\"
fef3106c
NB
294
295Wmissing-braces
c662432e 296C ObjC C++ ObjC++ Var(warn_missing_braces) Warning
5a170a05 297Warn about possibly missing braces around initializers
fef3106c
NB
298
299Wmissing-declarations
c662432e 300C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
5a170a05 301Warn about global functions without previous declarations
fef3106c 302
eaac4679 303Wmissing-field-initializers
c662432e 304C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1) Warning
eaac4679
RS
305Warn about missing fields in struct initializers
306
fef3106c 307Wmissing-format-attribute
c662432e 308C ObjC C++ ObjC++ Var(warn_missing_format_attribute) Warning
5a170a05 309Warn about functions which might be candidates for format attributes
fef3106c 310
b02398bd 311Wmissing-include-dirs
c662432e 312C ObjC C++ ObjC++ Warning
b02398bd
BE
313Warn about user-specified include directories that do not exist
314
cb4af25a 315Wmissing-parameter-type
c662432e 316C ObjC Var(warn_missing_parameter_type) Init(-1) Warning
cb4af25a
MLI
317Warn about function parameters declared without a type specifier in K&R-style functions
318
fef3106c 319Wmissing-prototypes
c662432e 320C ObjC Var(warn_missing_prototypes) Warning
5a170a05 321Warn about global functions without prototypes
fef3106c
NB
322
323Wmultichar
c662432e 324C ObjC C++ ObjC++ Warning
5a170a05 325Warn about use of multi-character character constants
fef3106c
NB
326
327Wnested-externs
c662432e 328C ObjC Var(warn_nested_externs) Warning
5a170a05 329Warn about \"extern\" declarations not at file scope
fef3106c
NB
330
331Wnon-template-friend
c662432e 332C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
bae92bf3 333Warn when non-templatized friend functions are declared within a template
fef3106c
NB
334
335Wnon-virtual-dtor
c662432e 336C++ ObjC++ Var(warn_nonvdtor) Warning
bae92bf3 337Warn about non-virtual destructors
fef3106c
NB
338
339Wnonnull
c662432e 340C ObjC Var(warn_nonnull) Warning
7619c085 341Warn about NULL being passed to argument slots marked as requiring non-NULL
fef3106c 342
50668cf6 343Wnormalized=
c662432e 344C ObjC C++ ObjC++ Joined Warning
50668cf6
GK
345-Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings
346
fef3106c 347Wold-style-cast
c662432e 348C++ ObjC++ Var(warn_old_style_cast) Warning
bae92bf3 349Warn if a C-style cast is used in a program
fef3106c 350
b1ed4cb4 351Wold-style-declaration
c662432e 352C ObjC Var(warn_old_style_declaration) Init(-1) Warning
b1ed4cb4
MLI
353Warn for obsolescent usage in a declaration
354
c034f121 355Wold-style-definition
c662432e 356C ObjC Var(warn_old_style_definition) Warning
c034f121
AJ
357Warn if an old-style parameter definition is used
358
89a42ac8 359Woverlength-strings
c662432e 360C ObjC C++ ObjC++ Var(warn_overlength_strings) Init(-1) Warning
89a42ac8
ZW
361Warn if a string is longer than the maximum portable length specified by the standard
362
fef3106c 363Woverloaded-virtual
c662432e 364C++ ObjC++ Var(warn_overloaded_virtual) Warning
bae92bf3 365Warn about overloaded virtual function names
fef3106c 366
7ed322d7 367Woverride-init
c662432e 368C ObjC Var(warn_override_init) Init(-1) Warning
7ed322d7
JM
369Warn about overriding initializers without side effects
370
2cd36c22 371Wpacked-bitfield-compat
bee6fa6d 372C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
2cd36c22
AN
373Warn about packed bit-fields whose offset changed in GCC 4.4
374
fef3106c 375Wparentheses
c662432e 376C ObjC C++ ObjC++ Var(warn_parentheses) Warning
5a170a05 377Warn about possibly missing parentheses
fef3106c
NB
378
379Wpmf-conversions
c662432e 380C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
bae92bf3 381Warn when converting the type of pointers to member functions
fef3106c
NB
382
383Wpointer-arith
c662432e 384C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning
5a170a05 385Warn about function pointer arithmetic
fef3106c 386
53a2494e 387Wpointer-to-int-cast
c662432e 388C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
53a2494e
JM
389Warn when a pointer is cast to an integer of a different size
390
b9b8dde3 391Wpragmas
c662432e 392C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
b9b8dde3
DD
393Warn about misuses of pragmas
394
fef3106c 395Wprotocol
c662432e 396ObjC ObjC++ Var(warn_protocol) Init(1) Warning
f2ac9964 397Warn if inherited methods are unimplemented
fef3106c
NB
398
399Wredundant-decls
c662432e 400C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
5a170a05 401Warn about multiple declarations of the same object
fef3106c
NB
402
403Wreorder
c662432e 404C++ ObjC++ Var(warn_reorder) Warning
bae92bf3 405Warn when the compiler reorders code
fef3106c
NB
406
407Wreturn-type
c662432e 408C ObjC C++ ObjC++ Var(warn_return_type) Warning
bae92bf3 409Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
fef3106c
NB
410
411Wselector
c662432e 412ObjC ObjC++ Var(warn_selector) Warning
f2ac9964 413Warn if a selector has multiple methods
fef3106c
NB
414
415Wsequence-point
c662432e 416C ObjC C++ ObjC++ Var(warn_sequence_point) Warning
5a170a05 417Warn about possible violations of sequence point rules
fef3106c
NB
418
419Wsign-compare
c662432e 420C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1) Warning
5a170a05 421Warn about signed-unsigned comparisons
fef3106c
NB
422
423Wsign-promo
c662432e 424C++ ObjC++ Var(warn_sign_promo) Warning
bae92bf3 425Warn when overload promotes from unsigned to signed
fef3106c 426
b2f97e4a 427Wstrict-null-sentinel
c662432e 428C++ ObjC++ Warning
b2f97e4a
MM
429Warn about uncasted NULL used as sentinel
430
fef3106c 431Wstrict-prototypes
c662432e 432C ObjC Var(warn_strict_prototypes) Warning
5a170a05 433Warn about unprototyped function declarations
fef3106c 434
6e955430 435Wstrict-selector-match
c662432e 436ObjC ObjC++ Var(warn_strict_selector_match) Warning
6e955430
ZL
437Warn if type signatures of candidate methods do not match exactly
438
23462d4d
UB
439Wsync-nand
440C C++ Var(warn_sync_nand) Init(1) Warning
441Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used
442
fef3106c 443Wsynth
c662432e 444C++ ObjC++ Var(warn_synth) Warning
802e3f8c 445Deprecated. This switch has no effect
fef3106c
NB
446
447Wsystem-headers
c662432e 448C ObjC C++ ObjC++ Warning
9a0f3e86 449; Documented in common.opt
fef3106c
NB
450
451Wtraditional
c662432e 452C ObjC Var(warn_traditional) Warning
72de27ea 453Warn about features not present in traditional C
fef3106c 454
05170031 455Wtraditional-conversion
c662432e 456C ObjC Var(warn_traditional_conversion) Warning
05170031
MLI
457Warn of prototypes causing type conversions different from what would happen in the absence of prototype
458
fef3106c 459Wtrigraphs
c662432e 460C ObjC C++ ObjC++ Warning
72de27ea 461Warn if trigraphs are encountered that might affect the meaning of the program
fef3106c
NB
462
463Wundeclared-selector
c662432e 464ObjC ObjC++ Var(warn_undeclared_selector) Warning
7619c085 465Warn about @selector()s without previously declared methods
fef3106c
NB
466
467Wundef
c662432e 468C ObjC C++ ObjC++ Warning
72de27ea 469Warn if an undefined macro is used in an #if directive
fef3106c
NB
470
471Wunknown-pragmas
c662432e 472C ObjC C++ ObjC++ Warning
5a170a05 473Warn about unrecognized pragmas
fef3106c
NB
474
475Wunused-macros
c662432e 476C ObjC C++ ObjC++ Warning
72de27ea 477Warn about macros defined in the main file that are not used
fef3106c 478
e5b79219 479Wvariadic-macros
c662432e 480C ObjC C++ ObjC++ Warning
e5b79219
RH
481Do not warn about using variadic macros when -pedantic
482
50d50fc7
SP
483Wvla
484C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
485Warn if a variable length array is used
486
16302daf
MLI
487Wvolatile-register-var
488C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning
489Warn when a register variable is declared volatile
490
fef3106c 491Wwrite-strings
c662432e 492C ObjC C++ ObjC++ Var(warn_write_strings) Warning
d539b114 493In 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.
fef3106c 494
f2fd3821 495Wpointer-sign
c662432e 496C ObjC Var(warn_pointer_sign) Init(-1) Warning
c85ce869 497Warn when a pointer differs in signedness in an assignment
f2fd3821 498
fef3106c
NB
499ansi
500C ObjC C++ ObjC++
c85ce869 501A synonym for -std=c89 (for C) or -std=c++98 (for C++)
fef3106c
NB
502
503d
504C ObjC C++ ObjC++ Joined
72de27ea 505; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
fef3106c 506
fef3106c
NB
507faccess-control
508C++ ObjC++
bae92bf3 509Enforce class member access control semantics
fef3106c
NB
510
511fall-virtual
512C++ ObjC++
513
514falt-external-templates
515C++ ObjC++
bae92bf3 516Change when template instances are emitted
fef3106c
NB
517
518fasm
519C ObjC C++ ObjC++
5a170a05 520Recognize the \"asm\" keyword
fef3106c
NB
521
522fbuiltin
523C ObjC C++ ObjC++
5a170a05 524Recognize built-in functions
fef3106c
NB
525
526fbuiltin-
527C ObjC C++ ObjC++ Joined
528
529fcheck-new
530C++ ObjC++
bae92bf3 531Check the return value of new
fef3106c
NB
532
533fcond-mismatch
534C ObjC C++ ObjC++
5a170a05 535Allow the arguments of the '?' operator to have different types
fef3106c
NB
536
537fconserve-space
538C++ ObjC++
bae92bf3 539Reduce the size of object files
fef3106c 540
fef3106c
NB
541fconstant-string-class=
542ObjC ObjC++ Joined
f2ac9964 543-fconst-string-class=<name> Use class <name> for constant strings
fef3106c
NB
544
545fdefault-inline
546C++ ObjC++
bae92bf3 547Inline member functions by default
fef3106c 548
ccfc4c91
OW
549fdirectives-only
550C ObjC C++ ObjC++
551Preprocess directives only.
552
fef3106c
NB
553fdollars-in-identifiers
554C ObjC C++ ObjC++
72de27ea 555Permit '$' as an identifier character
fef3106c 556
fef3106c
NB
557felide-constructors
558C++ ObjC++
559
560fenforce-eh-specs
561C++ ObjC++
bae92bf3 562Generate code to check exception specifications
fef3106c
NB
563
564fenum-int-equiv
565C++ ObjC++
566
e6cc3a24
ZW
567fexec-charset=
568C ObjC C++ ObjC++ Joined RejectNegative
72de27ea 569-fexec-charset=<cset> Convert all strings and character constants to character set <cset>
e6cc3a24 570
af15a2fe
JM
571fextended-identifiers
572C ObjC C++ ObjC++
573Permit universal character names (\\u and \\U) in identifiers
574
16dd5cfe
EC
575finput-charset=
576C ObjC C++ ObjC++ Joined RejectNegative
c85ce869 577-finput-charset=<cset> Specify the default character set for source files
16dd5cfe
EC
578
579
fef3106c
NB
580fexternal-templates
581C++ ObjC++
582
fef3106c
NB
583ffor-scope
584C++ ObjC++
bae92bf3 585Scope of for-init-statement variables is local to the loop
fef3106c
NB
586
587ffreestanding
820b51ae 588C ObjC C++ ObjC++
5a170a05 589Do not assume that standard C libraries and \"main\" exist
fef3106c
NB
590
591fgnu-keywords
592C++ ObjC++
bae92bf3 593Recognize GNU-defined keywords
fef3106c
NB
594
595fgnu-runtime
596ObjC ObjC++
f2ac9964 597Generate code for GNU runtime environment
fef3106c 598
da1c7394 599fgnu89-inline
2cbac420 600C ObjC Var(flag_gnu89_inline) Init(-1)
da1c7394
ILT
601Use traditional GNU semantics for inline functions
602
fef3106c
NB
603fguiding-decls
604C++ ObjC++
605
606fhandle-exceptions
c662432e 607C++ ObjC++ Optimization
fef3106c
NB
608
609fhonor-std
610C++ ObjC++
611
612fhosted
613C ObjC
5a170a05 614Assume normal C execution environment
fef3106c
NB
615
616fhuge-objects
617C++ ObjC++
bae92bf3 618Enable support for huge objects
fef3106c
NB
619
620fimplement-inlines
621C++ ObjC++
bae92bf3 622Export functions even if they can be inlined
fef3106c
NB
623
624fimplicit-inline-templates
625C++ ObjC++
bae92bf3 626Emit implicit instantiations of inline templates
fef3106c
NB
627
628fimplicit-templates
629C++ ObjC++
bae92bf3 630Emit implicit instantiations of templates
fef3106c 631
d63d5d0c 632ffriend-injection
2cbac420 633C++ ObjC++ Var(flag_friend_injection)
d63d5d0c
ILT
634Inject friend functions into enclosing namespace
635
fef3106c
NB
636flabels-ok
637C++ ObjC++
638
00c8e9f6
MS
639flax-vector-conversions
640C ObjC C++ ObjC++
641Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
642
fef3106c
NB
643fms-extensions
644C ObjC C++ ObjC++
bae92bf3 645Don't warn about uses of Microsoft extensions
fef3106c
NB
646
647fname-mangling-version-
648C++ ObjC++ Joined
649
650fnew-abi
651C++ ObjC++
652
653fnext-runtime
654ObjC ObjC++
264fa2db
ZL
655Generate code for NeXT (Apple Mac OS X) runtime environment
656
657fnil-receivers
658ObjC ObjC++
659Assume that receivers of Objective-C messages may be nil
fef3106c
NB
660
661fnonansi-builtins
662C++ ObjC++
663
664fnonnull-objects
665C++ ObjC++
666
6e955430
ZL
667; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
668; to initialize any non-POD ivars in Objective-C++ classes.
669fobjc-call-cxx-cdtors
670ObjC++ Var(flag_objc_call_cxx_cdtors)
671Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed
672
673fobjc-direct-dispatch
674ObjC ObjC++ Var(flag_objc_direct_dispatch)
675Allow fast jumps to the message dispatcher
676
677; Nonzero means that we will allow new ObjC exception syntax (@throw,
678; @try, etc.) in source code.
264fa2db 679fobjc-exceptions
6e955430 680ObjC ObjC++ Var(flag_objc_exceptions)
264fa2db
ZL
681Enable Objective-C exception and synchronization syntax
682
6e955430
ZL
683fobjc-gc
684ObjC ObjC++ Var(flag_objc_gc)
685Enable garbage collection (GC) in Objective-C/Objective-C++ programs
686
687; Nonzero means that we generate NeXT setjmp based exceptions.
093c7153 688fobjc-sjlj-exceptions
6e955430 689ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
093c7153
RH
690Enable Objective-C setjmp exception handling runtime
691
953ff289
DN
692fopenmp
693C ObjC C++ ObjC++ Var(flag_openmp)
9a0f3e86 694Enable OpenMP (implies -frecursive in Fortran)
953ff289 695
fef3106c
NB
696foperator-names
697C++ ObjC++
1cbc62c0 698Recognize C++ keywords like \"compl\" and \"xor\"
fef3106c
NB
699
700foptional-diags
701C++ ObjC++
bae92bf3 702Enable optional diagnostics
fef3106c
NB
703
704fpch-deps
705C ObjC C++ ObjC++
706
c0d578e6
GK
707fpch-preprocess
708C ObjC C++ ObjC++
709Look for and use PCH files even when preprocessing
710
fef3106c
NB
711fpermissive
712C++ ObjC++
bae92bf3 713Downgrade conformance errors to warnings
fef3106c
NB
714
715fpreprocessed
716C ObjC C++ ObjC++
72de27ea 717Treat the input file as already preprocessed
fef3106c 718
6ea2bd47
JM
719fpretty-templates
720C++ ObjC++
721-fno-pretty-templates Do not pretty-print template specializations as the template signature followed by the arguments
722
264fa2db
ZL
723freplace-objc-classes
724ObjC ObjC++
725Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
726
fef3106c
NB
727frepo
728C++ ObjC++
bae92bf3 729Enable automatic template instantiation
fef3106c
NB
730
731frtti
c662432e 732C++ ObjC++ Optimization
bae92bf3 733Generate run time type descriptor information
fef3106c
NB
734
735fshort-double
c662432e 736C ObjC C++ ObjC++ Optimization
5a170a05 737Use the same size for double as for float
fef3106c
NB
738
739fshort-enums
c662432e 740C ObjC C++ ObjC++ Optimization
5a170a05 741Use the narrowest integer type possible for enumeration types
fef3106c
NB
742
743fshort-wchar
c662432e 744C ObjC C++ ObjC++ Optimization
5a170a05 745Force the underlying type for \"wchar_t\" to be \"unsigned short\"
fef3106c 746
fef3106c
NB
747fsigned-bitfields
748C ObjC C++ ObjC++
5a170a05 749When \"signed\" or \"unsigned\" is not given make the bitfield signed
fef3106c
NB
750
751fsigned-char
752C ObjC C++ ObjC++
5a170a05 753Make \"char\" signed by default
fef3106c
NB
754
755fsquangle
756C++ ObjC++
757
758fstats
759C++ ObjC++
bae92bf3 760Display statistics accumulated during compilation
fef3106c
NB
761
762fstrict-prototype
763C++ ObjC++
764
765ftabstop=
7b086b11 766C ObjC C++ ObjC++ Joined RejectNegative UInteger
72de27ea 767-ftabstop=<number> Distance between tab stops for column reporting
fef3106c
NB
768
769ftemplate-depth-
c22cacf3 770C++ ObjC++ Joined RejectNegative UInteger
bae92bf3 771-ftemplate-depth-<number> Specify maximum template instantiation depth
fef3106c
NB
772
773fthis-is-variable
774C++ ObjC++
775
40aac948 776fthreadsafe-statics
c662432e 777C++ ObjC++ Optimization
c85ce869 778-fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
40aac948 779
fef3106c
NB
780funsigned-bitfields
781C ObjC C++ ObjC++
5a170a05 782When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
fef3106c
NB
783
784funsigned-char
785C ObjC C++ ObjC++
5a170a05 786Make \"char\" unsigned by default
fef3106c
NB
787
788fuse-cxa-atexit
789C++ ObjC++
bae92bf3 790Use __cxa_atexit to register destructors
fef3106c 791
c7b5e395
GK
792fuse-cxa-get-exception-ptr
793C++ ObjC++
794Use __cxa_get_exception_ptr in exception handling
795
d7afec4b 796fvisibility-inlines-hidden
d0b07283 797C++ ObjC++
d7afec4b
ND
798Marks all inlined methods as having hidden visibility
799
ddbfd28d
GK
800fvisibility-ms-compat
801C++ ObjC++ Var(flag_visibility_ms_compat)
802Changes visibility to match Microsoft Visual Studio by default
803
fef3106c
NB
804fvtable-gc
805C++ ObjC++
bae92bf3 806Discard unused virtual functions
fef3106c
NB
807
808fvtable-thunks
809C++ ObjC++
bae92bf3 810Implement vtables using thunks
fef3106c
NB
811
812fweak
813C++ ObjC++
bae92bf3 814Emit common-like symbols as weak symbols
fef3106c 815
e6cc3a24
ZW
816fwide-exec-charset=
817C ObjC C++ ObjC++ Joined RejectNegative
72de27ea 818-fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>
e6cc3a24 819
b20d9f0c
AO
820fworking-directory
821C ObjC C++ ObjC++
822Generate a #line directive pointing at the current working directory
823
fef3106c
NB
824fxref
825C++ ObjC++
bae92bf3 826Emit cross referencing information
fef3106c 827
264fa2db
ZL
828fzero-link
829ObjC ObjC++
830Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
831
fef3106c
NB
832gen-decls
833ObjC ObjC++
f2ac9964 834Dump declarations to a .decl file
fef3106c 835
39ef6592
LC
836femit-struct-debug-baseonly
837C ObjC C++ ObjC++
838-femit-struct-debug-baseonly Aggressive reduced debug info for structs
839
840femit-struct-debug-reduced
841C ObjC C++ ObjC++
842-femit-struct-debug-reduced Conservative reduced debug info for structs
843
844femit-struct-debug-detailed=
845C ObjC C++ ObjC++ Joined
846-femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs
847
fef3106c
NB
848idirafter
849C ObjC C++ ObjC++ Joined Separate
72de27ea 850-idirafter <dir> Add <dir> to the end of the system include path
fef3106c
NB
851
852imacros
853C ObjC C++ ObjC++ Joined Separate
72de27ea 854-imacros <file> Accept definition of macros in <file>
fef3106c 855
2b6dd222
JM
856imultilib
857C ObjC C++ ObjC++ Joined Separate
858-imultilib <dir> Set <dir> to be the multilib include subdirectory
859
fef3106c
NB
860include
861C ObjC C++ ObjC++ Joined Separate
72de27ea 862-include <file> Include the contents of <file> before other files
fef3106c
NB
863
864iprefix
865C ObjC C++ ObjC++ Joined Separate
72de27ea 866-iprefix <path> Specify <path> as a prefix for next two options
fef3106c
NB
867
868isysroot
869C ObjC C++ ObjC++ Joined Separate
72de27ea 870-isysroot <dir> Set <dir> to be the system root directory
fef3106c
NB
871
872isystem
873C ObjC C++ ObjC++ Joined Separate
72de27ea 874-isystem <dir> Add <dir> to the start of the system include path
fef3106c 875
4bed3787
MS
876iquote
877C ObjC C++ ObjC++ Joined Separate
878-iquote <dir> Add <dir> to the end of the quote include path
879
fef3106c
NB
880iwithprefix
881C ObjC C++ ObjC++ Joined Separate
72de27ea 882-iwithprefix <dir> Add <dir> to the end of the system include path
fef3106c
NB
883
884iwithprefixbefore
885C ObjC C++ ObjC++ Joined Separate
72de27ea 886-iwithprefixbefore <dir> Add <dir> to the end of the main include path
fef3106c
NB
887
888lang-asm
f2ac9964 889C Undocumented
fef3106c
NB
890
891lang-objc
f2ac9964 892C ObjC C++ ObjC++ Undocumented
fef3106c
NB
893
894nostdinc
895C ObjC C++ ObjC++
72de27ea 896Do not search standard system include directories (those specified with -isystem will still be used)
fef3106c
NB
897
898nostdinc++
72de27ea
NB
899C++ ObjC++
900Do not search standard system include directories for C++
fef3106c
NB
901
902o
903C ObjC C++ ObjC++ Joined Separate
72de27ea 904; Documented in common.opt
fef3106c
NB
905
906pedantic
907C ObjC C++ ObjC++
72de27ea 908; Documented in common.opt
fef3106c
NB
909
910pedantic-errors
911C ObjC C++ ObjC++
72de27ea 912; Documented in common.opt
fef3106c
NB
913
914print-objc-runtime-info
915ObjC ObjC++
f2ac9964 916Generate C header of platform-specific features
fef3106c 917
3fd30b88
GK
918print-pch-checksum
919C ObjC C++ ObjC++
c85ce869 920Print a checksum of the executable for PCH validity checking, and stop
3fd30b88 921
fef3106c
NB
922remap
923C ObjC C++ ObjC++
72de27ea 924Remap file names when including files
fef3106c
NB
925
926std=c++98
927C++ ObjC++
72de27ea 928Conform to the ISO 1998 C++ standard
fef3106c 929
966541e3
DG
930std=c++0x
931C++ ObjC++
932Conform to the ISO 1998 C++ standard, with extensions that are likely to
933become a part of the upcoming ISO C++ standard, dubbed C++0x. Note that the
934extensions enabled by this mode are experimental and may be removed in
935future releases of GCC.
936
fef3106c
NB
937std=c89
938C ObjC
72de27ea 939Conform to the ISO 1990 C standard
fef3106c
NB
940
941std=c99
942C ObjC
72de27ea 943Conform to the ISO 1999 C standard
fef3106c
NB
944
945std=c9x
946C ObjC
72de27ea 947Deprecated in favor of -std=c99
fef3106c
NB
948
949std=gnu++98
950C++ ObjC++
72de27ea 951Conform to the ISO 1998 C++ standard with GNU extensions
fef3106c 952
966541e3
DG
953std=gnu++0x
954C++ ObjC++
955Conform to the ISO 1998 C++ standard, with GNU extensions and
956extensions that are likely to become a part of the upcoming ISO C++
957standard, dubbed C++0x. Note that the extensions enabled by this mode
958are experimental and may be removed in future releases of GCC.
959
fef3106c
NB
960std=gnu89
961C ObjC
72de27ea 962Conform to the ISO 1990 C standard with GNU extensions
fef3106c
NB
963
964std=gnu99
965C ObjC
72de27ea 966Conform to the ISO 1999 C standard with GNU extensions
fef3106c
NB
967
968std=gnu9x
969C ObjC
72de27ea 970Deprecated in favor of -std=gnu99
fef3106c
NB
971
972std=iso9899:1990
973C ObjC
3a1e400e 974Conform to the ISO 1990 C standard
fef3106c
NB
975
976std=iso9899:199409
977C ObjC
72de27ea 978Conform to the ISO 1990 C standard as amended in 1994
fef3106c
NB
979
980std=iso9899:1999
981C ObjC
3a1e400e 982Conform to the ISO 1999 C standard
fef3106c
NB
983
984std=iso9899:199x
985C ObjC
3a1e400e 986Deprecated in favor of -std=iso9899:1999
fef3106c
NB
987
988traditional-cpp
989C ObjC C++ ObjC++
72de27ea 990Enable traditional preprocessing
fef3106c
NB
991
992trigraphs
993C ObjC C++ ObjC++
72de27ea 994-trigraphs Support ISO C trigraphs
fef3106c
NB
995
996undef
997C ObjC C++ ObjC++
72de27ea 998Do not predefine system-specific and GCC-specific macros
fef3106c
NB
999
1000v
b3eaaf1a 1001Common C ObjC C++ ObjC++
72de27ea 1002Enable verbose output
fef3106c
NB
1003
1004w
1005C ObjC C++ ObjC++
72de27ea 1006; Documented in common.opt
e11a4ae5
NB
1007
1008; This comment is to ensure we retain the blank line above.
This page took 1.223686 seconds and 5 git commands to generate.