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