]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/c.opt
Generate PADDI to add large constants if -mcpu=future.
[thirdparty/gcc.git] / gcc / c-family / c.opt
CommitLineData
fef3106c 1; Options for the C, ObjC, C++ and ObjC++ front ends.
a5544970 2; Copyright (C) 2003-2019 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
fef3106c 758Wmissing-braces
4f7f7aca 759C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
a7b2e184 760Warn about possibly missing braces around initializers.
fef3106c
NB
761
762Wmissing-declarations
c662432e 763C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
a7b2e184 764Warn about global functions without previous declarations.
fef3106c 765
eaac4679 766Wmissing-field-initializers
95744782 767C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra)
a7b2e184 768Warn about missing fields in struct initializers.
eaac4679 769
3e2becc4
MP
770Wmultistatement-macros
771C ObjC C++ ObjC++ Var(warn_multistatement_macros) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
772Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for.
773
6b333269
NS
774Wmultiple-inheritance
775C++ ObjC++ Var(warn_multiple_inheritance) Warning
a7b2e184 776Warn on direct multiple inheritance.
6b333269
NS
777
778Wnamespaces
779C++ ObjC++ Var(warn_namespaces) Warning
a7b2e184 780Warn on namespace definition.
6b333269 781
00aa1fa2
L
782Wpacked-not-aligned
783C ObjC C++ ObjC++ Var(warn_packed_not_aligned) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
784Warn when fields in a struct with the packed attribute are misaligned.
785
20b06add
JM
786Wsized-deallocation
787C++ ObjC++ Var(warn_sized_deallocation) Warning EnabledBy(Wextra)
a7b2e184 788Warn about missing sized deallocation functions.
20b06add 789
40ffd95f
BE
790Wsizeof-pointer-div
791C ObjC C++ ObjC++ Var(warn_sizeof_pointer_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
792Warn about suspicious divisions of two sizeof expressions that don't work correctly with pointers.
793
1a4049e7 794Wsizeof-pointer-memaccess
4a0ae68e 795C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 796Warn about suspicious length parameters to certain string functions if the argument uses sizeof.
1a4049e7 797
773ec47f
MP
798Wsizeof-array-argument
799C ObjC C++ ObjC++ Var(warn_sizeof_array_argument) Warning Init(1)
a7b2e184 800Warn when sizeof is applied on a parameter declared as an array.
773ec47f 801
a7160771
MS
802Wstring-compare
803C ObjC C++ LTO ObjC++ Warning Var(warn_string_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wextra)
804Warn about calls to strcmp and strncmp used in equality expressions that
805are necessarily true or false due to the length of one and size of the other
806argument.
807
ee92e7ba 808Wstringop-overflow
cea71f0a 809C ObjC C++ LTO ObjC++ Warning Alias(Wstringop-overflow=, 2, 0)
ee92e7ba
MS
810Warn about buffer overflow in string manipulation functions like memcpy
811and strcpy.
812
813Wstringop-overflow=
cea71f0a 814C 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
815Under the control of Object Size type, warn about buffer overflow in string
816manipulation functions like memcpy and strcpy.
817
025d57f0 818Wstringop-truncation
cea71f0a 819C ObjC C++ LTO ObjC++ Var(warn_stringop_truncation) Warning Init (1) LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
025d57f0
MS
820Warn about truncation in string manipulation functions like strncat and strncpy.
821
90137d8f
MLI
822Wsuggest-attribute=format
823C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning
a7b2e184 824Warn about functions which might be candidates for format attributes.
fef3106c 825
2f42e5de
TS
826Wsuggest-override
827C++ ObjC++ Var(warn_override) Warning
828Suggest that the override keyword be used when the declaration of a virtual
829function overrides another.
830
34a180a6
MLI
831Wswitch
832C ObjC C++ ObjC++ Var(warn_switch) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 833Warn about enumerated switches, with no default, missing a case.
34a180a6
MLI
834
835Wswitch-default
836C ObjC C++ ObjC++ Var(warn_switch_default) Warning
a7b2e184 837Warn about enumerated switches missing a \"default:\" statement.
34a180a6
MLI
838
839Wswitch-enum
840C ObjC C++ ObjC++ Var(warn_switch_enum) Warning
a7b2e184 841Warn about all enumerated switches missing a specific case.
34a180a6 842
fedfecef 843Wswitch-bool
5c3d09f7 844C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1)
a7b2e184 845Warn about switches with boolean controlling expression.
fedfecef 846
da9e9b57
MB
847Wswitch-outside-range
848C ObjC C++ ObjC++ Var(warn_switch_outside_range) Warning Init(1)
849Warn about switch values that are outside of the switch's type range.
850
6b333269
NS
851Wtemplates
852C++ ObjC++ Var(warn_templates) Warning
a7b2e184 853Warn on primary template declaration.
6b333269 854
d4cfd486
MS
855Wmissing-attributes
856C ObjC C++ ObjC++ Var(warn_missing_attributes) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
857Warn about declarations of entities that may be missing attributes
d3a02ae5 858that related entities have been declared with.
d4cfd486 859
90137d8f 860Wmissing-format-attribute
54d62f51 861C ObjC C++ ObjC++ Warning Alias(Wsuggest-attribute=format)
90137d8f
MLI
862;
863
b02398bd 864Wmissing-include-dirs
b559c810 865C ObjC C++ ObjC++ CPP(warn_missing_include_dirs) CppReason(CPP_W_MISSING_INCLUDE_DIRS) Var(cpp_warn_missing_include_dirs) Init(0) Warning
a7b2e184 866Warn about user-specified include directories that do not exist.
b02398bd 867
cb4af25a 868Wmissing-parameter-type
95744782 869C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra)
a7b2e184 870Warn about function parameters declared without a type specifier in K&R-style functions.
cb4af25a 871
fef3106c 872Wmissing-prototypes
c662432e 873C ObjC Var(warn_missing_prototypes) Warning
a7b2e184 874Warn about global functions without prototypes.
fef3106c 875
5720c0dc 876Wmudflap
68a57628 877C ObjC C++ ObjC++ WarnRemoved
5720c0dc 878
fef3106c 879Wmultichar
b559c810 880C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning
a7b2e184 881Warn about use of multi-character character constants.
fef3106c 882
76f86d00 883Wnarrowing
765189ff 884C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++11-compat)
a7b2e184 885Warn about narrowing conversions within { } that are ill-formed in C++11.
76f86d00 886
fef3106c 887Wnested-externs
c662432e 888C ObjC Var(warn_nested_externs) Warning
a7b2e184 889Warn about \"extern\" declarations not at file scope.
fef3106c 890
59f9c2ed
JM
891Wnoexcept
892C++ ObjC++ Var(warn_noexcept) Warning
a7b2e184 893Warn when a noexcept expression evaluates to false even though the expression can't actually throw.
59f9c2ed 894
108154ff 895Wnoexcept-type
7b936140
JJ
896C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++17-compat)
897Warn if C++17 noexcept function type will change the mangled name of a symbol.
108154ff 898
fef3106c 899Wnon-template-friend
c662432e 900C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
a7b2e184 901Warn when non-templatized friend functions are declared within a template.
fef3106c 902
a599af84
MP
903Wclass-conversion
904C++ ObjC++ Var(warn_class_conversion) Init(1) Warning
905Warn when a conversion function will never be called due to the type it converts to.
906
c3684b7b
MS
907Wclass-memaccess
908C++ ObjC++ Var(warn_class_memaccess) Warning LangEnabledBy(C++ ObjC++, Wall)
909Warn for unsafe raw memory writes to objects of class types.
910
fef3106c 911Wnon-virtual-dtor
880a467b 912C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
a7b2e184 913Warn about non-virtual destructors.
fef3106c
NB
914
915Wnonnull
cea71f0a 916C ObjC C++ LTO ObjC++ Var(warn_nonnull) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=,warn_format >= 1,0)
a7b2e184 917Warn about NULL being passed to argument slots marked as requiring non-NULL.
fef3106c 918
7332899a 919Wnonnull
cea71f0a 920C ObjC C++ LTO ObjC++ LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
7332899a
MLI
921;
922
bf14eba2
JJ
923Wnonnull-compare
924C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
925;
926
1ef33fd4 927Wnormalized
54d62f51 928C ObjC C++ ObjC++ Warning Alias(Wnormalized=,nfc,none)
1ef33fd4
MLI
929;
930
50668cf6 931Wnormalized=
b559c810 932C 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 933-Wnormalized=[none|id|nfc|nfkc] Warn about non-normalized Unicode strings.
1ef33fd4
MLI
934
935; Required for these enum values.
936SourceInclude
937cpplib.h
938
939Enum
940Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
941
942EnumValue
943Enum(cpp_normalize_level) String(none) Value(normalized_none)
944
945EnumValue
946Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC)
947
948EnumValue
949Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C)
950
951EnumValue
952Enum(cpp_normalize_level) String(nfc) Value(normalized_C)
50668cf6 953
fef3106c 954Wold-style-cast
c662432e 955C++ ObjC++ Var(warn_old_style_cast) Warning
a7b2e184 956Warn if a C-style cast is used in a program.
fef3106c 957
b1ed4cb4 958Wold-style-declaration
95744782 959C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra)
a7b2e184 960Warn for obsolescent usage in a declaration.
b1ed4cb4 961
c034f121 962Wold-style-definition
017c6491 963C ObjC Var(warn_old_style_definition) Init(-1) Warning
a7b2e184 964Warn if an old-style parameter definition is used.
c034f121 965
8b5e1202
SO
966Wopenmp-simd
967C C++ Var(warn_openmp_simd) Warning LangEnabledBy(C C++,Wall)
a7b2e184 968Warn if a simd directive is overridden by the vectorizer cost model.
8b5e1202 969
89a42ac8 970Woverlength-strings
34a180a6 971C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
a7b2e184 972Warn if a string is longer than the maximum portable length specified by the standard.
89a42ac8 973
fef3106c 974Woverloaded-virtual
c662432e 975C++ ObjC++ Var(warn_overloaded_virtual) Warning
a7b2e184 976Warn about overloaded virtual function names.
fef3106c 977
7ed322d7 978Woverride-init
95744782 979C ObjC Var(warn_override_init) Warning EnabledBy(Wextra)
a7b2e184 980Warn about overriding initializers without side effects.
7ed322d7 981
755e528f
MP
982Woverride-init-side-effects
983C ObjC Var(warn_override_init_side_effects) Init(1) Warning
a7b2e184 984Warn about overriding initializers with side effects.
755e528f 985
2cd36c22 986Wpacked-bitfield-compat
bee6fa6d 987C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
a7b2e184 988Warn about packed bit-fields whose offset changed in GCC 4.4.
2cd36c22 989
fef3106c 990Wparentheses
4a0ae68e 991C ObjC C++ ObjC++ Var(warn_parentheses) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 992Warn about possibly missing parentheses.
fef3106c 993
c1771a20 994Wpedantic
b559c810 995C ObjC C++ ObjC++ CPP(cpp_pedantic) CppReason(CPP_W_PEDANTIC) Warning
c1771a20
MLI
996; Documented in common.opt
997
79ca9c35
MP
998Wpessimizing-move
999C++ ObjC++ Var(warn_pessimizing_move) Warning LangEnabledBy(C++ ObjC++, Wall)
1000Warn about calling std::move on a local object in a return statement preventing copy elision.
1001
fef3106c 1002Wpmf-conversions
c662432e 1003C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
a7b2e184 1004Warn when converting the type of pointers to member functions.
fef3106c
NB
1005
1006Wpointer-arith
44d90fe1 1007C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
a7b2e184 1008Warn about function pointer arithmetic.
fef3106c 1009
4a0ae68e 1010Wpointer-sign
27e51192 1011C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic)
a7b2e184 1012Warn when a pointer differs in signedness in an assignment.
4a0ae68e 1013
a9342885
MP
1014Wpointer-compare
1015C ObjC C++ ObjC++ Var(warn_pointer_compare) Init(1) Warning
1016Warn when a pointer is compared with a zero character constant.
1017
53a2494e 1018Wpointer-to-int-cast
c662432e 1019C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
a7b2e184 1020Warn when a pointer is cast to an integer of a different size.
53a2494e 1021
b9b8dde3 1022Wpragmas
c662432e 1023C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
a7b2e184 1024Warn about misuses of pragmas.
b9b8dde3 1025
8cff0652
VK
1026Wprio-ctor-dtor
1027C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
1028Warn if constructor or destructors with priorities from 0 to 100 are used.
1029
9a179d01
NP
1030Wproperty-assign-default
1031ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning
a7b2e184 1032Warn if a property for an Objective-C object has no assign semantics specified.
9a179d01 1033
fef3106c 1034Wprotocol
c662432e 1035ObjC ObjC++ Var(warn_protocol) Init(1) Warning
a7b2e184 1036Warn if inherited methods are unimplemented.
fef3106c 1037
e2f5cc96 1038Wplacement-new
46cb9332
MS
1039C++ Warning Alias(Wplacement-new=, 1, 0)
1040Warn for placement new expressions with undefined behavior.
1041
1042Wplacement-new=
63010089 1043C++ Joined RejectNegative UInteger Var(warn_placement_new) Init(-1) Warning IntegerRange(0, 2)
eb11eb15 1044Warn for placement new expressions with undefined behavior.
e2f5cc96 1045
fef3106c 1046Wredundant-decls
c662432e 1047C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
a7b2e184 1048Warn about multiple declarations of the same object.
fef3106c 1049
b5be6d0c
MP
1050Wredundant-move
1051C++ ObjC++ Var(warn_redundant_move) Warning LangEnabledBy(C++ ObjC++,Wextra)
1052Warn about redundant calls to std::move.
1053
a2c6e7f2
JJ
1054Wregister
1055C++ ObjC++ Var(warn_register) Warning
1056Warn about uses of register storage specifier.
1057
fef3106c 1058Wreorder
f2bc201f 1059C++ ObjC++ Var(warn_reorder) Warning LangEnabledBy(C++ ObjC++,Wall)
a7b2e184 1060Warn when the compiler reorders code.
fef3106c
NB
1061
1062Wreturn-type
1b6fa695 1063C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) Init(-1)
a7b2e184 1064Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++).
fef3106c 1065
ee45a32d
EB
1066Wscalar-storage-order
1067C ObjC C++ ObjC++ Init(1) Warning
1068Warn on suspicious constructs involving reverse scalar storage order.
1069
fef3106c 1070Wselector
c662432e 1071ObjC ObjC++ Var(warn_selector) Warning
a7b2e184 1072Warn if a selector has multiple methods.
fef3106c 1073
13c21655
PC
1074Wsequence-point
1075C ObjC C++ ObjC++ Var(warn_sequence_point) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1076Warn about possible violations of sequence point rules.
13c21655 1077
dcaaa5a0 1078Wshadow-ivar
dff8943f 1079ObjC ObjC++ Var(warn_shadow_ivar) EnabledBy(Wshadow) Init(1) Warning
a7b2e184 1080Warn if a local declaration hides an instance variable.
dcaaa5a0 1081
451b5e48
MP
1082Wshift-overflow
1083C ObjC C++ ObjC++ Warning Alias(Wshift-overflow=, 1, 0)
a7b2e184 1084Warn if left shift of a signed value overflows.
451b5e48
MP
1085
1086Wshift-overflow=
63010089 1087C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_shift_overflow) Init(-1) Warning IntegerRange(0, 2)
a7b2e184 1088Warn if left shift of a signed value overflows.
451b5e48 1089
13c21655
PC
1090Wshift-count-negative
1091C ObjC C++ ObjC++ Var(warn_shift_count_negative) Init(1) Warning
a7b2e184 1092Warn if shift count is negative.
13c21655
PC
1093
1094Wshift-count-overflow
1095C ObjC C++ ObjC++ Var(warn_shift_count_overflow) Init(1) Warning
a7b2e184 1096Warn if shift count >= width of type.
fef3106c 1097
0173bd2a
MP
1098Wshift-negative-value
1099C ObjC C++ ObjC++ Var(warn_shift_negative_value) Init(-1) Warning
a7b2e184 1100Warn if left shifting a negative value.
0173bd2a 1101
fef3106c 1102Wsign-compare
4a0ae68e 1103C ObjC C++ ObjC++ Var(warn_sign_compare) Warning LangEnabledBy(C++ ObjC++,Wall)
a7b2e184 1104Warn about signed-unsigned comparisons.
fef3106c 1105
4a0ae68e
MLI
1106Wsign-compare
1107C ObjC C++ ObjC++ EnabledBy(Wextra)
1108;
1109
1110Wsign-conversion
63bbf46d 1111C ObjC C++ ObjC++ Var(warn_sign_conversion) Warning LangEnabledBy(C ObjC,Wconversion)
a7b2e184 1112Warn for implicit type conversions between signed and unsigned integers.
4a0ae68e 1113
fef3106c 1114Wsign-promo
c662432e 1115C++ ObjC++ Var(warn_sign_promo) Warning
a7b2e184 1116Warn when overload promotes from unsigned to signed.
fef3106c 1117
b2f97e4a 1118Wstrict-null-sentinel
5498f011 1119C++ ObjC++ Warning Var(warn_strict_null_sentinel)
a7b2e184 1120Warn about uncasted NULL used as sentinel.
b2f97e4a 1121
fef3106c 1122Wstrict-prototypes
c662432e 1123C ObjC Var(warn_strict_prototypes) Warning
a7b2e184 1124Warn about unprototyped function declarations.
fef3106c 1125
65d4f2cd 1126Wstrict-aliasing=
63010089 1127C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0) IntegerRange(0, 3)
65d4f2cd
MLI
1128;
1129
1130Wstrict-overflow=
63010089 1131C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 5)
65d4f2cd
MLI
1132;
1133
6e955430 1134Wstrict-selector-match
c662432e 1135ObjC ObjC++ Var(warn_strict_selector_match) Warning
a7b2e184 1136Warn if type signatures of candidate methods do not match exactly.
6e955430 1137
23462d4d
UB
1138Wsync-nand
1139C C++ Var(warn_sync_nand) Init(1) Warning
a7b2e184 1140Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used.
23462d4d 1141
fef3106c 1142Wsynth
c662432e 1143C++ ObjC++ Var(warn_synth) Warning
a7b2e184 1144Deprecated. This switch has no effect.
fef3106c
NB
1145
1146Wsystem-headers
c662432e 1147C ObjC C++ ObjC++ Warning
9a0f3e86 1148; Documented in common.opt
fef3106c 1149
05b28fd6
MP
1150Wtautological-compare
1151C ObjC C++ ObjC++ Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1152Warn if a comparison always evaluates to true or false.
05b28fd6 1153
8243e2a9
JM
1154Wterminate
1155C++ ObjC++ Warning Var(warn_terminate) Init(1)
a7b2e184 1156Warn if a throw expression will always result in a call to terminate().
8243e2a9 1157
fef3106c 1158Wtraditional
b559c810 1159C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning
a7b2e184 1160Warn about features not present in traditional C.
fef3106c 1161
05170031 1162Wtraditional-conversion
c662432e 1163C ObjC Var(warn_traditional_conversion) Warning
a7b2e184 1164Warn of prototypes causing type conversions different from what would happen in the absence of prototype.
05170031 1165
fef3106c 1166Wtrigraphs
b559c810 1167C ObjC C++ ObjC++ CPP(warn_trigraphs) CppReason(CPP_W_TRIGRAPHS) Var(cpp_warn_trigraphs) Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1168Warn if trigraphs are encountered that might affect the meaning of the program.
fef3106c
NB
1169
1170Wundeclared-selector
c662432e 1171ObjC ObjC++ Var(warn_undeclared_selector) Warning
a7b2e184 1172Warn about @selector()s without previously declared methods.
fef3106c
NB
1173
1174Wundef
b559c810 1175C ObjC C++ ObjC++ CPP(warn_undef) CppReason(CPP_W_UNDEF) Var(cpp_warn_undef) Init(0) Warning
a7b2e184 1176Warn if an undefined macro is used in an #if directive.
fef3106c 1177
4a0ae68e 1178Wuninitialized
cea71f0a 1179C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
4a0ae68e
MLI
1180;
1181
1182Wmaybe-uninitialized
cea71f0a 1183C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
4a0ae68e
MLI
1184;
1185
fef3106c 1186Wunknown-pragmas
34a180a6 1187C ObjC C++ ObjC++ Warning Var(warn_unknown_pragmas) LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0)
a7b2e184 1188Warn about unrecognized pragmas.
fef3106c 1189
6ec637a4
JJ
1190Wunsuffixed-float-constants
1191C ObjC Var(warn_unsuffixed_float_constants) Warning
a7b2e184 1192Warn about unsuffixed float constants.
6ec637a4 1193
4a0ae68e
MLI
1194Wunused
1195C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1196; documented in common.opt
1197
3797cb21 1198Wunused-local-typedefs
650dc14a 1199C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
a7b2e184 1200Warn when typedefs locally defined in a function are not used.
3797cb21 1201
fef3106c 1202Wunused-macros
b559c810 1203C ObjC C++ ObjC++ CppReason(CPP_W_UNUSED_MACROS) Var(cpp_warn_unused_macros) Warning
a7b2e184 1204Warn about macros defined in the main file that are not used.
fef3106c 1205
156f545a
MLI
1206Wunused-result
1207C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning
a7b2e184 1208Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.
156f545a 1209
0f876f22
MW
1210Wunused-variable
1211C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wunused)
1212; documented in common.opt
1213
1214Wunused-const-variable
4246c8da
MW
1215C ObjC C++ ObjC++ Warning Alias(Wunused-const-variable=, 2, 0)
1216Warn when a const variable is unused.
1217
1218Wunused-const-variable=
63010089 1219C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(C ObjC,Wunused-variable, 1, 0) IntegerRange(0, 2)
a7b2e184 1220Warn when a const variable is unused.
0f876f22 1221
e5b79219 1222Wvariadic-macros
27e51192 1223C 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 1224Warn about using variadic macros.
e5b79219 1225
b9c8da34
DS
1226Wvarargs
1227C ObjC C++ ObjC++ Warning Var(warn_varargs) Init(1)
a7b2e184 1228Warn about questionable usage of the macros used to retrieve variable arguments.
b9c8da34 1229
50d50fc7
SP
1230Wvla
1231C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
a7b2e184 1232Warn if a variable length array is used.
50d50fc7 1233
adc577c5 1234Wvla-larger-than=
00abf86c
MS
1235C ObjC C++ LTO ObjC++ Var(warn_vla_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
1236-Wvla-larger-than=<number> Warn on unbounded uses of variable-length
1237arrays, and on bounded uses of variable-length arrays whose bound can be
adc577c5 1238larger than <number> bytes.
00abf86c
MS
1239<number> bytes.
1240
1241Wno-vla-larger-than
1242C ObjC C++ LTO ObjC++ Alias(Wvla-larger-than=,18446744073709551615EiB,none) Warning
1243-Wno-vla-larger-than Disable Wvla-larger-than= warning. Equivalent to Wvla-larger-than=<SIZE_MAX> or larger.
adc577c5 1244
8a902edb
MP
1245Wvolatile
1246C++ ObjC++ Var(warn_volatile) Warning
1247Warn about deprecated uses of volatile qualifier.
1248
16302daf 1249Wvolatile-register-var
4a0ae68e 1250C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
a7b2e184 1251Warn when a register variable is declared volatile.
16302daf 1252
6b333269
NS
1253Wvirtual-inheritance
1254C++ ObjC++ Var(warn_virtual_inheritance) Warning
a7b2e184 1255Warn on direct virtual inheritance.
6b333269 1256
f14edc1a
JM
1257Wvirtual-move-assign
1258C++ ObjC++ Var(warn_virtual_move_assign) Warning Init(1)
a7b2e184 1259Warn if a virtual base has a non-trivial move assignment operator.
f14edc1a 1260
fef3106c 1261Wwrite-strings
c662432e 1262C ObjC C++ ObjC++ Var(warn_write_strings) Warning
d8a07487 1263In 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 1264
89401152
PC
1265Wzero-as-null-pointer-constant
1266C++ ObjC++ Var(warn_zero_as_null_pointer_constant) Warning
a7b2e184 1267Warn when a literal '0' is used as null pointer.
89401152 1268
04398fa8
PC
1269Wuseless-cast
1270C++ ObjC++ Var(warn_useless_cast) Warning
a7b2e184 1271Warn about useless casts.
04398fa8 1272
273aa49e
PC
1273Wsubobject-linkage
1274C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1)
a7b2e184 1275Warn 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 1276
d6e83a8d
MM
1277Wduplicate-decl-specifier
1278C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall)
1279Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier.
1280
975672f3 1281Wrestrict
cc8bea0a 1282C ObjC C++ ObjC++ Var(warn_restrict) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
975672f3
PK
1283Warn when an argument passed to a restrict-qualified parameter aliases with
1284another argument.
1285
fef3106c
NB
1286ansi
1287C ObjC C++ ObjC++
a7b2e184 1288A synonym for -std=c89 (for C) or -std=c++98 (for C++).
fef3106c
NB
1289
1290d
1291C ObjC C++ ObjC++ Joined
72de27ea 1292; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
fef3106c 1293
62984918
JM
1294fabi-compat-version=
1295C++ ObjC++ Joined RejectNegative UInteger Var(flag_abi_compat_version) Init(-1)
a7b2e184 1296The version of the C++ ABI used for -Wabi warnings and link compatibility aliases.
62984918 1297
fef3106c 1298faccess-control
5498f011 1299C++ ObjC++ Var(flag_access_control) Init(1)
a7b2e184 1300Enforce class member access control semantics.
fef3106c 1301
da5182be
TQ
1302fada-spec-parent=
1303C ObjC C++ ObjC++ RejectNegative Joined Var(ada_specs_parent)
a7b2e184 1304-fada-spec-parent=unit Dump Ada specs as child units of given parent.
da5182be 1305
af63ba4b
JM
1306faligned-new
1307C++ ObjC++ Alias(faligned-new=,1,0)
1308Support C++17 allocation of over-aligned types.
1309
1310faligned-new=
2e1c20b1 1311C++ ObjC++ Joined RejectNegative Var(aligned_new_threshold) UInteger Init(-1)
af63ba4b
JM
1312-faligned-new=<N> Use C++17 over-aligned type allocation for alignments greater than N.
1313
fef3106c 1314fall-virtual
68a57628 1315C++ ObjC++ WarnRemoved
fef3106c 1316
6637388f
TG
1317fallow-parameterless-variadic-functions
1318C ObjC Var(flag_allow_parameterless_variadic_functions)
a7b2e184 1319Allow variadic functions without named parameter.
6637388f 1320
fef3106c 1321falt-external-templates
68a57628 1322C++ ObjC++ WarnRemoved
a7b2e184 1323No longer supported.
fef3106c
NB
1324
1325fasm
5498f011 1326C ObjC C++ ObjC++ Var(flag_no_asm, 0)
a7b2e184 1327Recognize the \"asm\" keyword.
fef3106c 1328
10e48e39
RO
1329; Define extra predefined macros for use in libgcc.
1330fbuilding-libgcc
1331C ObjC C++ ObjC++ Undocumented Var(flag_building_libgcc)
1332
fef3106c 1333fbuiltin
5498f011 1334C ObjC C++ ObjC++ Var(flag_no_builtin, 0)
a7b2e184 1335Recognize built-in functions.
fef3106c
NB
1336
1337fbuiltin-
1338C ObjC C++ ObjC++ Joined
1339
5dc99c46
SB
1340fcanonical-system-headers
1341C ObjC C++ ObjC++
1342Where shorter, use canonicalized paths to systems headers.
1343
2d91f79d
TH
1344fchar8_t
1345C++ ObjC++ Var(flag_char8_t) Init(-1)
1346Enable the char8_t fundamental type and use it as the type for UTF-8 string
1347and character literals.
1348
d5e254e1 1349fcheck-pointer-bounds
68a57628 1350C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1351Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1352
1353fchkp-check-incomplete-type
68a57628 1354C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1355Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1356
1357fchkp-zero-input-bounds-for-main
68a57628 1358C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1359Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1360
1361fchkp-first-field-has-own-bounds
68a57628 1362C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
f48ef52e 1363Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1364
1365fchkp-narrow-bounds
68a57628 1366C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1367Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1368
1369fchkp-narrow-to-innermost-array
68a57628 1370C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
f48ef52e 1371Removed in GCC 9. This switch has no effect.
8ba4f506
AI
1372
1373fchkp-flexible-struct-trailing-arrays
68a57628 1374C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1375Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1376
1377fchkp-optimize
68a57628 1378C ObjC C++ ObjC++ LTO WarnRemoved
d5e254e1
IE
1379
1380fchkp-use-fast-string-functions
68a57628 1381C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1382Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1383
1384fchkp-use-nochk-string-functions
68a57628 1385C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1386Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1387
1388fchkp-use-static-bounds
68a57628 1389C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1390Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1391
1392fchkp-use-static-const-bounds
68a57628 1393C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1394Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1395
1396fchkp-treat-zero-dynamic-size-as-infinite
68a57628 1397C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1398Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1399
1400fchkp-check-read
68a57628 1401C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1402Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1403
1404fchkp-check-write
68a57628 1405C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1406Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1407
1408fchkp-store-bounds
68a57628 1409C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1410Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1411
1412fchkp-instrument-calls
68a57628 1413C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1414Removed in GCC 9. This switch has no effect.
d5e254e1
IE
1415
1416fchkp-instrument-marked-only
68a57628 1417C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1418Removed in GCC 9. This switch has no effect.
d5e254e1 1419
226d62d2 1420fchkp-use-wrappers
68a57628 1421C ObjC C++ ObjC++ LTO WarnRemoved
f48ef52e 1422Removed in GCC 9. This switch has no effect.
226d62d2 1423
5373cd33 1424static-libmpx
68a57628 1425Driver WarnRemoved
f48ef52e 1426Removed in GCC 9. This switch has no effect.
5373cd33 1427
d2d7e672 1428static-libmpxwrappers
68a57628 1429Driver WarnRemoved
f48ef52e 1430Removed in GCC 9. This switch has no effect.
d2d7e672 1431
c0c12356
ML
1432fcilkplus
1433C ObjC C++ ObjC++ LTO Undocumented Ignore
f48ef52e 1434Removed in GCC 8. This switch has no effect.
36536d79 1435
971e17ff
AS
1436fconcepts
1437C++ ObjC++ Var(flag_concepts)
a7b2e184 1438Enable support for C++ concepts.
971e17ff 1439
cb57504a
JM
1440fconcepts-ts
1441C++ ObjC++ Var(flag_concepts_ts) Init(0)
1442Enable certain features present in the Concepts TS.
1443
fef3106c
NB
1444fcond-mismatch
1445C ObjC C++ ObjC++
a7b2e184 1446Allow the arguments of the '?' operator to have different types.
fef3106c
NB
1447
1448fconserve-space
c0c12356 1449C++ ObjC++ Ignore
6f07a821 1450Does nothing. Preserved for backward compatibility.
fef3106c 1451
fef3106c 1452fconstant-string-class=
61ff2bdc 1453ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
a7b2e184 1454-fconst-string-class=<name> Use class <name> for constant strings.
fef3106c 1455
17bc631c 1456fconstexpr-depth=
49a000c3 1457C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512)
a7b2e184 1458-fconstexpr-depth=<number> Specify maximum constexpr recursion depth.
17bc631c 1459
7ffc7de5
JM
1460fconstexpr-cache-depth=
1461C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_cache_depth) Init(8)
1462-fconstexpr-cache-depth=<number> Specify maximum constexpr recursion cache depth.
1463
5ec2cd9f
JM
1464fconstexpr-loop-limit=
1465C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_loop_limit) Init(262144)
1466-fconstexpr-loop-limit=<number> Specify maximum constexpr loop iteration count.
1467
a15ffa22
JJ
1468fconstexpr-ops-limit=
1469C++ ObjC++ Joined RejectNegative Host_Wide_Int Var(constexpr_ops_limit) Init(33554432)
1470-fconstexpr-ops-limit=<number> Specify maximum number of constexpr operations during a single constexpr evaluation.
1471
847e697a
TT
1472fdebug-cpp
1473C ObjC C++ ObjC++
a7b2e184 1474Emit debug annotations during preprocessing.
847e697a 1475
5f5babf1 1476fdeduce-init-list
db9d2274
MP
1477C++ ObjC++ Ignore
1478Does nothing. Preserved for backward compatibility.
5f5babf1 1479
1f26ac87
JM
1480fdeclone-ctor-dtor
1481C++ ObjC++ Var(flag_declone_ctor_dtor) Init(-1)
a7b2e184 1482Factor complex constructors and destructors to favor space over speed.
1f26ac87 1483
fef3106c 1484fdefault-inline
2d2bd949 1485C++ ObjC++ Ignore
5498f011 1486Does nothing. Preserved for backward compatibility.
fef3106c 1487
f012c8ef
DM
1488fdiagnostics-show-template-tree
1489C++ ObjC++ Var(flag_diagnostics_show_template_tree) Init(0)
1490Print hierarchical comparisons when template types are mismatched.
1491
ccfc4c91
OW
1492fdirectives-only
1493C ObjC C++ ObjC++
1494Preprocess directives only.
1495
fef3106c
NB
1496fdollars-in-identifiers
1497C ObjC C++ ObjC++
a7b2e184 1498Permit '$' as an identifier character.
fef3106c 1499
7365279f
BK
1500fmacro-prefix-map=
1501C ObjC C++ ObjC++ Joined RejectNegative
1502-fmacro-prefix-map=<old>=<new> Map one directory name to another in __FILE__, __BASE_FILE__, and __builtin_FILE().
1503
3b78de56
AC
1504fdump-ada-spec
1505C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec)
a7b2e184 1506Write all declarations as Ada code transitively.
3b78de56
AC
1507
1508fdump-ada-spec-slim
1509C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec_slim)
a7b2e184 1510Write all declarations as Ada code for the given file only.
3b78de56 1511
fef3106c 1512felide-constructors
5498f011 1513C++ ObjC++ Var(flag_elide_constructors) Init(1)
fef3106c 1514
f012c8ef
DM
1515felide-type
1516C++ ObjC++ Var(flag_elide_type) Init(1)
1517-fno-elide-type Do not elide common elements in template comparisons.
1518
fef3106c 1519fenforce-eh-specs
5498f011 1520C++ ObjC++ Var(flag_enforce_eh_specs) Init(1)
a7b2e184 1521Generate code to check exception specifications.
fef3106c
NB
1522
1523fenum-int-equiv
68a57628 1524C++ ObjC++ WarnRemoved
fef3106c 1525
e6cc3a24
ZW
1526fexec-charset=
1527C ObjC C++ ObjC++ Joined RejectNegative
a7b2e184 1528-fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
e6cc3a24 1529
af15a2fe
JM
1530fextended-identifiers
1531C ObjC C++ ObjC++
a7b2e184 1532Permit universal character names (\\u and \\U) in identifiers.
af15a2fe 1533
16dd5cfe
EC
1534finput-charset=
1535C ObjC C++ ObjC++ Joined RejectNegative
a7b2e184 1536-finput-charset=<cset> Specify the default character set for source files.
16dd5cfe 1537
5af057d8
JM
1538fextern-tls-init
1539C++ ObjC++ Var(flag_extern_tls_init) Init(-1)
a7b2e184 1540Support dynamic initialization of thread-local variables in a different translation unit.
16dd5cfe 1541
fef3106c 1542fexternal-templates
68a57628 1543C++ ObjC++ WarnRemoved
fef3106c 1544
fef3106c 1545ffor-scope
68a57628 1546C++ ObjC++ WarnRemoved
fef3106c
NB
1547
1548ffreestanding
820b51ae 1549C ObjC C++ ObjC++
a7b2e184 1550Do not assume that standard C libraries and \"main\" exist.
fef3106c
NB
1551
1552fgnu-keywords
5498f011 1553C++ ObjC++ Var(flag_no_gnu_keywords, 0)
a7b2e184 1554Recognize GNU-defined keywords.
fef3106c
NB
1555
1556fgnu-runtime
fb5610fb 1557ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime,0) Init(NEXT_OBJC_RUNTIME)
a7b2e184 1558Generate code for GNU runtime environment.
fef3106c 1559
da1c7394 1560fgnu89-inline
2cbac420 1561C ObjC Var(flag_gnu89_inline) Init(-1)
a7b2e184 1562Use traditional GNU semantics for inline functions.
da1c7394 1563
fef3106c 1564fguiding-decls
68a57628 1565C++ ObjC++ WarnRemoved
fef3106c
NB
1566
1567fhandle-exceptions
63b8a166 1568C++ ObjC++ Optimization Alias(fexceptions) Warn({%<-fhandle-exceptions%> has been renamed %<-fexceptions%> (and is now on by default)})
fef3106c
NB
1569
1570fhonor-std
68a57628 1571C++ ObjC++ WarnRemoved
fef3106c
NB
1572
1573fhosted
1574C ObjC
a7b2e184 1575Assume normal C execution environment.
fef3106c
NB
1576
1577fhuge-objects
68a57628 1578C++ ObjC++ WarnRemoved
a7b2e184 1579No longer supported.
fef3106c
NB
1580
1581fimplement-inlines
5498f011 1582C++ ObjC++ Var(flag_implement_inlines) Init(1)
a7b2e184 1583Export functions even if they can be inlined.
fef3106c
NB
1584
1585fimplicit-inline-templates
5498f011 1586C++ ObjC++ Var(flag_implicit_inline_templates) Init(1)
a7b2e184 1587Emit implicit instantiations of inline templates.
fef3106c
NB
1588
1589fimplicit-templates
5498f011 1590C++ ObjC++ Var(flag_implicit_templates) Init(1)
a7b2e184 1591Emit implicit instantiations of templates.
fef3106c 1592
31f7f784
JM
1593fnew-inheriting-ctors
1594C++ ObjC++ Var(flag_new_inheriting_ctors) Init(1)
1595Implement C++17 inheriting constructor semantics.
1596
d63d5d0c 1597ffriend-injection
68a57628 1598C++ ObjC++ WarnRemoved
d63d5d0c 1599
47ea1edf
DK
1600fkeep-inline-dllexport
1601C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Report Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES)
a7b2e184 1602Don't emit dllexported inline functions unless needed.
47ea1edf 1603
fef3106c 1604flabels-ok
68a57628 1605C++ ObjC++ WarnRemoved
fef3106c 1606
00c8e9f6 1607flax-vector-conversions
5498f011 1608C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
00c8e9f6
MS
1609Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
1610
1c6ffbab
QZ
1611fmax-include-depth=
1612C ObjC C++ ObjC++ Joined RejectNegative UInteger
1613fmax-include-depth=<number> Set the maximum depth of the nested #include.
1614
fef3106c 1615fms-extensions
5498f011 1616C ObjC C++ ObjC++ Var(flag_ms_extensions)
a7b2e184 1617Don't warn about uses of Microsoft extensions.
fef3106c 1618
5720c0dc 1619fmudflap
68a57628 1620C ObjC C++ ObjC++ WarnRemoved
5720c0dc
RG
1621
1622fmudflapth
68a57628 1623C ObjC C++ ObjC++ WarnRemoved
5720c0dc
RG
1624
1625fmudflapir
68a57628 1626C ObjC C++ ObjC++ WarnRemoved
5720c0dc 1627
fef3106c 1628fname-mangling-version-
68a57628 1629C++ ObjC++ Joined WarnRemoved
fef3106c
NB
1630
1631fnew-abi
68a57628 1632C++ ObjC++ WarnRemoved
fef3106c 1633
31bfc9b9
JM
1634fnew-ttp-matching
1635C++ ObjC++ Var(flag_new_ttp)
1636Implement resolution of DR 150 for matching of template template arguments.
1637
fef3106c 1638fnext-runtime
fb5610fb 1639ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime)
a7b2e184 1640Generate code for NeXT (Apple Mac OS X) runtime environment.
264fa2db
ZL
1641
1642fnil-receivers
5498f011 1643ObjC ObjC++ Var(flag_nil_receivers) Init(1)
a7b2e184 1644Assume that receivers of Objective-C messages may be nil.
fef3106c 1645
dcaaa5a0
DP
1646flocal-ivars
1647ObjC ObjC++ Var(flag_local_ivars) Init(1)
1648Allow access to instance variables as if they were local declarations within instance method implementations.
1649
1650fivar-visibility=
1651ObjC ObjC++ Joined RejectNegative Enum(ivar_visibility) Var(default_ivar_visibility) Init(IVAR_VISIBILITY_PROTECTED)
a7b2e184 1652-fvisibility=[private|protected|public|package] Set the default symbol visibility.
dcaaa5a0
DP
1653
1654Enum
1655Name(ivar_visibility) Type(enum ivar_visibility) UnknownError(unrecognized ivar visibility value %qs)
1656
1657EnumValue
1658Enum(ivar_visibility) String(private) Value(IVAR_VISIBILITY_PRIVATE)
1659
1660EnumValue
1661Enum(ivar_visibility) String(protected) Value(IVAR_VISIBILITY_PROTECTED)
1662
1663EnumValue
1664Enum(ivar_visibility) String(public) Value(IVAR_VISIBILITY_PUBLIC)
1665
1666EnumValue
1667Enum(ivar_visibility) String(package) Value(IVAR_VISIBILITY_PACKAGE)
1668
fef3106c 1669fnonansi-builtins
5498f011 1670C++ ObjC++ Var(flag_no_nonansi_builtin, 0)
fef3106c
NB
1671
1672fnonnull-objects
68a57628 1673C++ ObjC++ WarnRemoved
fef3106c 1674
9feb3d6a
JM
1675fnothrow-opt
1676C++ ObjC++ Optimization Var(flag_nothrow_opt)
a7b2e184 1677Treat a throw() exception specification as noexcept to improve code size.
9feb3d6a 1678
0a256240 1679fobjc-abi-version=
fb5610fb 1680ObjC ObjC++ LTO Joined Report RejectNegative UInteger Var(flag_objc_abi)
0a256240
NP
1681Specify which ABI to use for Objective-C family code and meta-data generation.
1682
6e955430
ZL
1683; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
1684; to initialize any non-POD ivars in Objective-C++ classes.
1685fobjc-call-cxx-cdtors
1686ObjC++ Var(flag_objc_call_cxx_cdtors)
a7b2e184 1687Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed.
6e955430
ZL
1688
1689fobjc-direct-dispatch
1690ObjC ObjC++ Var(flag_objc_direct_dispatch)
a7b2e184 1691Allow fast jumps to the message dispatcher.
6e955430
ZL
1692
1693; Nonzero means that we will allow new ObjC exception syntax (@throw,
1694; @try, etc.) in source code.
264fa2db 1695fobjc-exceptions
6e955430 1696ObjC ObjC++ Var(flag_objc_exceptions)
a7b2e184 1697Enable Objective-C exception and synchronization syntax.
264fa2db 1698
6e955430 1699fobjc-gc
fb5610fb 1700ObjC ObjC++ LTO Var(flag_objc_gc)
a7b2e184 1701Enable garbage collection (GC) in Objective-C/Objective-C++ programs.
6e955430 1702
0a256240
NP
1703fobjc-nilcheck
1704ObjC ObjC++ Var(flag_objc_nilcheck,1)
1705Enable inline checks for nil receivers with the NeXT runtime and ABI version 2.
1706
6e955430 1707; Nonzero means that we generate NeXT setjmp based exceptions.
093c7153 1708fobjc-sjlj-exceptions
6e955430 1709ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
a7b2e184 1710Enable Objective-C setjmp exception handling runtime.
093c7153 1711
22d8d616
NP
1712fobjc-std=objc1
1713ObjC ObjC++ Var(flag_objc1_only)
a7b2e184 1714Conform to the Objective-C 1.0 language as implemented in GCC 4.0.
22d8d616 1715
41dbbb37 1716fopenacc
a0c88d06 1717C ObjC C++ ObjC++ LTO Var(flag_openacc)
a7b2e184 1718Enable OpenACC.
41dbbb37 1719
b6adbb9f
NS
1720fopenacc-dim=
1721C ObjC C++ ObjC++ LTO Joined Var(flag_openacc_dims)
1722Specify default OpenACC compute dimensions.
1723
953ff289 1724fopenmp
1506ae0e 1725C ObjC C++ ObjC++ LTO Var(flag_openmp)
a7b2e184 1726Enable OpenMP (implies -frecursive in Fortran).
953ff289 1727
6d7f7e0a
TB
1728fopenmp-simd
1729C ObjC C++ ObjC++ Var(flag_openmp_simd)
a7b2e184 1730Enable OpenMP's SIMD directives.
6d7f7e0a 1731
fef3106c
NB
1732foperator-names
1733C++ ObjC++
a7b2e184 1734Recognize C++ keywords like \"compl\" and \"xor\".
fef3106c
NB
1735
1736foptional-diags
2d2bd949 1737C++ ObjC++ Ignore
5498f011 1738Does nothing. Preserved for backward compatibility.
fef3106c
NB
1739
1740fpch-deps
1741C ObjC C++ ObjC++
1742
c0d578e6
GK
1743fpch-preprocess
1744C ObjC C++ ObjC++
a7b2e184 1745Look for and use PCH files even when preprocessing.
c0d578e6 1746
fef3106c 1747fpermissive
0c3641b0 1748C++ ObjC++ Var(flag_permissive)
a7b2e184 1749Downgrade conformance errors to warnings.
fef3106c 1750
478a1c5b
ILT
1751fplan9-extensions
1752C ObjC Var(flag_plan9_extensions)
a7b2e184 1753Enable Plan 9 language extensions.
478a1c5b 1754
fef3106c
NB
1755fpreprocessed
1756C ObjC C++ ObjC++
a7b2e184 1757Treat the input file as already preprocessed.
fef3106c 1758
92582b75
TT
1759ftrack-macro-expansion
1760C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
1761; converted into ftrack-macro-expansion=
1762
1763ftrack-macro-expansion=
1764C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
a7b2e184 1765-ftrack-macro-expansion=<0|1|2> Track locations of tokens coming from macro expansion and display them in error messages.
92582b75 1766
6ea2bd47 1767fpretty-templates
5498f011 1768C++ ObjC++ Var(flag_pretty_templates) Init(1)
a7b2e184 1769-fno-pretty-templates Do not pretty-print template specializations as the template signature followed by the arguments.
6ea2bd47 1770
88d0c3f0 1771fprintf-return-value
89990732 1772C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(1)
88d0c3f0
MS
1773Treat known sprintf return values as constants.
1774
264fa2db 1775freplace-objc-classes
fb5610fb 1776ObjC ObjC++ LTO Var(flag_replace_objc_classes)
a7b2e184 1777Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
264fa2db 1778
fef3106c 1779frepo
68a57628 1780C++ ObjC++ WarnRemoved
f48ef52e 1781Removed in GCC 10. This switch has no effect.
fef3106c
NB
1782
1783frtti
5498f011 1784C++ ObjC++ Optimization Var(flag_rtti) Init(1)
a7b2e184 1785Generate run time type descriptor information.
fef3106c 1786
fef3106c 1787fshort-enums
dd6fe7d4 1788C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums)
a7b2e184 1789Use the narrowest integer type possible for enumeration types.
fef3106c
NB
1790
1791fshort-wchar
dd6fe7d4 1792C ObjC C++ ObjC++ LTO Optimization Var(flag_short_wchar)
a7b2e184 1793Force the underlying type for \"wchar_t\" to be \"unsigned short\".
fef3106c 1794
fef3106c 1795fsigned-bitfields
5498f011 1796C ObjC C++ ObjC++ Var(flag_signed_bitfields) Init(1)
a7b2e184 1797When \"signed\" or \"unsigned\" is not given make the bitfield signed.
fef3106c
NB
1798
1799fsigned-char
5498f011 1800C ObjC C++ ObjC++ LTO Var(flag_signed_char)
a7b2e184 1801Make \"char\" signed by default.
fef3106c 1802
20b06add
JM
1803fsized-deallocation
1804C++ ObjC++ Var(flag_sized_deallocation) Init(-1)
a7b2e184 1805Enable C++14 sized deallocation support.
20b06add 1806
fef3106c 1807fsquangle
68a57628 1808C++ ObjC++ WarnRemoved
fef3106c 1809
ee45a32d 1810fsso-struct=
fc73e60c 1811C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE)
4e89adf9 1812-fsso-struct=[big-endian|little-endian|native] Set the default scalar storage order.
ee45a32d
EB
1813
1814Enum
1815Name(sso_struct) Type(enum scalar_storage_order_kind) UnknownError(unrecognized scalar storage order value %qs)
1816
1817EnumValue
1818Enum(sso_struct) String(big-endian) Value(SSO_BIG_ENDIAN)
1819
1820EnumValue
1821Enum(sso_struct) String(little-endian) Value(SSO_LITTLE_ENDIAN)
1822
4e89adf9
EB
1823EnumValue
1824Enum(sso_struct) String(native) Value(SSO_NATIVE)
1825
fef3106c 1826fstats
5498f011 1827C++ ObjC++ Var(flag_detailed_statistics)
a7b2e184 1828Display statistics accumulated during compilation.
fef3106c 1829
cbb4feb3
JM
1830fstrict-enums
1831C++ ObjC++ Optimization Var(flag_strict_enums)
a7b2e184 1832Assume that values of enumeration type are always within the minimum range of that type.
cbb4feb3 1833
fef3106c 1834fstrict-prototype
68a57628 1835C++ ObjC++ WarnRemoved
fef3106c 1836
d0cf395a
JM
1837fstrong-eval-order
1838C++ ObjC++ Common Alias(fstrong-eval-order=, all, none)
1839Follow the C++17 evaluation order requirements for assignment expressions,
1840shift, member function calls, etc.
1841
1842fstrong-eval-order=
d4a6c0ea 1843C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1)
d0cf395a
JM
1844Follow the C++17 evaluation order requirements for assignment expressions,
1845shift, member function calls, etc.
1846
1847Enum
1848Name(strong_eval_order) Type(int)
1849
1850EnumValue
1851Enum(strong_eval_order) String(none) Value(0)
1852
1853EnumValue
1854Enum(strong_eval_order) String(some) Value(1)
1855
1856EnumValue
1857Enum(strong_eval_order) String(all) Value(2)
1858
fef3106c 1859ftabstop=
7b086b11 1860C ObjC C++ ObjC++ Joined RejectNegative UInteger
a7b2e184 1861-ftabstop=<number> Distance between tab stops for column reporting.
fef3106c 1862
a12bf402
MLI
1863ftemplate-backtrace-limit=
1864C++ ObjC++ Joined RejectNegative UInteger Var(template_backtrace_limit) Init(10)
a7b2e184 1865Set the maximum number of template instantiation notes for a single warning or error.
a12bf402 1866
fef3106c 1867ftemplate-depth-
5de8299c 1868C++ ObjC++ Joined RejectNegative Undocumented Alias(ftemplate-depth=)
124e0d27
MLI
1869
1870ftemplate-depth=
c22cacf3 1871C++ ObjC++ Joined RejectNegative UInteger
a7b2e184 1872-ftemplate-depth=<number> Specify maximum template instantiation depth.
fef3106c
NB
1873
1874fthis-is-variable
68a57628 1875C++ ObjC++ WarnRemoved
fef3106c 1876
40aac948 1877fthreadsafe-statics
5498f011 1878C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
a7b2e184 1879-fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
40aac948 1880
fef3106c 1881funsigned-bitfields
f0036cca 1882C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)
a7b2e184 1883When \"signed\" or \"unsigned\" is not given make the bitfield unsigned.
fef3106c
NB
1884
1885funsigned-char
f0036cca 1886C ObjC C++ ObjC++ LTO Var(flag_signed_char, 0)
a7b2e184 1887Make \"char\" unsigned by default.
fef3106c
NB
1888
1889fuse-cxa-atexit
5498f011 1890C++ ObjC++ Var(flag_use_cxa_atexit) Init(DEFAULT_USE_CXA_ATEXIT)
a7b2e184 1891Use __cxa_atexit to register destructors.
fef3106c 1892
c7b5e395 1893fuse-cxa-get-exception-ptr
5498f011 1894C++ ObjC++ Var(flag_use_cxa_get_exception_ptr) Init(2)
a7b2e184 1895Use __cxa_get_exception_ptr in exception handling.
c7b5e395 1896
d7afec4b 1897fvisibility-inlines-hidden
d0b07283 1898C++ ObjC++
a7b2e184 1899Marks all inlined functions and methods as having hidden visibility.
d7afec4b 1900
ddbfd28d
GK
1901fvisibility-ms-compat
1902C++ ObjC++ Var(flag_visibility_ms_compat)
a7b2e184 1903Changes visibility to match Microsoft Visual Studio by default.
ddbfd28d 1904
fef3106c 1905fvtable-gc
68a57628 1906C++ ObjC++ WarnRemoved
a7b2e184 1907No longer supported.
fef3106c
NB
1908
1909fvtable-thunks
68a57628 1910C++ ObjC++ WarnRemoved
a7b2e184 1911No longer supported.
fef3106c
NB
1912
1913fweak
5498f011 1914C++ ObjC++ Var(flag_weak) Init(1)
a7b2e184 1915Emit common-like symbols as weak symbols.
fef3106c 1916
e6cc3a24
ZW
1917fwide-exec-charset=
1918C ObjC C++ ObjC++ Joined RejectNegative
a7b2e184 1919-fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset>.
e6cc3a24 1920
b20d9f0c 1921fworking-directory
5498f011 1922C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1)
a7b2e184 1923Generate a #line directive pointing at the current working directory.
b20d9f0c 1924
fef3106c 1925fxref
68a57628 1926C++ ObjC++ WarnRemoved
a7b2e184 1927No longer supported.
fef3106c 1928
264fa2db 1929fzero-link
5498f011 1930ObjC ObjC++ Var(flag_zero_link)
a7b2e184 1931Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode.
264fa2db 1932
fef3106c 1933gen-decls
9ed32e27 1934ObjC ObjC++ Driver Var(flag_gen_declaration) RejectNegative
a7b2e184 1935Dump declarations to a .decl file.
fef3106c 1936
39ef6592
LC
1937femit-struct-debug-baseonly
1938C ObjC C++ ObjC++
a7b2e184 1939-femit-struct-debug-baseonly Aggressive reduced debug info for structs.
39ef6592
LC
1940
1941femit-struct-debug-reduced
1942C ObjC C++ ObjC++
a7b2e184 1943-femit-struct-debug-reduced Conservative reduced debug info for structs.
39ef6592
LC
1944
1945femit-struct-debug-detailed=
1946C ObjC C++ ObjC++ Joined
a7b2e184 1947-femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs.
39ef6592 1948
a4a0016d 1949fext-numeric-literals
dcb466ec 1950C++ ObjC++ Var(flag_ext_numeric_literals) Init(1)
a4a0016d
ESR
1951Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding
1952number literal rather than a user-defined number literal.
1953
fef3106c 1954idirafter
61ff2bdc 1955C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1956-idirafter <dir> Add <dir> to the end of the system include path.
fef3106c
NB
1957
1958imacros
61ff2bdc 1959C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
a7b2e184 1960-imacros <file> Accept definition of macros in <file>.
fef3106c 1961
2b6dd222
JM
1962imultilib
1963C ObjC C++ ObjC++ Joined Separate
a7b2e184 1964-imultilib <dir> Set <dir> to be the multilib include subdirectory.
2b6dd222 1965
fef3106c 1966include
61ff2bdc 1967C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
a7b2e184 1968-include <file> Include the contents of <file> before other files.
fef3106c
NB
1969
1970iprefix
1971C ObjC C++ ObjC++ Joined Separate
a7b2e184 1972-iprefix <path> Specify <path> as a prefix for next two options.
fef3106c
NB
1973
1974isysroot
61ff2bdc 1975C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1976-isysroot <dir> Set <dir> to be the system root directory.
fef3106c
NB
1977
1978isystem
61ff2bdc 1979C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1980-isystem <dir> Add <dir> to the start of the system include path.
fef3106c 1981
4bed3787 1982iquote
61ff2bdc 1983C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
a7b2e184 1984-iquote <dir> Add <dir> to the end of the quote include path.
4bed3787 1985
fef3106c
NB
1986iwithprefix
1987C ObjC C++ ObjC++ Joined Separate
a7b2e184 1988-iwithprefix <dir> Add <dir> to the end of the system include path.
fef3106c
NB
1989
1990iwithprefixbefore
1991C ObjC C++ ObjC++ Joined Separate
a7b2e184 1992-iwithprefixbefore <dir> Add <dir> to the end of the main include path.
fef3106c
NB
1993
1994lang-asm
603349bf 1995C Undocumented RejectDriver
fef3106c 1996
e200444e
JM
1997no-integrated-cpp
1998Driver
1999
fef3106c
NB
2000nostdinc
2001C ObjC C++ ObjC++
a7b2e184 2002Do not search standard system include directories (those specified with -isystem will still be used).
fef3106c
NB
2003
2004nostdinc++
72de27ea 2005C++ ObjC++
a7b2e184 2006Do not search standard system include directories for C++.
fef3106c
NB
2007
2008o
2009C ObjC C++ ObjC++ Joined Separate
72de27ea 2010; Documented in common.opt
fef3106c
NB
2011
2012pedantic
c1771a20 2013C ObjC C++ ObjC++ Alias(Wpedantic)
72de27ea 2014; Documented in common.opt
fef3106c 2015
fef3106c
NB
2016print-objc-runtime-info
2017ObjC ObjC++
a7b2e184 2018Generate C header of platform-specific features.
fef3106c
NB
2019
2020remap
2021C ObjC C++ ObjC++
a7b2e184 2022Remap file names when including files.
fef3106c
NB
2023
2024std=c++98
2025C++ ObjC++
a7b2e184 2026Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
c7dc8804
JM
2027
2028std=c++03
2029C++ ObjC++ Alias(std=c++98)
a7b2e184 2030Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
fef3106c 2031
97e3ad20 2032std=c++11
966541e3 2033C++ ObjC++
a7b2e184 2034Conform to the ISO 2011 C++ standard.
97e3ad20
JM
2035
2036std=c++0x
70e24808 2037C++ ObjC++ Alias(std=c++11) Undocumented
a7b2e184 2038Deprecated in favor of -std=c++11.
966541e3 2039
552b8185 2040std=c++1y
028aee17 2041C++ ObjC++ Alias(std=c++14) Undocumented
a7b2e184 2042Deprecated in favor of -std=c++14.
70e24808
JM
2043
2044std=c++14
381bf11e 2045C++ ObjC++
a7b2e184 2046Conform to the ISO 2014 C++ standard.
552b8185 2047
da73100b 2048std=c++1z
7b936140
JJ
2049C++ ObjC++ Alias(std=c++17) Undocumented
2050Deprecated in favor of -std=c++17.
da73100b
JM
2051
2052std=c++17
7b936140
JJ
2053C++ ObjC++
2054Conform to the ISO 2017 C++ standard.
da73100b 2055
026a79f7
AS
2056std=c++2a
2057C++ ObjC++
2058Conform to the ISO 2020(?) C++ draft standard (experimental and incomplete support).
2059
48b0b196 2060std=c11
2778d766 2061C ObjC
a7b2e184 2062Conform to the ISO 2011 C standard.
48b0b196
JM
2063
2064std=c1x
2065C ObjC Alias(std=c11)
a7b2e184 2066Deprecated in favor of -std=c11.
2778d766 2067
c76dc9c3
JM
2068std=c17
2069C ObjC
7a8a92c4 2070Conform to the ISO 2017 C standard (published in 2018).
1e39313a
JM
2071
2072std=c18
2073C ObjC Alias(std=c17)
7a8a92c4 2074Conform to the ISO 2017 C standard (published in 2018).
c76dc9c3 2075
9f936c86
JM
2076std=c2x
2077C ObjC
2078Conform to the ISO 202X C standard draft (experimental and incomplete support).
2079
fef3106c 2080std=c89
5de8299c 2081C ObjC Alias(std=c90)
a7b2e184 2082Conform to the ISO 1990 C standard.
fef3106c 2083
7e1542b9
MLI
2084std=c90
2085C ObjC
a7b2e184 2086Conform to the ISO 1990 C standard.
7e1542b9 2087
fef3106c
NB
2088std=c99
2089C ObjC
a7b2e184 2090Conform to the ISO 1999 C standard.
fef3106c
NB
2091
2092std=c9x
5de8299c 2093C ObjC Alias(std=c99)
a7b2e184 2094Deprecated in favor of -std=c99.
fef3106c
NB
2095
2096std=gnu++98
2097C++ ObjC++
97e3ad20 2098Conform to the ISO 1998 C++ standard revised by the 2003 technical
a7b2e184 2099corrigendum with GNU extensions.
fef3106c 2100
97e3ad20
JM
2101std=gnu++03
2102C++ ObjC++ Alias(std=gnu++98)
2103Conform to the ISO 1998 C++ standard revised by the 2003 technical
a7b2e184 2104corrigendum with GNU extensions.
97e3ad20
JM
2105
2106std=gnu++11
966541e3 2107C++ ObjC++
a7b2e184 2108Conform to the ISO 2011 C++ standard with GNU extensions.
97e3ad20
JM
2109
2110std=gnu++0x
381bf11e 2111C++ ObjC++ Alias(std=gnu++11) Undocumented
a7b2e184 2112Deprecated in favor of -std=gnu++11.
966541e3 2113
552b8185 2114std=gnu++1y
028aee17 2115C++ ObjC++ Alias(std=gnu++14) Undocumented
a7b2e184 2116Deprecated in favor of -std=gnu++14.
552b8185 2117
a07f6ed2 2118std=gnu++14
028aee17 2119C++ ObjC++
a7b2e184 2120Conform to the ISO 2014 C++ standard with GNU extensions.
a07f6ed2 2121
da73100b 2122std=gnu++1z
7b936140
JJ
2123C++ ObjC++ Alias(std=gnu++17) Undocumented
2124Deprecated in favor of -std=gnu++17.
da73100b
JM
2125
2126std=gnu++17
7b936140
JJ
2127C++ ObjC++
2128Conform to the ISO 2017 C++ standard with GNU extensions.
da73100b 2129
026a79f7
AS
2130std=gnu++2a
2131C++ ObjC++
2132Conform to the ISO 2020(?) C++ draft standard with GNU extensions (experimental and incomplete support).
2133
48b0b196 2134std=gnu11
2778d766 2135C ObjC
a7b2e184 2136Conform to the ISO 2011 C standard with GNU extensions.
48b0b196
JM
2137
2138std=gnu1x
2139C ObjC Alias(std=gnu11)
a7b2e184 2140Deprecated in favor of -std=gnu11.
2778d766 2141
c76dc9c3
JM
2142std=gnu17
2143C ObjC
7a8a92c4 2144Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
1e39313a
JM
2145
2146std=gnu18
2147C ObjC Alias(std=gnu17)
7a8a92c4 2148Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
c76dc9c3 2149
9f936c86
JM
2150std=gnu2x
2151C ObjC
2152Conform to the ISO 202X C standard draft with GNU extensions (experimental and incomplete support).
2153
fef3106c 2154std=gnu89
5de8299c 2155C ObjC Alias(std=gnu90)
a7b2e184 2156Conform to the ISO 1990 C standard with GNU extensions.
fef3106c 2157
7e1542b9
MLI
2158std=gnu90
2159C ObjC
a7b2e184 2160Conform to the ISO 1990 C standard with GNU extensions.
7e1542b9 2161
fef3106c
NB
2162std=gnu99
2163C ObjC
a7b2e184 2164Conform to the ISO 1999 C standard with GNU extensions.
fef3106c
NB
2165
2166std=gnu9x
5de8299c 2167C ObjC Alias(std=gnu99)
a7b2e184 2168Deprecated in favor of -std=gnu99.
fef3106c
NB
2169
2170std=iso9899:1990
5de8299c 2171C ObjC Alias(std=c90)
a7b2e184 2172Conform to the ISO 1990 C standard.
fef3106c
NB
2173
2174std=iso9899:199409
2175C ObjC
a7b2e184 2176Conform to the ISO 1990 C standard as amended in 1994.
fef3106c
NB
2177
2178std=iso9899:1999
5de8299c 2179C ObjC Alias(std=c99)
a7b2e184 2180Conform to the ISO 1999 C standard.
fef3106c
NB
2181
2182std=iso9899:199x
5de8299c 2183C ObjC Alias(std=c99)
a7b2e184 2184Deprecated in favor of -std=iso9899:1999.
fef3106c 2185
48b0b196
JM
2186std=iso9899:2011
2187C ObjC Alias(std=c11)
a7b2e184 2188Conform to the ISO 2011 C standard.
48b0b196 2189
c76dc9c3
JM
2190std=iso9899:2017
2191C ObjC Alias(std=c17)
7a8a92c4 2192Conform to the ISO 2017 C standard (published in 2018).
1e39313a
JM
2193
2194std=iso9899:2018
2195C ObjC Alias(std=c17)
7a8a92c4 2196Conform to the ISO 2017 C standard (published in 2018).
c76dc9c3 2197
e200444e
JM
2198traditional
2199Driver
2200
fef3106c
NB
2201traditional-cpp
2202C ObjC C++ ObjC++
a7b2e184 2203Enable traditional preprocessing.
fef3106c
NB
2204
2205trigraphs
2206C ObjC C++ ObjC++
a7b2e184 2207-trigraphs Support ISO C trigraphs.
fef3106c
NB
2208
2209undef
5498f011 2210C ObjC C++ ObjC++ Var(flag_undef)
a7b2e184 2211Do not predefine system-specific and GCC-specific macros.
fef3106c
NB
2212
2213v
d5478783
JM
2214C ObjC C++ ObjC++
2215; Documented in common.opt
fef3106c
NB
2216
2217w
2218C ObjC C++ ObjC++
72de27ea 2219; Documented in common.opt
e11a4ae5
NB
2220
2221; This comment is to ensure we retain the blank line above.