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