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