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