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