]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/c.opt
Update copyright years.
[thirdparty/gcc.git] / gcc / c-family / c.opt
CommitLineData
fef3106c 1; Options for the C, ObjC, C++ and ObjC++ front ends.
8d9254fc 2; Copyright (C) 2003-2020 Free Software Foundation, Inc.
fef3106c
NB
3;
4; This file is part of GCC.
5;
6; GCC is free software; you can redistribute it and/or modify it under
7; the terms of the GNU General Public License as published by the Free
9dcd6f09 8; Software Foundation; either version 3, or (at your option) any later
fef3106c 9; version.
c22cacf3 10;
fef3106c
NB
11; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12; WARRANTY; without even the implied warranty of MERCHANTABILITY or
13; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14; for more details.
c22cacf3 15;
fef3106c 16; You should have received a copy of the GNU General Public License
9dcd6f09
NC
17; along with GCC; see the file COPYING3. If not see
18; <http://www.gnu.org/licenses/>.
fef3106c 19
8abb6b22 20; See the GCC internals manual for a description of this file's format.
fef3106c 21
fef3106c
NB
22; Please try to keep this file in ASCII collating order.
23
be43ab4e
NB
24Language
25C
26
27Language
28ObjC
29
30Language
31C++
32
33Language
34ObjC++
35
e200444e
JM
36-all-warnings
37C ObjC C++ ObjC++ Warning Alias(Wall)
38
39-ansi
40C ObjC C++ ObjC++ Alias(ansi)
41
42-assert
43C ObjC C++ ObjC++ Separate Alias(A) MissingArgError(assertion missing after %qs)
44
45-assert=
46C ObjC C++ ObjC++ Joined Alias(A) MissingArgError(assertion missing after %qs)
47
48-comments
49C ObjC C++ ObjC++ Alias(C)
50
51-comments-in-macros
52C ObjC C++ ObjC++ Alias(CC)
53
54-define-macro
55C ObjC C++ ObjC++ Separate Alias(D) MissingArgError(macro name missing after %qs)
56
57-define-macro=
58C ObjC C++ ObjC++ Joined Alias(D) MissingArgError(macro name missing after %qs)
59
60-dependencies
61C ObjC C++ ObjC++ Alias(M)
62
63-dump
64C ObjC C++ ObjC++ Separate Alias(d)
65
66-dump=
67C ObjC C++ ObjC++ Joined Alias(d)
68
69-imacros
70C ObjC C++ ObjC++ Separate Alias(imacros) MissingArgError(missing filename after %qs)
71
72-imacros=
73C ObjC C++ ObjC++ Joined Alias(imacros) MissingArgError(missing filename after %qs)
74
75-include
76C ObjC C++ ObjC++ Separate Alias(include) MissingArgError(missing filename after %qs)
77
78-include=
79C ObjC C++ ObjC++ Joined Alias(include) MissingArgError(missing filename after %qs)
80
81-include-barrier
82C ObjC C++ ObjC++ Alias(I, -)
83
84-include-directory
85C ObjC C++ ObjC++ Separate Alias(I) MissingArgError(missing path after %qs)
86
87-include-directory=
88C ObjC C++ ObjC++ Joined Alias(I) MissingArgError(missing path after %qs)
89
90-include-directory-after
91C ObjC C++ ObjC++ Separate Alias(idirafter) MissingArgError(missing path after %qs)
92
93-include-directory-after=
94C ObjC C++ ObjC++ Joined Alias(idirafter) MissingArgError(missing path after %qs)
95
96-include-prefix
97C ObjC C++ ObjC++ Separate Alias(iprefix)
98
99-include-prefix=
100C ObjC C++ ObjC++ JoinedOrMissing Alias(iprefix)
101
102-include-with-prefix
103C ObjC C++ ObjC++ Separate Alias(iwithprefix)
104
105-include-with-prefix=
106C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix)
107
108-include-with-prefix-after
109C ObjC C++ ObjC++ Separate Alias(iwithprefix)
110
111-include-with-prefix-after=
112C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix)
113
114-include-with-prefix-before
115C ObjC C++ ObjC++ Separate Alias(iwithprefixbefore)
116
117-include-with-prefix-before=
118C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefixbefore)
119
120-no-integrated-cpp
121Driver Alias(no-integrated-cpp)
122
123-no-line-commands
124C ObjC C++ ObjC++ Alias(P)
125
126-no-standard-includes
127C ObjC C++ ObjC++ Alias(nostdinc)
128
129-no-warnings
130C ObjC C++ ObjC++ Alias(w)
131
132-output
133C ObjC C++ ObjC++ Separate Alias(o)
134
135-output=
136C ObjC C++ ObjC++ Joined Alias(o)
137
fef3106c
NB
138-output-pch=
139C ObjC C++ ObjC++ Joined Separate
140
e200444e
JM
141-pedantic
142C ObjC C++ ObjC++ Alias(pedantic)
143
e200444e
JM
144-preprocess
145C ObjC C++ ObjC++ Undocumented Alias(E)
146
147-print-missing-file-dependencies
148C ObjC C++ ObjC++ Alias(MG)
149
150-trace-includes
151C ObjC C++ ObjC++ Alias(H)
152
153-traditional
154Driver Alias(traditional)
155
156-traditional-cpp
157C ObjC C++ ObjC++ Alias(traditional-cpp)
158
159-trigraphs
160C ObjC C++ ObjC++ Alias(trigraphs)
161
162-undefine-macro
163C ObjC C++ ObjC++ Separate Alias(U) MissingArgError(macro name missing after %qs)
164
165-undefine-macro=
166C ObjC C++ ObjC++ Joined Alias(U) MissingArgError(macro name missing after %qs)
167
168-user-dependencies
169C ObjC C++ ObjC++ Alias(MM)
170
171-verbose
172Common C ObjC C++ ObjC++ Alias(v)
173
174-write-dependencies
175C ObjC C++ ObjC++ NoDriverArg Separate Alias(MD) MissingArgError(missing filename after %qs)
176
177-write-user-dependencies
178C ObjC C++ ObjC++ NoDriverArg Separate Alias(MMD) MissingArgError(missing filename after %qs)
179
fef3106c 180A
61ff2bdc 181C ObjC C++ ObjC++ Joined Separate MissingArgError(assertion missing after %qs)
a7b2e184 182-A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question>.
fef3106c
NB
183
184C
185C ObjC C++ ObjC++
a7b2e184 186Do not discard comments.
fef3106c
NB
187
188CC
189C ObjC C++ ObjC++
a7b2e184 190Do not discard comments in macro expansions.
fef3106c
NB
191
192D
61ff2bdc 193C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
a7b2e184 194-D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1.
fef3106c
NB
195
196E
5498f011 197C ObjC C++ ObjC++ Undocumented Var(flag_preprocess_only)
fef3106c 198
94d1613b 199F
bd837408 200Driver C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 201-F <dir> Add <dir> to the end of the main framework include path.
94d1613b 202
1ee62b92
PG
203fgimple
204C Var(flag_gimple) Init(0)
205Enable parsing GIMPLE.
206
fef3106c
NB
207H
208C ObjC C++ ObjC++
a7b2e184 209Print the name of header files as they are used.
fef3106c
NB
210
211I
61ff2bdc 212C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 213-I <dir> Add <dir> to the end of the main include path.
fef3106c
NB
214
215M
216C ObjC C++ ObjC++
a7b2e184 217Generate make dependencies.
fef3106c 218
c878765b
JM
219MD
220C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
a7b2e184 221Generate make dependencies and compile.
fef3106c
NB
222
223MF
61ff2bdc 224C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
a7b2e184 225-MF <file> Write dependency output to the given file.
fef3106c
NB
226
227MG
228C ObjC C++ ObjC++
a7b2e184 229Treat missing header files as generated files.
fef3106c
NB
230
231MM
232C ObjC C++ ObjC++
a7b2e184 233Like -M but ignore system header files.
fef3106c 234
c878765b
JM
235MMD
236C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
a7b2e184 237Like -MD but ignore system header files.
fef3106c
NB
238
239MP
240C ObjC C++ ObjC++
a7b2e184 241Generate phony targets for all headers.
fef3106c
NB
242
243MQ
61ff2bdc 244C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
a7b2e184 245-MQ <target> Add a MAKE-quoted target.
fef3106c
NB
246
247MT
61ff2bdc 248C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
a7b2e184 249-MT <target> Add an unquoted target.
fef3106c
NB
250
251P
252C ObjC C++ ObjC++
a7b2e184 253Do not generate #line directives.
fef3106c
NB
254
255U
61ff2bdc 256C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
a7b2e184 257-U<macro> Undefine <macro>.
fef3106c
NB
258
259Wabi
d7f09764 260C ObjC C++ ObjC++ LTO Var(warn_abi) Warning
a7b2e184 261Warn about things that will change when compiling with an ABI-compliant compiler.
fef3106c 262
62984918
JM
263Wabi=
264C ObjC C++ ObjC++ LTO Joined RejectNegative UInteger Warning
a7b2e184 265Warn about things that change between the current -fabi-version and the specified version.
62984918 266
7dbb85a7
JM
267Wabi-tag
268C++ ObjC++ Var(warn_abi_tag) Warning
a7b2e184 269Warn if a subobject has an abi_tag attribute that the complete object type does not have.
7dbb85a7 270
bce08d50 271Wpsabi
50b15873 272C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Warning Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi)
bce08d50 273
80c6d1f4
MJ
274Wabsolute-value
275C ObjC Var(warn_absolute_value) Warning EnabledBy(Wextra)
276Warn on suspicious calls of standard functions computing absolute values.
277
c116cd05 278Waddress
4a0ae68e 279C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 280Warn about suspicious uses of memory addresses.
c116cd05 281
af63ba4b
JM
282Enum
283Name(warn_aligned_new_level) Type(int) UnknownError(argument %qs to %<-Waligned-new%> not recognized)
284
285EnumValue
286Enum(warn_aligned_new_level) String(none) Value(0)
287
288EnumValue
289Enum(warn_aligned_new_level) String(global) Value(1)
290
291EnumValue
292Enum(warn_aligned_new_level) String(all) Value(2)
293
294Waligned-new
295C++ ObjC++ Alias(Waligned-new=,global,none)
296Warn about 'new' of type with extended alignment without -faligned-new.
297
298Waligned-new=
2e1c20b1 299C++ ObjC++ Var(warn_aligned_new) Enum(warn_aligned_new_level) Joined RejectNegative Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
6a825afe 300-Waligned-new=[none|global|all] Warn even if 'new' uses a class member allocation function.
af63ba4b 301
fef3106c 302Wall
c662432e 303C ObjC C++ ObjC++ Warning
a7b2e184 304Enable most warning messages.
fef3106c 305
adc577c5
AH
306Walloca
307C ObjC C++ ObjC++ Var(warn_alloca) Warning
308Warn on any use of alloca.
309
8bd9f164 310Walloc-size-larger-than=
00abf86c 311C ObjC C++ LTO ObjC++ Var(warn_alloc_size_limit) Joined Host_Wide_Int ByteSize Warning Init(HOST_WIDE_INT_MAX)
8bd9f164
MS
312-Walloc-size-larger-than=<bytes> Warn for calls to allocation functions that
313attempt to allocate objects larger than the specified number of bytes.
314
d258f4aa 315Wno-alloc-size-larger-than
00abf86c 316C ObjC C++ LTO ObjC++ Alias(Walloc-size-larger-than=,18446744073709551615EiB,none) Warning
d258f4aa
MS
317-Wno-alloc-size-larger-than Disable Walloc-size-larger-than= warning. Equivalent to Walloc-size-larger-than=<SIZE_MAX> or larger.
318
8bd9f164
MS
319Walloc-zero
320C ObjC C++ ObjC++ Var(warn_alloc_zero) Warning
321-Walloc-zero Warn for calls to allocation functions that specify zero bytes.
322
adc577c5 323Walloca-larger-than=
00abf86c 324C ObjC C++ LTO ObjC++ Var(warn_alloca_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
9453ba0a 325-Walloca-larger-than=<number> Warn on unbounded uses of
adc577c5
AH
326alloca, and on bounded uses of alloca whose bound can be larger than
327<number> bytes.
328
00abf86c
MS
329Wno-alloca-larger-than
330C ObjC C++ LTO ObjC++ Alias(Walloca-larger-than=,18446744073709551615EiB,none) Warning
331-Wno-alloca-larger-than Disable Walloca-larger-than= warning. Equivalent to Walloca-larger-than=<SIZE_MAX> or larger.
332
34a180a6 333Warray-bounds
0d7f9065 334LangEnabledBy(C ObjC C++ LTO ObjC++)
34a180a6
MLI
335; in common.opt
336
de1b5c17 337Warray-bounds=
cea71f0a 338LangEnabledBy(C ObjC C++ LTO ObjC++,Wall,1,0)
de1b5c17
MU
339; in common.opt
340
49fb45c8
MS
341Wzero-length-bounds
342C ObjC C++ ObjC++ Var(warn_zero_length_bounds) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
343Warn about accesses to interior zero-length array members.
344
6e955430 345Wassign-intercept
c662432e 346ObjC ObjC++ Var(warn_assign_intercept) Warning
a7b2e184 347Warn whenever an Objective-C assignment is being intercepted by the garbage collector.
6e955430 348
fef3106c 349Wbad-function-cast
c662432e 350C ObjC Var(warn_bad_function_cast) Warning
a7b2e184 351Warn about casting functions to incompatible types.
fef3106c 352
04159acf
MP
353Wbool-compare
354C ObjC C++ ObjC++ Var(warn_bool_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 355Warn about boolean expression compared with an integer value different from true/false.
04159acf 356
9a2300e9
MP
357Wbool-operation
358C ObjC C++ ObjC++ Var(warn_bool_op) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
359Warn about certain operations on boolean expressions.
360
8423e57c
MS
361Wframe-address
362C ObjC C++ ObjC++ Var(warn_frame_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 363Warn when __builtin_frame_address or __builtin_return_address is used unsafely.
8423e57c 364
48330c93
BE
365Wbuiltin-declaration-mismatch
366C ObjC C++ ObjC++ Var(warn_builtin_declaraion_mismatch) Init(1) Warning
367Warn when a built-in function is declared with the wrong signature.
368
c047ce93 369Wbuiltin-macro-redefined
b559c810 370C ObjC C++ ObjC++ CPP(warn_builtin_macro_redefined) CppReason(CPP_W_BUILTIN_MACRO_REDEFINED) Var(cpp_warn_builtin_macro_redefined) Init(1) Warning
a7b2e184 371Warn when a built-in preprocessor macro is undefined or redefined.
c047ce93 372
9f936c86 373Wc11-c2x-compat
175a85b2 374C ObjC CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT) Var(warn_c11_c2x_compat) Init(-1) Warning
9f936c86
JM
375Warn about features not present in ISO C11, but present in ISO C2X.
376
f3bede71 377Wc90-c99-compat
b559c810 378C ObjC CPP(cpp_warn_c90_c99_compat) CppReason(CPP_W_C90_C99_COMPAT) Var(warn_c90_c99_compat) Init(-1) Warning
a7b2e184 379Warn about features not present in ISO C90, but present in ISO C99.
f3bede71 380
35aff4fb
MP
381Wc99-c11-compat
382C ObjC Var(warn_c99_c11_compat) Init(-1) Warning
a7b2e184 383Warn about features not present in ISO C99, but present in ISO C11.
35aff4fb 384
b7e20b53 385Wc++-compat
b559c810 386C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPERATOR_NAMES) Init(0) Warning
a7b2e184 387Warn about C constructs that are not in the common subset of C and C++.
b7e20b53 388
e1f1ee86 389Wc++0x-compat
765189ff 390C++ ObjC++ Warning Alias(Wc++11-compat) Undocumented
97e3ad20
JM
391
392Wc++11-compat
765189ff 393C++ ObjC++ Var(warn_cxx11_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT)
a7b2e184 394Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011.
b7e20b53 395
20b06add
JM
396Wc++14-compat
397C++ ObjC++ Var(warn_cxx14_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
a7b2e184 398Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014.
20b06add 399
51dc6603 400Wc++1z-compat
7b936140 401C++ ObjC++ Warning Alias(Wc++17-compat) Undocumented
51dc6603
JM
402
403Wc++17-compat
7b936140
JJ
404C++ ObjC++ Var(warn_cxx17_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
405Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017.
51dc6603 406
4742dbe7
MP
407Wc++2a-compat
408C++ ObjC++ Warning Alias(Wc++20-compat) Undocumented
409
410Wc++20-compat
411C++ ObjC++ Var(warn_cxx20_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
412Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020.
413
c65e18d3
BE
414Wcast-function-type
415C ObjC C++ ObjC++ Var(warn_cast_function_type) Warning EnabledBy(Wextra)
416Warn about casts between incompatible function types.
417
fef3106c 418Wcast-qual
c662432e 419C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
a7b2e184 420Warn about casts which discard qualifiers.
fef3106c 421
3fa4634c
VR
422Wcatch-value
423C++ ObjC++ Warning Alias(Wcatch-value=, 1, 0)
424Warn about catch handlers of non-reference type.
425
63dbcd13 426Wcatch-value=
b22dbd03 427C++ ObjC++ Var(warn_catch_value) Warning Joined RejectNegative UInteger LangEnabledBy(C++ ObjC++,Wall, 1, 0) IntegerRange(0, 3)
63dbcd13
VR
428Warn about catch handlers of non-reference type.
429
fef3106c 430Wchar-subscripts
4a0ae68e 431C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 432Warn about subscripts whose type is \"char\".
fef3106c 433
d5e254e1 434Wchkp
68a57628 435C ObjC C++ ObjC++ Warning WarnRemoved
f48ef52e 436Removed in GCC 9. This switch has no effect.
d5e254e1 437
2b001724 438Wclobbered
95744782 439C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra)
a7b2e184 440Warn about variables that might be changed by \"longjmp\" or \"vfork\".
2b001724 441
ab574db6
MP
442Wcomma-subscript
443C++ ObjC++ Var(warn_comma_subscript) Warning
444Warn about uses of a comma operator within a subscripting expression.
445
fef3106c 446Wcomment
b559c810 447C ObjC C++ ObjC++ CPP(warn_comments) CppReason(CPP_W_COMMENTS) Var(cpp_warn_comment) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 448Warn about possibly nested block comments, and C++ comments spanning more than one physical line.
fef3106c
NB
449
450Wcomments
5de8299c 451C ObjC C++ ObjC++ Warning Alias(Wcomment)
a7b2e184 452Synonym for -Wcomment.
fef3106c 453
dfeadaa0
PC
454Wconditionally-supported
455C++ ObjC++ Var(warn_conditionally_supported) Warning
a7b2e184 456Warn for conditionally-supported constructs.
dfeadaa0 457
fef3106c 458Wconversion
c662432e 459C ObjC C++ ObjC++ Var(warn_conversion) Warning
a7b2e184 460Warn for implicit type conversions that may change a value.
fef3106c 461
17251338
MLI
462Wconversion-null
463C++ ObjC++ Var(warn_conversion_null) Init(1) Warning
a7b2e184 464Warn for converting NULL from/to a non-pointer type.
17251338 465
b559c810
MLI
466Wcpp
467C ObjC C++ ObjC++ CppReason(CPP_W_WARNING_DIRECTIVE)
468; Documented in common.opt
469
fef3106c 470Wctor-dtor-privacy
c662432e 471C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning
a7b2e184 472Warn when all constructors and destructors are private.
deef7113
MP
473
474Wdangling-else
475C ObjC C++ ObjC++ Var(warn_dangling_else) Warning LangEnabledBy(C ObjC C++ ObjC++,Wparentheses)
476Warn about dangling else.
fef3106c 477
b559c810
MLI
478Wdate-time
479C ObjC C++ ObjC++ CPP(warn_date_time) CppReason(CPP_W_DATE_TIME) Var(cpp_warn_date_time) Init(0) Warning
a7b2e184 480Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage.
b559c810 481
85617eba 482Wdeclaration-after-statement
177cce46 483C ObjC Var(warn_declaration_after_statement) Init(-1) Warning
a7b2e184 484Warn when a declaration is found after a statement.
85617eba 485
c9b0866a
PC
486Wdelete-incomplete
487C++ ObjC++ Var(warn_delete_incomplete) Init(1) Warning
a7b2e184 488Warn when deleting a pointer to incomplete type.
c9b0866a 489
014ab419 490Wdelete-non-virtual-dtor
27e51192 491C++ ObjC++ Var(warn_delnonvdtor) Warning LangEnabledBy(C++ ObjC++,Wall || Weffc++)
a7b2e184 492Warn about deleting polymorphic objects with non-virtual destructors.
014ab419 493
fef3106c 494Wdeprecated
99063eee
RS
495C C++ ObjC ObjC++ CPP(cpp_warn_deprecated) CppReason(CPP_W_DEPRECATED)
496; Documented in common.opt
fef3106c 497
b46b715d 498Wdeprecated-copy
5c8b3702
JM
499C++ ObjC++ Var(warn_deprecated_copy) Warning LangEnabledBy(C++ ObjC++, Wextra)
500Mark implicitly-declared copy operations as deprecated if the class has a
501user-provided copy operation.
502
503Wdeprecated-copy-dtor
504C++ ObjC++ Var(warn_deprecated_copy, 2) Warning
b46b715d
JM
505Mark implicitly-declared copy operations as deprecated if the class has a
506user-provided copy operation or destructor.
507
976d5a22
TT
508Wdesignated-init
509C ObjC Var(warn_designated_init) Init(1) Warning
a7b2e184 510Warn about positional initialization of structs requiring designated initializers.
976d5a22 511
768952be
MU
512Wdiscarded-array-qualifiers
513C ObjC Var(warn_discarded_array_qualifiers) Init(1) Warning
a7b2e184 514Warn if qualifiers on arrays which are pointer targets are discarded.
768952be 515
d00887e8
MP
516Wdiscarded-qualifiers
517C ObjC Var(warn_discarded_qualifiers) Init(1) Warning
a7b2e184 518Warn if type qualifiers on pointers are discarded.
d00887e8 519
fef3106c 520Wdiv-by-zero
2cbac420 521C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
a7b2e184 522Warn about compile-time integer division by zero.
fef3106c 523
2ebd93e1
MP
524Wduplicated-branches
525C ObjC C++ ObjC++ Var(warn_duplicated_branches) Init(0) Warning
526Warn about duplicated branches in if-else statements.
527
3e3b8d63 528Wduplicated-cond
12651878 529C ObjC C++ ObjC++ Var(warn_duplicated_cond) Init(0) Warning
a7b2e184 530Warn about duplicated conditions in an if-else-if chain.
3e3b8d63 531
fef3106c 532Weffc++
c662432e 533C++ ObjC++ Var(warn_ecpp) Warning
a7b2e184 534Warn about violations of Effective C++ style rules.
fef3106c 535
b3b433c5 536Wempty-body
95744782 537C ObjC C++ ObjC++ Var(warn_empty_body) Warning EnabledBy(Wextra)
a7b2e184 538Warn about an empty body in an if or else statement.
b3b433c5 539
fef3106c 540Wendif-labels
b559c810 541C ObjC C++ ObjC++ CPP(warn_endif_labels) CppReason(CPP_W_ENDIF_LABELS) Var(cpp_warn_endif_labels) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
f6a7a9d5 542Warn about stray tokens after #else and #endif.
fef3106c 543
a3299096 544Wenum-compare
27e51192 545C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat)
a7b2e184 546Warn about comparison of different enum types.
a3299096 547
68e2c199
PK
548Wenum-conversion
549C ObjC Var(warn_enum_conversion) Init(0) Warning LangEnabledBy(C ObjC,Wextra)
550Warn about implicit conversion of enum types.
551
fef3106c
NB
552Werror
553C ObjC C++ ObjC++
72de27ea 554; Documented in common.opt
fef3106c
NB
555
556Werror-implicit-function-declaration
5de8299c 557C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
a7b2e184 558This switch is deprecated; use -Werror=implicit-function-declaration instead.
fef3106c 559
70f6d5e1
JJ
560Wextra
561C ObjC C++ ObjC++ Warning
562; in common.opt
563
c3cbcd45
VR
564Wextra-semi
565C++ ObjC++ Var(warn_extra_semi) Warning
566Warn about semicolon after in-class function definition.
567
49b0aa18 568Wfloat-conversion
63bbf46d 569C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion)
a7b2e184 570Warn for implicit type conversions that cause loss of floating point precision.
49b0aa18 571
fef3106c 572Wfloat-equal
c662432e 573C ObjC C++ ObjC++ Var(warn_float_equal) Warning
a7b2e184 574Warn if testing floating point numbers for equality.
fef3106c
NB
575
576Wformat
7332899a 577C ObjC C++ ObjC++ Warning Alias(Wformat=, 1, 0)
a7b2e184 578Warn about printf/scanf/strftime/strfmon format string anomalies.
fef3106c 579
7332899a
MLI
580Wformat-contains-nul
581C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
a7b2e184 582Warn about format strings that contain NUL bytes.
7332899a 583
a9c697b8
MS
584Wformat-diag
585C ObjC C++ ObjC++ Var(warn_format_diag) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
36b34127 586Warn about GCC format strings with strings unsuitable for diagnostics.
a9c697b8 587
fef3106c 588Wformat-extra-args
7332899a 589C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
a7b2e184 590Warn if passing too many arguments to a function for its format string.
fef3106c
NB
591
592Wformat-nonliteral
7332899a 593C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
a7b2e184 594Warn about format strings that are not literals.
fef3106c 595
bce6f760 596Wformat-overflow
63010089 597C ObjC C++ LTO ObjC++ Warning Alias(Wformat-overflow=, 1, 0) IntegerRange(0, 2)
bce6f760
MS
598Warn about function calls with format strings that write past the end
599of the destination region. Same as -Wformat-overflow=1.
600
fef3106c 601Wformat-security
7332899a 602C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
a7b2e184 603Warn about possible security problems with format functions.
fef3106c 604
cbbd2b1c 605Wformat-signedness
7631f0e2 606C ObjC C++ ObjC++ Var(warn_format_signedness) Warning
a7b2e184 607Warn about sign differences with format functions.
cbbd2b1c 608
efcc8d38 609Wformat-truncation
bf5fbf46 610C ObjC C++ LTO ObjC++ Warning Alias(Wformat-truncation=, 1, 0)
efcc8d38
MS
611Warn about calls to snprintf and similar functions that truncate output.
612Same as -Wformat-truncation=1.
613
fef3106c 614Wformat-y2k
7332899a 615C ObjC C++ ObjC++ Var(warn_format_y2k) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 2, 0)
a7b2e184 616Warn about strftime formats yielding 2-digit years.
fef3106c
NB
617
618Wformat-zero-length
7332899a 619C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 1, 0)
a7b2e184 620Warn about zero-length formats.
fef3106c
NB
621
622Wformat=
63010089 623C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
a7b2e184 624Warn about printf/scanf/strftime/strfmon format string anomalies.
fef3106c 625
bce6f760 626Wformat-overflow=
cea71f0a 627C ObjC C++ LTO ObjC++ Joined RejectNegative UInteger Var(warn_format_overflow) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=, warn_format >= 1, 0) IntegerRange(0, 2)
88d0c3f0
MS
628Warn about function calls with format strings that write past the end
629of the destination region.
630
efcc8d38 631Wformat-truncation=
cea71f0a 632C ObjC C++ LTO ObjC++ Joined RejectNegative UInteger Var(warn_format_trunc) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=, warn_format >= 1, 0) IntegerRange(0, 2)
efcc8d38
MS
633Warn about calls to snprintf and similar functions that truncate output.
634
00aa1fa2
L
635Wif-not-aligned
636C ObjC C++ ObjC++ Var(warn_if_not_aligned) Init(1) Warning
637Warn when the field in a struct is not aligned.
638
5db2e9ca 639Wignored-qualifiers
95744782 640C C++ Var(warn_ignored_qualifiers) Warning EnabledBy(Wextra)
5db2e9ca
DK
641Warn whenever type qualifiers are ignored.
642
fbdb6baf
MP
643Wignored-attributes
644C C++ Var(warn_ignored_attributes) Init(1) Warning
645Warn whenever attributes are ignored.
646
d3786ebb
MB
647Winaccessible-base
648C++ ObjC++ Var(warn_inaccessible_base) Init(1) Warning
649Warn when a base is inaccessible in derived due to ambiguity.
650
d5c3d343
MP
651Wincompatible-pointer-types
652C ObjC Var(warn_incompatible_pointer_types) Init(1) Warning
a7b2e184 653Warn when there is a conversion between pointers that have incompatible types.
d5c3d343 654
da77eace
L
655Waddress-of-packed-member
656C ObjC C++ ObjC++ Var(warn_address_of_packed_member) Init(1) Warning
657Warn when the address of packed member of struct or union is taken.
658
3390f9c9 659Winit-self
0ccb505d 660C ObjC C++ ObjC++ Var(warn_init_self) Warning LangEnabledBy(C++ ObjC++,Wall)
a7b2e184 661Warn about variables which are initialized to themselves.
3390f9c9 662
04eb9c55
JM
663Winit-list-lifetime
664C++ ObjC++ Var(warn_init_list) Warning Init(1)
665Warn about uses of std::initializer_list that can result in dangling pointers.
666
fef3106c 667Wimplicit
4a0ae68e 668C ObjC Var(warn_implicit) Warning LangEnabledBy(C ObjC,Wall)
a7b2e184 669Warn about implicit declarations.
fef3106c 670
70f6d5e1
JJ
671Wimplicit-fallthrough=
672LangEnabledBy(C ObjC C++ ObjC++,Wextra,3,0)
673; in common.opt
674
0a0b3574
MM
675Wdouble-promotion
676C ObjC C++ ObjC++ Var(warn_double_promotion) Warning
a7b2e184 677Warn about implicit conversions from \"float\" to \"double\".
0a0b3574 678
fb2675cb
PB
679Wexpansion-to-defined
680C ObjC C++ ObjC++ CPP(warn_expansion_to_defined) CppReason(CPP_W_EXPANSION_TO_DEFINED) Var(cpp_warn_expansion_to_defined) Init(0) Warning EnabledBy(Wextra || Wpedantic)
681Warn if \"defined\" is used outside #if.
682
fef3106c 683Wimplicit-function-declaration
4a0ae68e 684C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
a7b2e184 685Warn about implicit function declarations.
fef3106c
NB
686
687Wimplicit-int
92574c7c 688C ObjC Var(warn_implicit_int) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
a7b2e184 689Warn when a declaration does not specify a type.
fef3106c
NB
690
691Wimport
2d2bd949 692C ObjC C++ ObjC++ Undocumented Ignore
fef3106c 693
4514a96b
JM
694Winherited-variadic-ctor
695C++ ObjC++ Var(warn_inh_var_ctor) Init(1) Warning
a7b2e184 696Warn about C++11 inheriting constructors when the base has a variadic constructor.
4514a96b 697
52ec0ea3
MP
698Wint-conversion
699C ObjC Var(warn_int_conversion) Init(1) Warning
a7b2e184 700Warn about incompatible integer to pointer and pointer to integer conversions.
52ec0ea3 701
144a96e4
BE
702Wint-in-bool-context
703C ObjC C++ ObjC++ Var(warn_int_in_bool_context) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
704Warn for suspicious integer expressions in boolean context.
705
53a2494e 706Wint-to-pointer-cast
dc8d2739 707C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning
a7b2e184 708Warn when there is a cast to a pointer from an integer of a different size.
53a2494e 709
fef3106c 710Winvalid-offsetof
c662432e 711C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning
a7b2e184 712Warn about invalid uses of the \"offsetof\" macro.
fef3106c
NB
713
714Winvalid-pch
b559c810 715C ObjC C++ ObjC++ CPP(warn_invalid_pch) CppReason(CPP_W_INVALID_PCH) Var(cpp_warn_invalid_pch) Init(0) Warning
a7b2e184 716Warn about PCH files that are found but not used.
fef3106c 717
e1b7793c 718Wjump-misses-init
f2bc201f 719C ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C ObjC,Wc++-compat)
a7b2e184 720Warn when a jump misses a variable initialization.
e1b7793c 721
7f5f5f98 722Wliteral-suffix
b559c810 723C++ ObjC++ CPP(warn_literal_suffix) CppReason(CPP_W_LITERAL_SUFFIX) Var(cpp_warn_literal_suffix) Init(1) Warning
7f5f5f98
OW
724Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.
725
ca409efd 726Wlogical-op
a7b2e184
MS
727C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning
728Warn when a logical operator is suspiciously always evaluating to true or false.
ca409efd 729
742938c9 730Wlogical-not-parentheses
d2e4feca 731C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 732Warn when logical not is used on the left hand side operand of a comparison.
742938c9 733
fef3106c 734Wlong-long
b559c810 735C ObjC C++ ObjC++ CPP(cpp_warn_long_long) CppReason(CPP_W_LONG_LONG) Var(warn_long_long) Init(-1) Warning LangEnabledBy(C ObjC,Wc90-c99-compat)
a7b2e184 736Do not warn about using \"long long\" when -pedantic.
fef3106c
NB
737
738Wmain
34a180a6 739C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning LangEnabledBy(C ObjC,Wall, 2, 0)
a7b2e184 740Warn about suspicious declarations of \"main\".
fef3106c 741
34a180a6
MLI
742Wmain
743LangEnabledBy(C ObjC C++ ObjC++,Wpedantic, 2, 0)
744;
745
b108f48f
JJ
746Wmemset-transposed-args
747C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 748Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not.
b108f48f 749
c1e1f433
BS
750Wmemset-elt-size
751C ObjC C++ ObjC++ Var(warn_memset_elt_size) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
752Warn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size.
753
c3388e62 754Wmisleading-indentation
f6069ccc 755C C++ Common Var(warn_misleading_indentation) Warning LangEnabledBy(C C++,Wall)
a7b2e184 756Warn when the indentation of the code does not reflect the block structure.
c3388e62 757
e8f1ade2
MS
758Wmismatched-tags
759C++ ObjC++ Var(warn_mismatched_tags) Warning
760Warn when a class is redeclared or referenced using a mismatched class-key.
761
fef3106c 762Wmissing-braces
4f7f7aca 763C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
a7b2e184 764Warn about possibly missing braces around initializers.
fef3106c
NB
765
766Wmissing-declarations
c662432e 767C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
a7b2e184 768Warn about global functions without previous declarations.
fef3106c 769
eaac4679 770Wmissing-field-initializers
95744782 771C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra)
a7b2e184 772Warn about missing fields in struct initializers.
eaac4679 773
3e2becc4
MP
774Wmultistatement-macros
775C ObjC C++ ObjC++ Var(warn_multistatement_macros) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
776Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for.
777
6b333269
NS
778Wmultiple-inheritance
779C++ ObjC++ Var(warn_multiple_inheritance) Warning
a7b2e184 780Warn on direct multiple inheritance.
6b333269
NS
781
782Wnamespaces
783C++ ObjC++ Var(warn_namespaces) Warning
a7b2e184 784Warn on namespace definition.
6b333269 785
00aa1fa2
L
786Wpacked-not-aligned
787C ObjC C++ ObjC++ Var(warn_packed_not_aligned) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
788Warn when fields in a struct with the packed attribute are misaligned.
789
e8f1ade2
MS
790Wredundant-tags
791C++ ObjC++ Var(warn_redundant_tags) Warning
792Warn when a class or enumerated type is referenced using a redundant class-key.
793
20b06add
JM
794Wsized-deallocation
795C++ ObjC++ Var(warn_sized_deallocation) Warning EnabledBy(Wextra)
a7b2e184 796Warn about missing sized deallocation functions.
20b06add 797
40ffd95f
BE
798Wsizeof-pointer-div
799C ObjC C++ ObjC++ Var(warn_sizeof_pointer_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
800Warn about suspicious divisions of two sizeof expressions that don't work correctly with pointers.
801
1a4049e7 802Wsizeof-pointer-memaccess
4a0ae68e 803C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 804Warn about suspicious length parameters to certain string functions if the argument uses sizeof.
1a4049e7 805
773ec47f
MP
806Wsizeof-array-argument
807C ObjC C++ ObjC++ Var(warn_sizeof_array_argument) Warning Init(1)
a7b2e184 808Warn when sizeof is applied on a parameter declared as an array.
773ec47f 809
a7160771
MS
810Wstring-compare
811C ObjC C++ LTO ObjC++ Warning Var(warn_string_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wextra)
812Warn about calls to strcmp and strncmp used in equality expressions that
813are necessarily true or false due to the length of one and size of the other
814argument.
815
ee92e7ba 816Wstringop-overflow
cea71f0a 817C ObjC C++ LTO ObjC++ Warning Alias(Wstringop-overflow=, 2, 0)
ee92e7ba
MS
818Warn about buffer overflow in string manipulation functions like memcpy
819and strcpy.
820
821Wstringop-overflow=
cea71f0a 822C ObjC C++ LTO ObjC++ Joined RejectNegative UInteger Var(warn_stringop_overflow) Init(2) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall, 2, 0) IntegerRange(0, 4)
ee92e7ba
MS
823Under the control of Object Size type, warn about buffer overflow in string
824manipulation functions like memcpy and strcpy.
825
025d57f0 826Wstringop-truncation
cea71f0a 827C ObjC C++ LTO ObjC++ Var(warn_stringop_truncation) Warning Init (1) LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
025d57f0
MS
828Warn about truncation in string manipulation functions like strncat and strncpy.
829
90137d8f
MLI
830Wsuggest-attribute=format
831C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning
a7b2e184 832Warn about functions which might be candidates for format attributes.
fef3106c 833
2f42e5de
TS
834Wsuggest-override
835C++ ObjC++ Var(warn_override) Warning
836Suggest that the override keyword be used when the declaration of a virtual
837function overrides another.
838
34a180a6
MLI
839Wswitch
840C ObjC C++ ObjC++ Var(warn_switch) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 841Warn about enumerated switches, with no default, missing a case.
34a180a6
MLI
842
843Wswitch-default
844C ObjC C++ ObjC++ Var(warn_switch_default) Warning
a7b2e184 845Warn about enumerated switches missing a \"default:\" statement.
34a180a6
MLI
846
847Wswitch-enum
848C ObjC C++ ObjC++ Var(warn_switch_enum) Warning
a7b2e184 849Warn about all enumerated switches missing a specific case.
34a180a6 850
fedfecef 851Wswitch-bool
5c3d09f7 852C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1)
a7b2e184 853Warn about switches with boolean controlling expression.
fedfecef 854
da9e9b57
MB
855Wswitch-outside-range
856C ObjC C++ ObjC++ Var(warn_switch_outside_range) Warning Init(1)
857Warn about switch values that are outside of the switch's type range.
858
6b333269
NS
859Wtemplates
860C++ ObjC++ Var(warn_templates) Warning
a7b2e184 861Warn on primary template declaration.
6b333269 862
d4cfd486
MS
863Wmissing-attributes
864C ObjC C++ ObjC++ Var(warn_missing_attributes) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
865Warn about declarations of entities that may be missing attributes
d3a02ae5 866that related entities have been declared with.
d4cfd486 867
90137d8f 868Wmissing-format-attribute
54d62f51 869C ObjC C++ ObjC++ Warning Alias(Wsuggest-attribute=format)
90137d8f
MLI
870;
871
b02398bd 872Wmissing-include-dirs
b559c810 873C ObjC C++ ObjC++ CPP(warn_missing_include_dirs) CppReason(CPP_W_MISSING_INCLUDE_DIRS) Var(cpp_warn_missing_include_dirs) Init(0) Warning
a7b2e184 874Warn about user-specified include directories that do not exist.
b02398bd 875
cb4af25a 876Wmissing-parameter-type
95744782 877C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra)
a7b2e184 878Warn about function parameters declared without a type specifier in K&R-style functions.
cb4af25a 879
fef3106c 880Wmissing-prototypes
c662432e 881C ObjC Var(warn_missing_prototypes) Warning
a7b2e184 882Warn about global functions without prototypes.
fef3106c 883
5720c0dc 884Wmudflap
68a57628 885C ObjC C++ ObjC++ WarnRemoved
5720c0dc 886
fef3106c 887Wmultichar
b559c810 888C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning
a7b2e184 889Warn about use of multi-character character constants.
fef3106c 890
76f86d00 891Wnarrowing
765189ff 892C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++11-compat)
a7b2e184 893Warn about narrowing conversions within { } that are ill-formed in C++11.
76f86d00 894
fef3106c 895Wnested-externs
c662432e 896C ObjC Var(warn_nested_externs) Warning
a7b2e184 897Warn about \"extern\" declarations not at file scope.
fef3106c 898
59f9c2ed
JM
899Wnoexcept
900C++ ObjC++ Var(warn_noexcept) Warning
a7b2e184 901Warn when a noexcept expression evaluates to false even though the expression can't actually throw.
59f9c2ed 902
108154ff 903Wnoexcept-type
7b936140
JJ
904C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++17-compat)
905Warn if C++17 noexcept function type will change the mangled name of a symbol.
108154ff 906
fef3106c 907Wnon-template-friend
c662432e 908C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
a7b2e184 909Warn when non-templatized friend functions are declared within a template.
fef3106c 910
a599af84
MP
911Wclass-conversion
912C++ ObjC++ Var(warn_class_conversion) Init(1) Warning
913Warn when a conversion function will never be called due to the type it converts to.
914
c3684b7b
MS
915Wclass-memaccess
916C++ ObjC++ Var(warn_class_memaccess) Warning LangEnabledBy(C++ ObjC++, Wall)
917Warn for unsafe raw memory writes to objects of class types.
918
fef3106c 919Wnon-virtual-dtor
880a467b 920C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
a7b2e184 921Warn about non-virtual destructors.
fef3106c
NB
922
923Wnonnull
cea71f0a 924C ObjC C++ LTO ObjC++ Var(warn_nonnull) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=,warn_format >= 1,0)
a7b2e184 925Warn about NULL being passed to argument slots marked as requiring non-NULL.
fef3106c 926
7332899a 927Wnonnull
cea71f0a 928C ObjC C++ LTO ObjC++ LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
7332899a
MLI
929;
930
bf14eba2
JJ
931Wnonnull-compare
932C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
933;
934
1ef33fd4 935Wnormalized
54d62f51 936C ObjC C++ ObjC++ Warning Alias(Wnormalized=,nfc,none)
1ef33fd4
MLI
937;
938
50668cf6 939Wnormalized=
b559c810 940C ObjC C++ ObjC++ RejectNegative Joined Warning CPP(warn_normalize) CppReason(CPP_W_NORMALIZE) Init(normalized_C) Var(cpp_warn_normalize) Enum(cpp_normalize_level)
54dcd526 941-Wnormalized=[none|id|nfc|nfkc] Warn about non-normalized Unicode strings.
1ef33fd4
MLI
942
943; Required for these enum values.
944SourceInclude
945cpplib.h
946
947Enum
948Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
949
950EnumValue
951Enum(cpp_normalize_level) String(none) Value(normalized_none)
952
953EnumValue
954Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC)
955
956EnumValue
957Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C)
958
959EnumValue
960Enum(cpp_normalize_level) String(nfc) Value(normalized_C)
50668cf6 961
fef3106c 962Wold-style-cast
c662432e 963C++ ObjC++ Var(warn_old_style_cast) Warning
a7b2e184 964Warn if a C-style cast is used in a program.
fef3106c 965
b1ed4cb4 966Wold-style-declaration
95744782 967C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra)
a7b2e184 968Warn for obsolescent usage in a declaration.
b1ed4cb4 969
c034f121 970Wold-style-definition
017c6491 971C ObjC Var(warn_old_style_definition) Init(-1) Warning
a7b2e184 972Warn if an old-style parameter definition is used.
c034f121 973
8b5e1202
SO
974Wopenmp-simd
975C C++ Var(warn_openmp_simd) Warning LangEnabledBy(C C++,Wall)
a7b2e184 976Warn if a simd directive is overridden by the vectorizer cost model.
8b5e1202 977
89a42ac8 978Woverlength-strings
34a180a6 979C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
a7b2e184 980Warn if a string is longer than the maximum portable length specified by the standard.
89a42ac8 981
fef3106c 982Woverloaded-virtual
c662432e 983C++ ObjC++ Var(warn_overloaded_virtual) Warning
a7b2e184 984Warn about overloaded virtual function names.
fef3106c 985
7ed322d7 986Woverride-init
95744782 987C ObjC Var(warn_override_init) Warning EnabledBy(Wextra)
a7b2e184 988Warn about overriding initializers without side effects.
7ed322d7 989
755e528f
MP
990Woverride-init-side-effects
991C ObjC Var(warn_override_init_side_effects) Init(1) Warning
a7b2e184 992Warn about overriding initializers with side effects.
755e528f 993
2cd36c22 994Wpacked-bitfield-compat
bee6fa6d 995C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
a7b2e184 996Warn about packed bit-fields whose offset changed in GCC 4.4.
2cd36c22 997
fef3106c 998Wparentheses
4a0ae68e 999C ObjC C++ ObjC++ Var(warn_parentheses) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1000Warn about possibly missing parentheses.
fef3106c 1001
c1771a20 1002Wpedantic
b559c810 1003C ObjC C++ ObjC++ CPP(cpp_pedantic) CppReason(CPP_W_PEDANTIC) Warning
c1771a20
MLI
1004; Documented in common.opt
1005
79ca9c35
MP
1006Wpessimizing-move
1007C++ ObjC++ Var(warn_pessimizing_move) Warning LangEnabledBy(C++ ObjC++, Wall)
1008Warn about calling std::move on a local object in a return statement preventing copy elision.
1009
fef3106c 1010Wpmf-conversions
c662432e 1011C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
a7b2e184 1012Warn when converting the type of pointers to member functions.
fef3106c
NB
1013
1014Wpointer-arith
44d90fe1 1015C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
a7b2e184 1016Warn about function pointer arithmetic.
fef3106c 1017
4a0ae68e 1018Wpointer-sign
27e51192 1019C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic)
a7b2e184 1020Warn when a pointer differs in signedness in an assignment.
4a0ae68e 1021
a9342885
MP
1022Wpointer-compare
1023C ObjC C++ ObjC++ Var(warn_pointer_compare) Init(1) Warning
1024Warn when a pointer is compared with a zero character constant.
1025
53a2494e 1026Wpointer-to-int-cast
c662432e 1027C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
a7b2e184 1028Warn when a pointer is cast to an integer of a different size.
53a2494e 1029
b9b8dde3 1030Wpragmas
c662432e 1031C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
a7b2e184 1032Warn about misuses of pragmas.
b9b8dde3 1033
8cff0652
VK
1034Wprio-ctor-dtor
1035C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
1036Warn if constructor or destructors with priorities from 0 to 100 are used.
1037
9a179d01
NP
1038Wproperty-assign-default
1039ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning
a7b2e184 1040Warn if a property for an Objective-C object has no assign semantics specified.
9a179d01 1041
fef3106c 1042Wprotocol
c662432e 1043ObjC ObjC++ Var(warn_protocol) Init(1) Warning
a7b2e184 1044Warn if inherited methods are unimplemented.
fef3106c 1045
e2f5cc96 1046Wplacement-new
46cb9332
MS
1047C++ Warning Alias(Wplacement-new=, 1, 0)
1048Warn for placement new expressions with undefined behavior.
1049
1050Wplacement-new=
63010089 1051C++ Joined RejectNegative UInteger Var(warn_placement_new) Init(-1) Warning IntegerRange(0, 2)
eb11eb15 1052Warn for placement new expressions with undefined behavior.
e2f5cc96 1053
fef3106c 1054Wredundant-decls
c662432e 1055C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
a7b2e184 1056Warn about multiple declarations of the same object.
fef3106c 1057
b5be6d0c
MP
1058Wredundant-move
1059C++ ObjC++ Var(warn_redundant_move) Warning LangEnabledBy(C++ ObjC++,Wextra)
1060Warn about redundant calls to std::move.
1061
a2c6e7f2
JJ
1062Wregister
1063C++ ObjC++ Var(warn_register) Warning
1064Warn about uses of register storage specifier.
1065
fef3106c 1066Wreorder
f2bc201f 1067C++ ObjC++ Var(warn_reorder) Warning LangEnabledBy(C++ ObjC++,Wall)
a7b2e184 1068Warn when the compiler reorders code.
fef3106c
NB
1069
1070Wreturn-type
1b6fa695 1071C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) Init(-1)
a7b2e184 1072Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++).
fef3106c 1073
ee45a32d
EB
1074Wscalar-storage-order
1075C ObjC C++ ObjC++ Init(1) Warning
1076Warn on suspicious constructs involving reverse scalar storage order.
1077
fef3106c 1078Wselector
c662432e 1079ObjC ObjC++ Var(warn_selector) Warning
a7b2e184 1080Warn if a selector has multiple methods.
fef3106c 1081
13c21655
PC
1082Wsequence-point
1083C ObjC C++ ObjC++ Var(warn_sequence_point) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1084Warn about possible violations of sequence point rules.
13c21655 1085
dcaaa5a0 1086Wshadow-ivar
dff8943f 1087ObjC ObjC++ Var(warn_shadow_ivar) EnabledBy(Wshadow) Init(1) Warning
a7b2e184 1088Warn if a local declaration hides an instance variable.
dcaaa5a0 1089
451b5e48
MP
1090Wshift-overflow
1091C ObjC C++ ObjC++ Warning Alias(Wshift-overflow=, 1, 0)
a7b2e184 1092Warn if left shift of a signed value overflows.
451b5e48
MP
1093
1094Wshift-overflow=
63010089 1095C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_shift_overflow) Init(-1) Warning IntegerRange(0, 2)
a7b2e184 1096Warn if left shift of a signed value overflows.
451b5e48 1097
13c21655
PC
1098Wshift-count-negative
1099C ObjC C++ ObjC++ Var(warn_shift_count_negative) Init(1) Warning
a7b2e184 1100Warn if shift count is negative.
13c21655
PC
1101
1102Wshift-count-overflow
1103C ObjC C++ ObjC++ Var(warn_shift_count_overflow) Init(1) Warning
a7b2e184 1104Warn if shift count >= width of type.
fef3106c 1105
0173bd2a
MP
1106Wshift-negative-value
1107C ObjC C++ ObjC++ Var(warn_shift_negative_value) Init(-1) Warning
a7b2e184 1108Warn if left shifting a negative value.
0173bd2a 1109
fef3106c 1110Wsign-compare
4a0ae68e 1111C ObjC C++ ObjC++ Var(warn_sign_compare) Warning LangEnabledBy(C++ ObjC++,Wall)
a7b2e184 1112Warn about signed-unsigned comparisons.
fef3106c 1113
4a0ae68e
MLI
1114Wsign-compare
1115C ObjC C++ ObjC++ EnabledBy(Wextra)
1116;
1117
1118Wsign-conversion
63bbf46d 1119C ObjC C++ ObjC++ Var(warn_sign_conversion) Warning LangEnabledBy(C ObjC,Wconversion)
a7b2e184 1120Warn for implicit type conversions between signed and unsigned integers.
4a0ae68e 1121
fef3106c 1122Wsign-promo
c662432e 1123C++ ObjC++ Var(warn_sign_promo) Warning
a7b2e184 1124Warn when overload promotes from unsigned to signed.
fef3106c 1125
b2f97e4a 1126Wstrict-null-sentinel
5498f011 1127C++ ObjC++ Warning Var(warn_strict_null_sentinel)
a7b2e184 1128Warn about uncasted NULL used as sentinel.
b2f97e4a 1129
fef3106c 1130Wstrict-prototypes
c662432e 1131C ObjC Var(warn_strict_prototypes) Warning
a7b2e184 1132Warn about unprototyped function declarations.
fef3106c 1133
65d4f2cd 1134Wstrict-aliasing=
63010089 1135C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0) IntegerRange(0, 3)
65d4f2cd
MLI
1136;
1137
1138Wstrict-overflow=
63010089 1139C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 5)
65d4f2cd
MLI
1140;
1141
6e955430 1142Wstrict-selector-match
c662432e 1143ObjC ObjC++ Var(warn_strict_selector_match) Warning
a7b2e184 1144Warn if type signatures of candidate methods do not match exactly.
6e955430 1145
23462d4d
UB
1146Wsync-nand
1147C C++ Var(warn_sync_nand) Init(1) Warning
a7b2e184 1148Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used.
23462d4d 1149
fef3106c 1150Wsynth
c662432e 1151C++ ObjC++ Var(warn_synth) Warning
a7b2e184 1152Deprecated. This switch has no effect.
fef3106c
NB
1153
1154Wsystem-headers
c662432e 1155C ObjC C++ ObjC++ Warning
9a0f3e86 1156; Documented in common.opt
fef3106c 1157
05b28fd6
MP
1158Wtautological-compare
1159C ObjC C++ ObjC++ Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1160Warn if a comparison always evaluates to true or false.
05b28fd6 1161
8243e2a9
JM
1162Wterminate
1163C++ ObjC++ Warning Var(warn_terminate) Init(1)
a7b2e184 1164Warn if a throw expression will always result in a call to terminate().
8243e2a9 1165
fef3106c 1166Wtraditional
b559c810 1167C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning
a7b2e184 1168Warn about features not present in traditional C.
fef3106c 1169
05170031 1170Wtraditional-conversion
c662432e 1171C ObjC Var(warn_traditional_conversion) Warning
a7b2e184 1172Warn of prototypes causing type conversions different from what would happen in the absence of prototype.
05170031 1173
fef3106c 1174Wtrigraphs
b559c810 1175C ObjC C++ ObjC++ CPP(warn_trigraphs) CppReason(CPP_W_TRIGRAPHS) Var(cpp_warn_trigraphs) Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1176Warn if trigraphs are encountered that might affect the meaning of the program.
fef3106c
NB
1177
1178Wundeclared-selector
c662432e 1179ObjC ObjC++ Var(warn_undeclared_selector) Warning
a7b2e184 1180Warn about @selector()s without previously declared methods.
fef3106c
NB
1181
1182Wundef
b559c810 1183C ObjC C++ ObjC++ CPP(warn_undef) CppReason(CPP_W_UNDEF) Var(cpp_warn_undef) Init(0) Warning
a7b2e184 1184Warn if an undefined macro is used in an #if directive.
fef3106c 1185
4a0ae68e 1186Wuninitialized
cea71f0a 1187C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
4a0ae68e
MLI
1188;
1189
1190Wmaybe-uninitialized
cea71f0a 1191C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
4a0ae68e
MLI
1192;
1193
fef3106c 1194Wunknown-pragmas
34a180a6 1195C ObjC C++ ObjC++ Warning Var(warn_unknown_pragmas) LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0)
a7b2e184 1196Warn about unrecognized pragmas.
fef3106c 1197
6ec637a4
JJ
1198Wunsuffixed-float-constants
1199C ObjC Var(warn_unsuffixed_float_constants) Warning
a7b2e184 1200Warn about unsuffixed float constants.
6ec637a4 1201
4a0ae68e
MLI
1202Wunused
1203C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1204; documented in common.opt
1205
3797cb21 1206Wunused-local-typedefs
650dc14a 1207C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
a7b2e184 1208Warn when typedefs locally defined in a function are not used.
3797cb21 1209
fef3106c 1210Wunused-macros
b559c810 1211C ObjC C++ ObjC++ CppReason(CPP_W_UNUSED_MACROS) Var(cpp_warn_unused_macros) Warning
a7b2e184 1212Warn about macros defined in the main file that are not used.
fef3106c 1213
156f545a
MLI
1214Wunused-result
1215C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning
a7b2e184 1216Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.
156f545a 1217
0f876f22
MW
1218Wunused-variable
1219C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wunused)
1220; documented in common.opt
1221
1222Wunused-const-variable
4246c8da
MW
1223C ObjC C++ ObjC++ Warning Alias(Wunused-const-variable=, 2, 0)
1224Warn when a const variable is unused.
1225
1226Wunused-const-variable=
63010089 1227C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(C ObjC,Wunused-variable, 1, 0) IntegerRange(0, 2)
a7b2e184 1228Warn when a const variable is unused.
0f876f22 1229
e5b79219 1230Wvariadic-macros
27e51192 1231C ObjC C++ ObjC++ CPP(warn_variadic_macros) CppReason(CPP_W_VARIADIC_MACROS) Var(cpp_warn_variadic_macros) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic || Wtraditional)
a7b2e184 1232Warn about using variadic macros.
e5b79219 1233
b9c8da34
DS
1234Wvarargs
1235C ObjC C++ ObjC++ Warning Var(warn_varargs) Init(1)
a7b2e184 1236Warn about questionable usage of the macros used to retrieve variable arguments.
b9c8da34 1237
50d50fc7
SP
1238Wvla
1239C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
a7b2e184 1240Warn if a variable length array is used.
50d50fc7 1241
adc577c5 1242Wvla-larger-than=
00abf86c
MS
1243C ObjC C++ LTO ObjC++ Var(warn_vla_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
1244-Wvla-larger-than=<number> Warn on unbounded uses of variable-length
1245arrays, and on bounded uses of variable-length arrays whose bound can be
adc577c5 1246larger than <number> bytes.
00abf86c
MS
1247<number> bytes.
1248
1249Wno-vla-larger-than
1250C ObjC C++ LTO ObjC++ Alias(Wvla-larger-than=,18446744073709551615EiB,none) Warning
1251-Wno-vla-larger-than Disable Wvla-larger-than= warning. Equivalent to Wvla-larger-than=<SIZE_MAX> or larger.
adc577c5 1252
8a902edb
MP
1253Wvolatile
1254C++ ObjC++ Var(warn_volatile) Warning
1255Warn about deprecated uses of volatile qualifier.
1256
16302daf 1257Wvolatile-register-var
4a0ae68e 1258C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1259Warn when a register variable is declared volatile.
16302daf 1260
6b333269
NS
1261Wvirtual-inheritance
1262C++ ObjC++ Var(warn_virtual_inheritance) Warning
a7b2e184 1263Warn on direct virtual inheritance.
6b333269 1264
f14edc1a
JM
1265Wvirtual-move-assign
1266C++ ObjC++ Var(warn_virtual_move_assign) Warning Init(1)
a7b2e184 1267Warn if a virtual base has a non-trivial move assignment operator.
f14edc1a 1268
fef3106c 1269Wwrite-strings
c662432e 1270C ObjC C++ ObjC++ Var(warn_write_strings) Warning
d8a07487 1271In 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 1272
89401152
PC
1273Wzero-as-null-pointer-constant
1274C++ ObjC++ Var(warn_zero_as_null_pointer_constant) Warning
a7b2e184 1275Warn when a literal '0' is used as null pointer.
89401152 1276
04398fa8
PC
1277Wuseless-cast
1278C++ ObjC++ Var(warn_useless_cast) Warning
a7b2e184 1279Warn about useless casts.
04398fa8 1280
273aa49e
PC
1281Wsubobject-linkage
1282C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1)
a7b2e184 1283Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage.
273aa49e 1284
d6e83a8d
MM
1285Wduplicate-decl-specifier
1286C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall)
1287Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier.
1288
975672f3 1289Wrestrict
cc8bea0a 1290C ObjC C++ ObjC++ Var(warn_restrict) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
975672f3
PK
1291Warn when an argument passed to a restrict-qualified parameter aliases with
1292another argument.
1293
fef3106c
NB
1294ansi
1295C ObjC C++ ObjC++
a7b2e184 1296A synonym for -std=c89 (for C) or -std=c++98 (for C++).
fef3106c
NB
1297
1298d
1299C ObjC C++ ObjC++ Joined
72de27ea 1300; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
fef3106c 1301
62984918
JM
1302fabi-compat-version=
1303C++ ObjC++ Joined RejectNegative UInteger Var(flag_abi_compat_version) Init(-1)
a7b2e184 1304The version of the C++ ABI used for -Wabi warnings and link compatibility aliases.
62984918 1305
fef3106c 1306faccess-control
5498f011 1307C++ ObjC++ Var(flag_access_control) Init(1)
a7b2e184 1308Enforce class member access control semantics.
fef3106c 1309
da5182be
TQ
1310fada-spec-parent=
1311C ObjC C++ ObjC++ RejectNegative Joined Var(ada_specs_parent)
a7b2e184 1312-fada-spec-parent=unit Dump Ada specs as child units of given parent.
da5182be 1313
af63ba4b
JM
1314faligned-new
1315C++ ObjC++ Alias(faligned-new=,1,0)
1316Support C++17 allocation of over-aligned types.
1317
1318faligned-new=
2e1c20b1 1319C++ ObjC++ Joined RejectNegative Var(aligned_new_threshold) UInteger Init(-1)
af63ba4b
JM
1320-faligned-new=<N> Use C++17 over-aligned type allocation for alignments greater than N.
1321
fef3106c 1322fall-virtual
68a57628 1323C++ ObjC++ WarnRemoved
fef3106c 1324
6637388f
TG
1325fallow-parameterless-variadic-functions
1326C ObjC Var(flag_allow_parameterless_variadic_functions)
a7b2e184 1327Allow variadic functions without named parameter.
6637388f 1328
fef3106c 1329falt-external-templates
68a57628 1330C++ ObjC++ WarnRemoved
a7b2e184 1331No longer supported.
fef3106c
NB
1332
1333fasm
5498f011 1334C ObjC C++ ObjC++ Var(flag_no_asm, 0)
a7b2e184 1335Recognize the \"asm\" keyword.
fef3106c 1336
10e48e39
RO
1337; Define extra predefined macros for use in libgcc.
1338fbuilding-libgcc
1339C ObjC C++ ObjC++ Undocumented Var(flag_building_libgcc)
1340
fef3106c 1341fbuiltin
5498f011 1342C ObjC C++ ObjC++ Var(flag_no_builtin, 0)
a7b2e184 1343Recognize built-in functions.
fef3106c
NB
1344
1345fbuiltin-
1346C ObjC C++ ObjC++ Joined
1347
5dc99c46
SB
1348fcanonical-system-headers
1349C ObjC C++ ObjC++
1350Where shorter, use canonicalized paths to systems headers.
1351
2d91f79d
TH
1352fchar8_t
1353C++ ObjC++ Var(flag_char8_t) Init(-1)
1354Enable the char8_t fundamental type and use it as the type for UTF-8 string
1355and character literals.
1356
d5e254e1 1357fcheck-pointer-bounds
68a57628 1358C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1359Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1360
1361fchkp-check-incomplete-type
68a57628 1362C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1363Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1364
1365fchkp-zero-input-bounds-for-main
68a57628 1366C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1367Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1368
1369fchkp-first-field-has-own-bounds
68a57628 1370C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
f48ef52e 1371Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1372
1373fchkp-narrow-bounds
68a57628 1374C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1375Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1376
1377fchkp-narrow-to-innermost-array
68a57628 1378C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
f48ef52e 1379Removed in GCC 9. This switch has no effect.
8ba4f506
AI
1380
1381fchkp-flexible-struct-trailing-arrays
68a57628 1382C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1383Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1384
1385fchkp-optimize
68a57628 1386C ObjC C++ ObjC++ LTO WarnRemoved
d5e254e1
IE
1387
1388fchkp-use-fast-string-functions
68a57628 1389C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1390Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1391
1392fchkp-use-nochk-string-functions
68a57628 1393C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1394Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1395
1396fchkp-use-static-bounds
68a57628 1397C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1398Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1399
1400fchkp-use-static-const-bounds
68a57628 1401C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1402Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1403
1404fchkp-treat-zero-dynamic-size-as-infinite
68a57628 1405C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1406Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1407
1408fchkp-check-read
68a57628 1409C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1410Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1411
1412fchkp-check-write
68a57628 1413C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1414Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1415
1416fchkp-store-bounds
68a57628 1417C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1418Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1419
1420fchkp-instrument-calls
68a57628 1421C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1422Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1423
1424fchkp-instrument-marked-only
68a57628 1425C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1426Removed in GCC 9. This switch has no effect.
d5e254e1 1427
226d62d2 1428fchkp-use-wrappers
68a57628 1429C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1430Removed in GCC 9. This switch has no effect.
226d62d2 1431
5373cd33 1432static-libmpx
68a57628 1433Driver WarnRemoved
f48ef52e 1434Removed in GCC 9. This switch has no effect.
5373cd33 1435
d2d7e672 1436static-libmpxwrappers
68a57628 1437Driver WarnRemoved
f48ef52e 1438Removed in GCC 9. This switch has no effect.
d2d7e672 1439
c0c12356
ML
1440fcilkplus
1441C ObjC C++ ObjC++ LTO Undocumented Ignore
f48ef52e 1442Removed in GCC 8. This switch has no effect.
36536d79 1443
971e17ff
AS
1444fconcepts
1445C++ ObjC++ Var(flag_concepts)
a7b2e184 1446Enable support for C++ concepts.
971e17ff 1447
cb57504a
JM
1448fconcepts-ts
1449C++ ObjC++ Var(flag_concepts_ts) Init(0)
1450Enable certain features present in the Concepts TS.
1451
fef3106c
NB
1452fcond-mismatch
1453C ObjC C++ ObjC++
a7b2e184 1454Allow the arguments of the '?' operator to have different types.
fef3106c
NB
1455
1456fconserve-space
c0c12356 1457C++ ObjC++ Ignore
6f07a821 1458Does nothing. Preserved for backward compatibility.
fef3106c 1459
fef3106c 1460fconstant-string-class=
61ff2bdc 1461ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
a7b2e184 1462-fconst-string-class=<name> Use class <name> for constant strings.
fef3106c 1463
17bc631c 1464fconstexpr-depth=
49a000c3 1465C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512)
a7b2e184 1466-fconstexpr-depth=<number> Specify maximum constexpr recursion depth.
17bc631c 1467
7ffc7de5
JM
1468fconstexpr-cache-depth=
1469C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_cache_depth) Init(8)
1470-fconstexpr-cache-depth=<number> Specify maximum constexpr recursion cache depth.
1471
5ec2cd9f
JM
1472fconstexpr-loop-limit=
1473C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_loop_limit) Init(262144)
1474-fconstexpr-loop-limit=<number> Specify maximum constexpr loop iteration count.
1475
a15ffa22
JJ
1476fconstexpr-ops-limit=
1477C++ ObjC++ Joined RejectNegative Host_Wide_Int Var(constexpr_ops_limit) Init(33554432)
1478-fconstexpr-ops-limit=<number> Specify maximum number of constexpr operations during a single constexpr evaluation.
1479
847e697a
TT
1480fdebug-cpp
1481C ObjC C++ ObjC++
a7b2e184 1482Emit debug annotations during preprocessing.
847e697a 1483
5f5babf1 1484fdeduce-init-list
db9d2274
MP
1485C++ ObjC++ Ignore
1486Does nothing. Preserved for backward compatibility.
5f5babf1 1487
1f26ac87
JM
1488fdeclone-ctor-dtor
1489C++ ObjC++ Var(flag_declone_ctor_dtor) Init(-1)
a7b2e184 1490Factor complex constructors and destructors to favor space over speed.
1f26ac87 1491
fef3106c 1492fdefault-inline
2d2bd949 1493C++ ObjC++ Ignore
5498f011 1494Does nothing. Preserved for backward compatibility.
fef3106c 1495
f012c8ef
DM
1496fdiagnostics-show-template-tree
1497C++ ObjC++ Var(flag_diagnostics_show_template_tree) Init(0)
1498Print hierarchical comparisons when template types are mismatched.
1499
ccfc4c91
OW
1500fdirectives-only
1501C ObjC C++ ObjC++
1502Preprocess directives only.
1503
fef3106c
NB
1504fdollars-in-identifiers
1505C ObjC C++ ObjC++
a7b2e184 1506Permit '$' as an identifier character.
fef3106c 1507
7365279f
BK
1508fmacro-prefix-map=
1509C ObjC C++ ObjC++ Joined RejectNegative
1510-fmacro-prefix-map=<old>=<new> Map one directory name to another in __FILE__, __BASE_FILE__, and __builtin_FILE().
1511
3b78de56
AC
1512fdump-ada-spec
1513C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec)
a7b2e184 1514Write all declarations as Ada code transitively.
3b78de56
AC
1515
1516fdump-ada-spec-slim
1517C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec_slim)
a7b2e184 1518Write all declarations as Ada code for the given file only.
3b78de56 1519
fef3106c 1520felide-constructors
5498f011 1521C++ ObjC++ Var(flag_elide_constructors) Init(1)
fef3106c 1522
f012c8ef
DM
1523felide-type
1524C++ ObjC++ Var(flag_elide_type) Init(1)
1525-fno-elide-type Do not elide common elements in template comparisons.
1526
fef3106c 1527fenforce-eh-specs
5498f011 1528C++ ObjC++ Var(flag_enforce_eh_specs) Init(1)
a7b2e184 1529Generate code to check exception specifications.
fef3106c
NB
1530
1531fenum-int-equiv
68a57628 1532C++ ObjC++ WarnRemoved
fef3106c 1533
e6cc3a24
ZW
1534fexec-charset=
1535C ObjC C++ ObjC++ Joined RejectNegative
a7b2e184 1536-fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
e6cc3a24 1537
af15a2fe
JM
1538fextended-identifiers
1539C ObjC C++ ObjC++
a7b2e184 1540Permit universal character names (\\u and \\U) in identifiers.
af15a2fe 1541
16dd5cfe
EC
1542finput-charset=
1543C ObjC C++ ObjC++ Joined RejectNegative
a7b2e184 1544-finput-charset=<cset> Specify the default character set for source files.
16dd5cfe 1545
5af057d8
JM
1546fextern-tls-init
1547C++ ObjC++ Var(flag_extern_tls_init) Init(-1)
a7b2e184 1548Support dynamic initialization of thread-local variables in a different translation unit.
16dd5cfe 1549
fef3106c 1550fexternal-templates
68a57628 1551C++ ObjC++ WarnRemoved
fef3106c 1552
fef3106c 1553ffor-scope
68a57628 1554C++ ObjC++ WarnRemoved
fef3106c
NB
1555
1556ffreestanding
820b51ae 1557C ObjC C++ ObjC++
a7b2e184 1558Do not assume that standard C libraries and \"main\" exist.
fef3106c
NB
1559
1560fgnu-keywords
5498f011 1561C++ ObjC++ Var(flag_no_gnu_keywords, 0)
a7b2e184 1562Recognize GNU-defined keywords.
fef3106c
NB
1563
1564fgnu-runtime
fb5610fb 1565ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime,0) Init(NEXT_OBJC_RUNTIME)
a7b2e184 1566Generate code for GNU runtime environment.
fef3106c 1567
da1c7394 1568fgnu89-inline
2cbac420 1569C ObjC Var(flag_gnu89_inline) Init(-1)
a7b2e184 1570Use traditional GNU semantics for inline functions.
da1c7394 1571
fef3106c 1572fguiding-decls
68a57628 1573C++ ObjC++ WarnRemoved
fef3106c
NB
1574
1575fhandle-exceptions
63b8a166 1576C++ ObjC++ Optimization Alias(fexceptions) Warn({%<-fhandle-exceptions%> has been renamed %<-fexceptions%> (and is now on by default)})
fef3106c
NB
1577
1578fhonor-std
68a57628 1579C++ ObjC++ WarnRemoved
fef3106c
NB
1580
1581fhosted
1582C ObjC
a7b2e184 1583Assume normal C execution environment.
fef3106c
NB
1584
1585fhuge-objects
68a57628 1586C++ ObjC++ WarnRemoved
a7b2e184 1587No longer supported.
fef3106c
NB
1588
1589fimplement-inlines
5498f011 1590C++ ObjC++ Var(flag_implement_inlines) Init(1)
a7b2e184 1591Export functions even if they can be inlined.
fef3106c
NB
1592
1593fimplicit-inline-templates
5498f011 1594C++ ObjC++ Var(flag_implicit_inline_templates) Init(1)
a7b2e184 1595Emit implicit instantiations of inline templates.
fef3106c
NB
1596
1597fimplicit-templates
5498f011 1598C++ ObjC++ Var(flag_implicit_templates) Init(1)
a7b2e184 1599Emit implicit instantiations of templates.
fef3106c 1600
31f7f784
JM
1601fnew-inheriting-ctors
1602C++ ObjC++ Var(flag_new_inheriting_ctors) Init(1)
1603Implement C++17 inheriting constructor semantics.
1604
d63d5d0c 1605ffriend-injection
68a57628 1606C++ ObjC++ WarnRemoved
d63d5d0c 1607
47ea1edf
DK
1608fkeep-inline-dllexport
1609C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Report Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES)
a7b2e184 1610Don't emit dllexported inline functions unless needed.
47ea1edf 1611
fef3106c 1612flabels-ok
68a57628 1613C++ ObjC++ WarnRemoved
fef3106c 1614
00c8e9f6 1615flax-vector-conversions
5498f011 1616C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
00c8e9f6
MS
1617Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
1618
1c6ffbab
QZ
1619fmax-include-depth=
1620C ObjC C++ ObjC++ Joined RejectNegative UInteger
1621fmax-include-depth=<number> Set the maximum depth of the nested #include.
1622
fef3106c 1623fms-extensions
5498f011 1624C ObjC C++ ObjC++ Var(flag_ms_extensions)
a7b2e184 1625Don't warn about uses of Microsoft extensions.
fef3106c 1626
5720c0dc 1627fmudflap
68a57628 1628C ObjC C++ ObjC++ WarnRemoved
5720c0dc
RG
1629
1630fmudflapth
68a57628 1631C ObjC C++ ObjC++ WarnRemoved
5720c0dc
RG
1632
1633fmudflapir
68a57628 1634C ObjC C++ ObjC++ WarnRemoved
5720c0dc 1635
fef3106c 1636fname-mangling-version-
68a57628 1637C++ ObjC++ Joined WarnRemoved
fef3106c
NB
1638
1639fnew-abi
68a57628 1640C++ ObjC++ WarnRemoved
fef3106c 1641
31bfc9b9
JM
1642fnew-ttp-matching
1643C++ ObjC++ Var(flag_new_ttp)
1644Implement resolution of DR 150 for matching of template template arguments.
1645
fef3106c 1646fnext-runtime
fb5610fb 1647ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime)
a7b2e184 1648Generate code for NeXT (Apple Mac OS X) runtime environment.
264fa2db
ZL
1649
1650fnil-receivers
5498f011 1651ObjC ObjC++ Var(flag_nil_receivers) Init(1)
a7b2e184 1652Assume that receivers of Objective-C messages may be nil.
fef3106c 1653
dcaaa5a0
DP
1654flocal-ivars
1655ObjC ObjC++ Var(flag_local_ivars) Init(1)
1656Allow access to instance variables as if they were local declarations within instance method implementations.
1657
1658fivar-visibility=
1659ObjC ObjC++ Joined RejectNegative Enum(ivar_visibility) Var(default_ivar_visibility) Init(IVAR_VISIBILITY_PROTECTED)
a7b2e184 1660-fvisibility=[private|protected|public|package] Set the default symbol visibility.
dcaaa5a0
DP
1661
1662Enum
1663Name(ivar_visibility) Type(enum ivar_visibility) UnknownError(unrecognized ivar visibility value %qs)
1664
1665EnumValue
1666Enum(ivar_visibility) String(private) Value(IVAR_VISIBILITY_PRIVATE)
1667
1668EnumValue
1669Enum(ivar_visibility) String(protected) Value(IVAR_VISIBILITY_PROTECTED)
1670
1671EnumValue
1672Enum(ivar_visibility) String(public) Value(IVAR_VISIBILITY_PUBLIC)
1673
1674EnumValue
1675Enum(ivar_visibility) String(package) Value(IVAR_VISIBILITY_PACKAGE)
1676
fef3106c 1677fnonansi-builtins
5498f011 1678C++ ObjC++ Var(flag_no_nonansi_builtin, 0)
fef3106c
NB
1679
1680fnonnull-objects
68a57628 1681C++ ObjC++ WarnRemoved
fef3106c 1682
9feb3d6a
JM
1683fnothrow-opt
1684C++ ObjC++ Optimization Var(flag_nothrow_opt)
a7b2e184 1685Treat a throw() exception specification as noexcept to improve code size.
9feb3d6a 1686
0a256240 1687fobjc-abi-version=
fb5610fb 1688ObjC ObjC++ LTO Joined Report RejectNegative UInteger Var(flag_objc_abi)
0a256240
NP
1689Specify which ABI to use for Objective-C family code and meta-data generation.
1690
6e955430
ZL
1691; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
1692; to initialize any non-POD ivars in Objective-C++ classes.
1693fobjc-call-cxx-cdtors
1694ObjC++ Var(flag_objc_call_cxx_cdtors)
a7b2e184 1695Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed.
6e955430
ZL
1696
1697fobjc-direct-dispatch
1698ObjC ObjC++ Var(flag_objc_direct_dispatch)
a7b2e184 1699Allow fast jumps to the message dispatcher.
6e955430
ZL
1700
1701; Nonzero means that we will allow new ObjC exception syntax (@throw,
1702; @try, etc.) in source code.
264fa2db 1703fobjc-exceptions
6e955430 1704ObjC ObjC++ Var(flag_objc_exceptions)
a7b2e184 1705Enable Objective-C exception and synchronization syntax.
264fa2db 1706
6e955430 1707fobjc-gc
fb5610fb 1708ObjC ObjC++ LTO Var(flag_objc_gc)
a7b2e184 1709Enable garbage collection (GC) in Objective-C/Objective-C++ programs.
6e955430 1710
0a256240
NP
1711fobjc-nilcheck
1712ObjC ObjC++ Var(flag_objc_nilcheck,1)
1713Enable inline checks for nil receivers with the NeXT runtime and ABI version 2.
1714
6e955430 1715; Nonzero means that we generate NeXT setjmp based exceptions.
093c7153 1716fobjc-sjlj-exceptions
6e955430 1717ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
a7b2e184 1718Enable Objective-C setjmp exception handling runtime.
093c7153 1719
22d8d616
NP
1720fobjc-std=objc1
1721ObjC ObjC++ Var(flag_objc1_only)
a7b2e184 1722Conform to the Objective-C 1.0 language as implemented in GCC 4.0.
22d8d616 1723
41dbbb37 1724fopenacc
a0c88d06 1725C ObjC C++ ObjC++ LTO Var(flag_openacc)
a7b2e184 1726Enable OpenACC.
41dbbb37 1727
b6adbb9f
NS
1728fopenacc-dim=
1729C ObjC C++ ObjC++ LTO Joined Var(flag_openacc_dims)
1730Specify default OpenACC compute dimensions.
1731
953ff289 1732fopenmp
1506ae0e 1733C ObjC C++ ObjC++ LTO Var(flag_openmp)
a7b2e184 1734Enable OpenMP (implies -frecursive in Fortran).
953ff289 1735
6d7f7e0a
TB
1736fopenmp-simd
1737C ObjC C++ ObjC++ Var(flag_openmp_simd)
a7b2e184 1738Enable OpenMP's SIMD directives.
6d7f7e0a 1739
fef3106c
NB
1740foperator-names
1741C++ ObjC++
a7b2e184 1742Recognize C++ keywords like \"compl\" and \"xor\".
fef3106c
NB
1743
1744foptional-diags
2d2bd949 1745C++ ObjC++ Ignore
5498f011 1746Does nothing. Preserved for backward compatibility.
fef3106c
NB
1747
1748fpch-deps
1749C ObjC C++ ObjC++
1750
c0d578e6
GK
1751fpch-preprocess
1752C ObjC C++ ObjC++
a7b2e184 1753Look for and use PCH files even when preprocessing.
c0d578e6 1754
fef3106c 1755fpermissive
0c3641b0 1756C++ ObjC++ Var(flag_permissive)
a7b2e184 1757Downgrade conformance errors to warnings.
fef3106c 1758
478a1c5b
ILT
1759fplan9-extensions
1760C ObjC Var(flag_plan9_extensions)
a7b2e184 1761Enable Plan 9 language extensions.
478a1c5b 1762
fef3106c
NB
1763fpreprocessed
1764C ObjC C++ ObjC++
a7b2e184 1765Treat the input file as already preprocessed.
fef3106c 1766
92582b75
TT
1767ftrack-macro-expansion
1768C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
1769; converted into ftrack-macro-expansion=
1770
1771ftrack-macro-expansion=
1772C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
a7b2e184 1773-ftrack-macro-expansion=<0|1|2> Track locations of tokens coming from macro expansion and display them in error messages.
92582b75 1774
6ea2bd47 1775fpretty-templates
5498f011 1776C++ ObjC++ Var(flag_pretty_templates) Init(1)
a7b2e184 1777-fno-pretty-templates Do not pretty-print template specializations as the template signature followed by the arguments.
6ea2bd47 1778
88d0c3f0 1779fprintf-return-value
89990732 1780C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(1)
88d0c3f0
MS
1781Treat known sprintf return values as constants.
1782
264fa2db 1783freplace-objc-classes
fb5610fb 1784ObjC ObjC++ LTO Var(flag_replace_objc_classes)
a7b2e184 1785Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
264fa2db 1786
fef3106c 1787frepo
68a57628 1788C++ ObjC++ WarnRemoved
f48ef52e 1789Removed in GCC 10. This switch has no effect.
fef3106c
NB
1790
1791frtti
5498f011 1792C++ ObjC++ Optimization Var(flag_rtti) Init(1)
a7b2e184 1793Generate run time type descriptor information.
fef3106c 1794
fef3106c 1795fshort-enums
dd6fe7d4 1796C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums)
a7b2e184 1797Use the narrowest integer type possible for enumeration types.
fef3106c
NB
1798
1799fshort-wchar
dd6fe7d4 1800C ObjC C++ ObjC++ LTO Optimization Var(flag_short_wchar)
a7b2e184 1801Force the underlying type for \"wchar_t\" to be \"unsigned short\".
fef3106c 1802
fef3106c 1803fsigned-bitfields
5498f011 1804C ObjC C++ ObjC++ Var(flag_signed_bitfields) Init(1)
a7b2e184 1805When \"signed\" or \"unsigned\" is not given make the bitfield signed.
fef3106c
NB
1806
1807fsigned-char
5498f011 1808C ObjC C++ ObjC++ LTO Var(flag_signed_char)
a7b2e184 1809Make \"char\" signed by default.
fef3106c 1810
20b06add
JM
1811fsized-deallocation
1812C++ ObjC++ Var(flag_sized_deallocation) Init(-1)
a7b2e184 1813Enable C++14 sized deallocation support.
20b06add 1814
fef3106c 1815fsquangle
68a57628 1816C++ ObjC++ WarnRemoved
fef3106c 1817
ee45a32d 1818fsso-struct=
fc73e60c 1819C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE)
4e89adf9 1820-fsso-struct=[big-endian|little-endian|native] Set the default scalar storage order.
ee45a32d
EB
1821
1822Enum
1823Name(sso_struct) Type(enum scalar_storage_order_kind) UnknownError(unrecognized scalar storage order value %qs)
1824
1825EnumValue
1826Enum(sso_struct) String(big-endian) Value(SSO_BIG_ENDIAN)
1827
1828EnumValue
1829Enum(sso_struct) String(little-endian) Value(SSO_LITTLE_ENDIAN)
1830
4e89adf9
EB
1831EnumValue
1832Enum(sso_struct) String(native) Value(SSO_NATIVE)
1833
fef3106c 1834fstats
5498f011 1835C++ ObjC++ Var(flag_detailed_statistics)
a7b2e184 1836Display statistics accumulated during compilation.
fef3106c 1837
cbb4feb3
JM
1838fstrict-enums
1839C++ ObjC++ Optimization Var(flag_strict_enums)
a7b2e184 1840Assume that values of enumeration type are always within the minimum range of that type.
cbb4feb3 1841
fef3106c 1842fstrict-prototype
68a57628 1843C++ ObjC++ WarnRemoved
fef3106c 1844
d0cf395a
JM
1845fstrong-eval-order
1846C++ ObjC++ Common Alias(fstrong-eval-order=, all, none)
1847Follow the C++17 evaluation order requirements for assignment expressions,
1848shift, member function calls, etc.
1849
1850fstrong-eval-order=
d4a6c0ea 1851C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1)
d0cf395a
JM
1852Follow the C++17 evaluation order requirements for assignment expressions,
1853shift, member function calls, etc.
1854
1855Enum
1856Name(strong_eval_order) Type(int)
1857
1858EnumValue
1859Enum(strong_eval_order) String(none) Value(0)
1860
1861EnumValue
1862Enum(strong_eval_order) String(some) Value(1)
1863
1864EnumValue
1865Enum(strong_eval_order) String(all) Value(2)
1866
fef3106c 1867ftabstop=
7b086b11 1868C ObjC C++ ObjC++ Joined RejectNegative UInteger
a7b2e184 1869-ftabstop=<number> Distance between tab stops for column reporting.
fef3106c 1870
a12bf402
MLI
1871ftemplate-backtrace-limit=
1872C++ ObjC++ Joined RejectNegative UInteger Var(template_backtrace_limit) Init(10)
a7b2e184 1873Set the maximum number of template instantiation notes for a single warning or error.
a12bf402 1874
fef3106c 1875ftemplate-depth-
5de8299c 1876C++ ObjC++ Joined RejectNegative Undocumented Alias(ftemplate-depth=)
124e0d27
MLI
1877
1878ftemplate-depth=
c22cacf3 1879C++ ObjC++ Joined RejectNegative UInteger
a7b2e184 1880-ftemplate-depth=<number> Specify maximum template instantiation depth.
fef3106c
NB
1881
1882fthis-is-variable
68a57628 1883C++ ObjC++ WarnRemoved
fef3106c 1884
40aac948 1885fthreadsafe-statics
5498f011 1886C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
a7b2e184 1887-fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
40aac948 1888
fef3106c 1889funsigned-bitfields
f0036cca 1890C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)
a7b2e184 1891When \"signed\" or \"unsigned\" is not given make the bitfield unsigned.
fef3106c
NB
1892
1893funsigned-char
f0036cca 1894C ObjC C++ ObjC++ LTO Var(flag_signed_char, 0)
a7b2e184 1895Make \"char\" unsigned by default.
fef3106c
NB
1896
1897fuse-cxa-atexit
5498f011 1898C++ ObjC++ Var(flag_use_cxa_atexit) Init(DEFAULT_USE_CXA_ATEXIT)
a7b2e184 1899Use __cxa_atexit to register destructors.
fef3106c 1900
c7b5e395 1901fuse-cxa-get-exception-ptr
5498f011 1902C++ ObjC++ Var(flag_use_cxa_get_exception_ptr) Init(2)
a7b2e184 1903Use __cxa_get_exception_ptr in exception handling.
c7b5e395 1904
d7afec4b 1905fvisibility-inlines-hidden
d0b07283 1906C++ ObjC++
a7b2e184 1907Marks all inlined functions and methods as having hidden visibility.
d7afec4b 1908
ddbfd28d
GK
1909fvisibility-ms-compat
1910C++ ObjC++ Var(flag_visibility_ms_compat)
a7b2e184 1911Changes visibility to match Microsoft Visual Studio by default.
ddbfd28d 1912
fef3106c 1913fvtable-gc
68a57628 1914C++ ObjC++ WarnRemoved
a7b2e184 1915No longer supported.
fef3106c
NB
1916
1917fvtable-thunks
68a57628 1918C++ ObjC++ WarnRemoved
a7b2e184 1919No longer supported.
fef3106c
NB
1920
1921fweak
5498f011 1922C++ ObjC++ Var(flag_weak) Init(1)
a7b2e184 1923Emit common-like symbols as weak symbols.
fef3106c 1924
e6cc3a24
ZW
1925fwide-exec-charset=
1926C ObjC C++ ObjC++ Joined RejectNegative
a7b2e184 1927-fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>.
e6cc3a24 1928
b20d9f0c 1929fworking-directory
5498f011 1930C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1)
a7b2e184 1931Generate a #line directive pointing at the current working directory.
b20d9f0c 1932
fef3106c 1933fxref
68a57628 1934C++ ObjC++ WarnRemoved
a7b2e184 1935No longer supported.
fef3106c 1936
264fa2db 1937fzero-link
5498f011 1938ObjC ObjC++ Var(flag_zero_link)
a7b2e184 1939Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode.
264fa2db 1940
fef3106c 1941gen-decls
9ed32e27 1942ObjC ObjC++ Driver Var(flag_gen_declaration) RejectNegative
a7b2e184 1943Dump declarations to a .decl file.
fef3106c 1944
39ef6592
LC
1945femit-struct-debug-baseonly
1946C ObjC C++ ObjC++
a7b2e184 1947-femit-struct-debug-baseonly Aggressive reduced debug info for structs.
39ef6592
LC
1948
1949femit-struct-debug-reduced
1950C ObjC C++ ObjC++
a7b2e184 1951-femit-struct-debug-reduced Conservative reduced debug info for structs.
39ef6592
LC
1952
1953femit-struct-debug-detailed=
1954C ObjC C++ ObjC++ Joined
a7b2e184 1955-femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs.
39ef6592 1956
a4a0016d 1957fext-numeric-literals
dcb466ec 1958C++ ObjC++ Var(flag_ext_numeric_literals) Init(1)
a4a0016d
ESR
1959Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding
1960number literal rather than a user-defined number literal.
1961
fef3106c 1962idirafter
61ff2bdc 1963C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1964-idirafter <dir> Add <dir> to the end of the system include path.
fef3106c
NB
1965
1966imacros
61ff2bdc 1967C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
a7b2e184 1968-imacros <file> Accept definition of macros in <file>.
fef3106c 1969
2b6dd222
JM
1970imultilib
1971C ObjC C++ ObjC++ Joined Separate
a7b2e184 1972-imultilib <dir> Set <dir> to be the multilib include subdirectory.
2b6dd222 1973
fef3106c 1974include
61ff2bdc 1975C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
a7b2e184 1976-include <file> Include the contents of <file> before other files.
fef3106c
NB
1977
1978iprefix
1979C ObjC C++ ObjC++ Joined Separate
a7b2e184 1980-iprefix <path> Specify <path> as a prefix for next two options.
fef3106c
NB
1981
1982isysroot
61ff2bdc 1983C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1984-isysroot <dir> Set <dir> to be the system root directory.
fef3106c
NB
1985
1986isystem
61ff2bdc 1987C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1988-isystem <dir> Add <dir> to the start of the system include path.
fef3106c 1989
4bed3787 1990iquote
61ff2bdc 1991C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1992-iquote <dir> Add <dir> to the end of the quote include path.
4bed3787 1993
fef3106c
NB
1994iwithprefix
1995C ObjC C++ ObjC++ Joined Separate
a7b2e184 1996-iwithprefix <dir> Add <dir> to the end of the system include path.
fef3106c
NB
1997
1998iwithprefixbefore
1999C ObjC C++ ObjC++ Joined Separate
a7b2e184 2000-iwithprefixbefore <dir> Add <dir> to the end of the main include path.
fef3106c
NB
2001
2002lang-asm
603349bf 2003C Undocumented RejectDriver
fef3106c 2004
e200444e
JM
2005no-integrated-cpp
2006Driver
2007
fef3106c
NB
2008nostdinc
2009C ObjC C++ ObjC++
a7b2e184 2010Do not search standard system include directories (those specified with -isystem will still be used).
fef3106c
NB
2011
2012nostdinc++
72de27ea 2013C++ ObjC++
a7b2e184 2014Do not search standard system include directories for C++.
fef3106c
NB
2015
2016o
2017C ObjC C++ ObjC++ Joined Separate
72de27ea 2018; Documented in common.opt
fef3106c
NB
2019
2020pedantic
c1771a20 2021C ObjC C++ ObjC++ Alias(Wpedantic)
72de27ea 2022; Documented in common.opt
fef3106c 2023
fef3106c
NB
2024print-objc-runtime-info
2025ObjC ObjC++
a7b2e184 2026Generate C header of platform-specific features.
fef3106c
NB
2027
2028remap
2029C ObjC C++ ObjC++
a7b2e184 2030Remap file names when including files.
fef3106c
NB
2031
2032std=c++98
2033C++ ObjC++
a7b2e184 2034Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
c7dc8804
JM
2035
2036std=c++03
2037C++ ObjC++ Alias(std=c++98)
a7b2e184 2038Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
fef3106c 2039
97e3ad20 2040std=c++11
966541e3 2041C++ ObjC++
a7b2e184 2042Conform to the ISO 2011 C++ standard.
97e3ad20
JM
2043
2044std=c++0x
70e24808 2045C++ ObjC++ Alias(std=c++11) Undocumented
a7b2e184 2046Deprecated in favor of -std=c++11.
966541e3 2047
552b8185 2048std=c++1y
028aee17 2049C++ ObjC++ Alias(std=c++14) Undocumented
a7b2e184 2050Deprecated in favor of -std=c++14.
70e24808
JM
2051
2052std=c++14
381bf11e 2053C++ ObjC++
a7b2e184 2054Conform to the ISO 2014 C++ standard.
552b8185 2055
da73100b 2056std=c++1z
7b936140
JJ
2057C++ ObjC++ Alias(std=c++17) Undocumented
2058Deprecated in favor of -std=c++17.
da73100b
JM
2059
2060std=c++17
7b936140
JJ
2061C++ ObjC++
2062Conform to the ISO 2017 C++ standard.
da73100b 2063
026a79f7
AS
2064std=c++2a
2065C++ ObjC++
2066Conform to the ISO 2020(?) C++ draft standard (experimental and incomplete support).
2067
48b0b196 2068std=c11
2778d766 2069C ObjC
a7b2e184 2070Conform to the ISO 2011 C standard.
48b0b196
JM
2071
2072std=c1x
2073C ObjC Alias(std=c11)
a7b2e184 2074Deprecated in favor of -std=c11.
2778d766 2075
c76dc9c3
JM
2076std=c17
2077C ObjC
7a8a92c4 2078Conform to the ISO 2017 C standard (published in 2018).
1e39313a
JM
2079
2080std=c18
2081C ObjC Alias(std=c17)
7a8a92c4 2082Conform to the ISO 2017 C standard (published in 2018).
c76dc9c3 2083
9f936c86
JM
2084std=c2x
2085C ObjC
2086Conform to the ISO 202X C standard draft (experimental and incomplete support).
2087
fef3106c 2088std=c89
5de8299c 2089C ObjC Alias(std=c90)
a7b2e184 2090Conform to the ISO 1990 C standard.
fef3106c 2091
7e1542b9
MLI
2092std=c90
2093C ObjC
a7b2e184 2094Conform to the ISO 1990 C standard.
7e1542b9 2095
fef3106c
NB
2096std=c99
2097C ObjC
a7b2e184 2098Conform to the ISO 1999 C standard.
fef3106c
NB
2099
2100std=c9x
5de8299c 2101C ObjC Alias(std=c99)
a7b2e184 2102Deprecated in favor of -std=c99.
fef3106c
NB
2103
2104std=gnu++98
2105C++ ObjC++
97e3ad20 2106Conform to the ISO 1998 C++ standard revised by the 2003 technical
a7b2e184 2107corrigendum with GNU extensions.
fef3106c 2108
97e3ad20
JM
2109std=gnu++03
2110C++ ObjC++ Alias(std=gnu++98)
2111Conform to the ISO 1998 C++ standard revised by the 2003 technical
a7b2e184 2112corrigendum with GNU extensions.
97e3ad20
JM
2113
2114std=gnu++11
966541e3 2115C++ ObjC++
a7b2e184 2116Conform to the ISO 2011 C++ standard with GNU extensions.
97e3ad20
JM
2117
2118std=gnu++0x
381bf11e 2119C++ ObjC++ Alias(std=gnu++11) Undocumented
a7b2e184 2120Deprecated in favor of -std=gnu++11.
966541e3 2121
552b8185 2122std=gnu++1y
028aee17 2123C++ ObjC++ Alias(std=gnu++14) Undocumented
a7b2e184 2124Deprecated in favor of -std=gnu++14.
552b8185 2125
a07f6ed2 2126std=gnu++14
028aee17 2127C++ ObjC++
a7b2e184 2128Conform to the ISO 2014 C++ standard with GNU extensions.
a07f6ed2 2129
da73100b 2130std=gnu++1z
7b936140
JJ
2131C++ ObjC++ Alias(std=gnu++17) Undocumented
2132Deprecated in favor of -std=gnu++17.
da73100b
JM
2133
2134std=gnu++17
7b936140
JJ
2135C++ ObjC++
2136Conform to the ISO 2017 C++ standard with GNU extensions.
da73100b 2137
026a79f7
AS
2138std=gnu++2a
2139C++ ObjC++
2140Conform to the ISO 2020(?) C++ draft standard with GNU extensions (experimental and incomplete support).
2141
48b0b196 2142std=gnu11
2778d766 2143C ObjC
a7b2e184 2144Conform to the ISO 2011 C standard with GNU extensions.
48b0b196
JM
2145
2146std=gnu1x
2147C ObjC Alias(std=gnu11)
a7b2e184 2148Deprecated in favor of -std=gnu11.
2778d766 2149
c76dc9c3
JM
2150std=gnu17
2151C ObjC
7a8a92c4 2152Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
1e39313a
JM
2153
2154std=gnu18
2155C ObjC Alias(std=gnu17)
7a8a92c4 2156Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
c76dc9c3 2157
9f936c86
JM
2158std=gnu2x
2159C ObjC
2160Conform to the ISO 202X C standard draft with GNU extensions (experimental and incomplete support).
2161
fef3106c 2162std=gnu89
5de8299c 2163C ObjC Alias(std=gnu90)
a7b2e184 2164Conform to the ISO 1990 C standard with GNU extensions.
fef3106c 2165
7e1542b9
MLI
2166std=gnu90
2167C ObjC
a7b2e184 2168Conform to the ISO 1990 C standard with GNU extensions.
7e1542b9 2169
fef3106c
NB
2170std=gnu99
2171C ObjC
a7b2e184 2172Conform to the ISO 1999 C standard with GNU extensions.
fef3106c
NB
2173
2174std=gnu9x
5de8299c 2175C ObjC Alias(std=gnu99)
a7b2e184 2176Deprecated in favor of -std=gnu99.
fef3106c
NB
2177
2178std=iso9899:1990
5de8299c 2179C ObjC Alias(std=c90)
a7b2e184 2180Conform to the ISO 1990 C standard.
fef3106c
NB
2181
2182std=iso9899:199409
2183C ObjC
a7b2e184 2184Conform to the ISO 1990 C standard as amended in 1994.
fef3106c
NB
2185
2186std=iso9899:1999
5de8299c 2187C ObjC Alias(std=c99)
a7b2e184 2188Conform to the ISO 1999 C standard.
fef3106c
NB
2189
2190std=iso9899:199x
5de8299c 2191C ObjC Alias(std=c99)
a7b2e184 2192Deprecated in favor of -std=iso9899:1999.
fef3106c 2193
48b0b196
JM
2194std=iso9899:2011
2195C ObjC Alias(std=c11)
a7b2e184 2196Conform to the ISO 2011 C standard.
48b0b196 2197
c76dc9c3
JM
2198std=iso9899:2017
2199C ObjC Alias(std=c17)
7a8a92c4 2200Conform to the ISO 2017 C standard (published in 2018).
1e39313a
JM
2201
2202std=iso9899:2018
2203C ObjC Alias(std=c17)
7a8a92c4 2204Conform to the ISO 2017 C standard (published in 2018).
c76dc9c3 2205
e200444e
JM
2206traditional
2207Driver
2208
fef3106c
NB
2209traditional-cpp
2210C ObjC C++ ObjC++
a7b2e184 2211Enable traditional preprocessing.
fef3106c
NB
2212
2213trigraphs
2214C ObjC C++ ObjC++
a7b2e184 2215-trigraphs Support ISO C trigraphs.
fef3106c
NB
2216
2217undef
5498f011 2218C ObjC C++ ObjC++ Var(flag_undef)
a7b2e184 2219Do not predefine system-specific and GCC-specific macros.
fef3106c
NB
2220
2221v
d5478783
JM
2222C ObjC C++ ObjC++
2223; Documented in common.opt
fef3106c
NB
2224
2225w
2226C ObjC C++ ObjC++
72de27ea 2227; Documented in common.opt
e11a4ae5
NB
2228
2229; This comment is to ensure we retain the blank line above.