Add assember CFI directives to millicode division and remainder routines.
[official-gcc.git] / gcc / c-family / c.opt
blob3333cddeece7e3920bd903eca7ab5e28411be1d2
1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003-2023 Free Software Foundation, Inc.
4 ; This file is part of GCC.
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.
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.
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/>.
20 ; See the GCC internals manual for a description of this file's format.
22 ; Please try to keep this file in ASCII collating order.
24 Language
27 Language
28 ObjC
30 Language
31 C++
33 Language
34 ObjC++
36 -all-warnings
37 C ObjC C++ ObjC++ Warning Alias(Wall)
39 -ansi
40 C ObjC C++ ObjC++ Alias(ansi)
42 -assert
43 C ObjC C++ ObjC++ Separate Alias(A) MissingArgError(assertion missing after %qs)
45 -assert=
46 C ObjC C++ ObjC++ Joined Alias(A) MissingArgError(assertion missing after %qs)
48 -comments
49 C ObjC C++ ObjC++ Alias(C)
51 -comments-in-macros
52 C ObjC C++ ObjC++ Alias(CC)
54 -define-macro
55 C ObjC C++ ObjC++ Separate Alias(D) MissingArgError(macro name missing after %qs)
57 -define-macro=
58 C ObjC C++ ObjC++ Joined Alias(D) MissingArgError(macro name missing after %qs)
60 -dependencies
61 C ObjC C++ ObjC++ Alias(M)
63 -dump
64 C ObjC C++ ObjC++ Separate Alias(d)
66 -dump=
67 C ObjC C++ ObjC++ Joined Alias(d)
69 -imacros
70 C ObjC C++ ObjC++ Separate Alias(imacros) MissingArgError(missing filename after %qs)
72 -imacros=
73 C ObjC C++ ObjC++ Joined Alias(imacros) MissingArgError(missing filename after %qs)
75 -include
76 C ObjC C++ ObjC++ Separate Alias(include) MissingArgError(missing filename after %qs)
78 -include=
79 C ObjC C++ ObjC++ Joined Alias(include) MissingArgError(missing filename after %qs)
81 -include-barrier
82 C ObjC C++ ObjC++ Alias(I, -)
84 -include-directory
85 C ObjC C++ ObjC++ Separate Alias(I) MissingArgError(missing path after %qs)
87 -include-directory=
88 C ObjC C++ ObjC++ Joined Alias(I) MissingArgError(missing path after %qs)
90 -include-directory-after
91 C ObjC C++ ObjC++ Separate Alias(idirafter) MissingArgError(missing path after %qs)
93 -include-directory-after=
94 C ObjC C++ ObjC++ Joined Alias(idirafter) MissingArgError(missing path after %qs)
96 -include-prefix
97 C ObjC C++ ObjC++ Separate Alias(iprefix)
99 -include-prefix=
100 C ObjC C++ ObjC++ JoinedOrMissing Alias(iprefix)
102 -include-with-prefix
103 C ObjC C++ ObjC++ Separate Alias(iwithprefix)
105 -include-with-prefix=
106 C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix)
108 -include-with-prefix-after
109 C ObjC C++ ObjC++ Separate Alias(iwithprefix)
111 -include-with-prefix-after=
112 C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix)
114 -include-with-prefix-before
115 C ObjC C++ ObjC++ Separate Alias(iwithprefixbefore)
117 -include-with-prefix-before=
118 C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefixbefore)
120 -no-integrated-cpp
121 Driver Alias(no-integrated-cpp)
123 -no-line-commands
124 C ObjC C++ ObjC++ Alias(P)
126 -no-standard-includes
127 C ObjC C++ ObjC++ Alias(nostdinc)
129 -no-warnings
130 C ObjC C++ ObjC++ Alias(w)
132 -output
133 C ObjC C++ ObjC++ Separate Alias(o)
135 -output=
136 C ObjC C++ ObjC++ Joined Alias(o)
138 -output-pch
139 C ObjC C++ ObjC++ Separate
141 -pedantic
142 C ObjC C++ ObjC++ Alias(pedantic)
144 -preprocess
145 C ObjC C++ ObjC++ Undocumented Alias(E)
147 -print-missing-file-dependencies
148 C ObjC C++ ObjC++ Alias(MG)
150 -trace-includes
151 C ObjC C++ ObjC++ Alias(H)
153 -traditional
154 Driver Alias(traditional)
156 -traditional-cpp
157 C ObjC C++ ObjC++ Alias(traditional-cpp)
159 -trigraphs
160 C ObjC C++ ObjC++ Alias(trigraphs)
162 -undefine-macro
163 C ObjC C++ ObjC++ Separate Alias(U) MissingArgError(macro name missing after %qs)
165 -undefine-macro=
166 C ObjC C++ ObjC++ Joined Alias(U) MissingArgError(macro name missing after %qs)
168 -user-dependencies
169 C ObjC C++ ObjC++ Alias(MM)
171 -verbose
172 Common C ObjC C++ ObjC++ Alias(v)
174 -write-dependencies
175 C ObjC C++ ObjC++ NoDriverArg Separate Alias(MD) MissingArgError(missing filename after %qs)
177 -write-user-dependencies
178 C ObjC C++ ObjC++ NoDriverArg Separate Alias(MMD) MissingArgError(missing filename after %qs)
181 C 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>.
185 C ObjC C++ ObjC++
186 Do not discard comments.
189 C ObjC C++ ObjC++
190 Do not discard comments in macro expansions.
193 C 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.
197 C ObjC C++ ObjC++ Undocumented Var(flag_preprocess_only)
200 Driver 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.
203 fgimple
204 C Var(flag_gimple) Init(0)
205 Enable parsing GIMPLE.
208 C ObjC C++ ObjC++
209 Print the name of header files as they are used.
212 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
213 -I <dir>        Add <dir> to the end of the main include path.
216 C ObjC C++ ObjC++
217 Generate make dependencies.
220 C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
221 Generate make dependencies and compile.
224 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
225 -MF <file>      Write dependency output to the given file.
228 C ObjC C++ ObjC++
229 Treat missing header files as generated files.
232 C ObjC C++ ObjC++
233 Like -M but ignore system header files.
236 C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
237 Like -MD but ignore system header files.
239 Mmodules
241 Generate C++ Module dependency information.
243 Mno-modules
245 ; undocumented
248 C ObjC C++ ObjC++
249 Generate phony targets for all headers.
252 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
253 -MQ <target>    Add a target that may require quoting.
256 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
257 -MT <target>    Add a target that does not require quoting.
260 C ObjC C++ ObjC++
261 Do not generate #line directives.
264 C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
265 -U<macro>       Undefine <macro>.
267 WNSObject-attribute
268 C ObjC C++ ObjC++ LTO Var(warn_nsobject_attribute) Warning Init(1)
269 Warn if the NSObject attribute is applied to a non-typedef.
271 Wabi
272 C ObjC C++ ObjC++ LTO Var(warn_abi) Warning
273 Warn about things that will change when compiling with an ABI-compliant compiler.
275 Wabi=
276 C ObjC C++ ObjC++ LTO Joined RejectNegative UInteger Warning
277 Warn about things that change between the current -fabi-version and the specified version.
279 Wabi-tag
280 C++ ObjC++ Var(warn_abi_tag) Warning
281 Warn if a subobject has an abi_tag attribute that the complete object type does not have.
283 Wpsabi
284 C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Warning Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi)
286 Wabsolute-value
287 C ObjC Var(warn_absolute_value) Warning EnabledBy(Wextra)
288 Warn on suspicious calls of standard functions computing absolute values.
290 Waddress
291 C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
292 Warn about suspicious uses of memory addresses.
294 Enum
295 Name(warn_aligned_new_level) Type(int) UnknownError(argument %qs to %<-Waligned-new%> not recognized)
297 EnumValue
298 Enum(warn_aligned_new_level) String(none) Value(0)
300 EnumValue
301 Enum(warn_aligned_new_level) String(global) Value(1)
303 EnumValue
304 Enum(warn_aligned_new_level) String(all) Value(2)
306 Waligned-new
307 C++ ObjC++ Alias(Waligned-new=,global,none)
308 Warn about 'new' of type with extended alignment without -faligned-new.
310 Waligned-new=
311 C++ ObjC++ Var(warn_aligned_new) Enum(warn_aligned_new_level) Joined RejectNegative Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
312 -Waligned-new=[none|global|all] Warn even if 'new' uses a class member allocation function.
314 Wall
315 C ObjC C++ ObjC++ Warning
316 Enable most warning messages.
318 Walloca
319 C ObjC C++ ObjC++ Var(warn_alloca) Warning
320 Warn on any use of alloca.
322 Walloc-size-larger-than=
323 C ObjC C++ LTO ObjC++ Var(warn_alloc_size_limit) Joined Host_Wide_Int ByteSize Warning Init(HOST_WIDE_INT_MAX)
324 -Walloc-size-larger-than=<bytes>        Warn for calls to allocation functions that
325 attempt to allocate objects larger than the specified number of bytes.
327 Wno-alloc-size-larger-than
328 C ObjC C++ LTO ObjC++ Alias(Walloc-size-larger-than=,18446744073709551615EiB,none) Warning
329 Disable Walloc-size-larger-than= warning.  Equivalent to Walloc-size-larger-than=<SIZE_MAX> or larger.
331 Walloc-zero
332 C ObjC C++ ObjC++ Var(warn_alloc_zero) Warning
333 Warn for calls to allocation functions that specify zero bytes.
335 Walloca-larger-than=
336 C ObjC C++ LTO ObjC++ Var(warn_alloca_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
337 -Walloca-larger-than=<number>   Warn on unbounded uses of
338 alloca, and on bounded uses of alloca whose bound can be larger than
339 <number> bytes.
341 Wno-alloca-larger-than
342 C ObjC C++ LTO ObjC++ Alias(Walloca-larger-than=,18446744073709551615EiB,none) Warning
343 Disable Walloca-larger-than= warning.  Equivalent to Walloca-larger-than=<SIZE_MAX> or larger.
345 Warray-bounds=
346 LangEnabledBy(C ObjC C++ LTO ObjC++,Wall,1,0)
347 ; in common.opt
349 Warray-compare
350 C ObjC C++ ObjC++ Var(warn_array_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
351 Warn about comparisons between two operands of array type.
353 Warray-parameter
354 C ObjC C++ ObjC++ Warning Alias(Warray-parameter=, 2, 0)
355 Warn about mismatched declarations of array parameters and unsafe accesses to them.
357 Warray-parameter=
358 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_array_parameter) IntegerRange(0, 2) LangEnabledBy(C ObjC C++ ObjC++,Wall, 2, 0) Warning
359 Warn about mismatched declarations of array parameters and unsafe accesses to them.
361 Wzero-length-bounds
362 C ObjC C++ ObjC++ Var(warn_zero_length_bounds) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
363 Warn about accesses to interior zero-length array members.
365 Wassign-intercept
366 ObjC ObjC++ Var(warn_assign_intercept) Warning
367 Warn whenever an Objective-C assignment is being intercepted by the garbage collector.
369 Wbad-function-cast
370 C ObjC Var(warn_bad_function_cast) Warning
371 Warn about casting functions to incompatible types.
373 Wbidi-chars
374 C ObjC C++ ObjC++ Warning Alias(Wbidi-chars=,any,none)
377 Wbidi-chars=
378 C ObjC C++ ObjC++ RejectNegative Joined Warning CPP(cpp_warn_bidirectional) CppReason(CPP_W_BIDIRECTIONAL) Var(warn_bidirectional) Init(bidirectional_unpaired) Enum(cpp_bidirectional_level) EnumSet
379 -Wbidi-chars=[none|unpaired|any|ucn] Warn about UTF-8 bidirectional control characters.
381 ; Required for these enum values.
382 SourceInclude
383 cpplib.h
385 Enum
386 Name(cpp_bidirectional_level) Type(int) UnknownError(argument %qs to %<-Wbidi-chars%> not recognized)
388 EnumValue
389 Enum(cpp_bidirectional_level) String(none) Value(bidirectional_none) Set(1)
391 EnumValue
392 Enum(cpp_bidirectional_level) String(unpaired) Value(bidirectional_unpaired) Set(1)
394 EnumValue
395 Enum(cpp_bidirectional_level) String(any) Value(bidirectional_any) Set(1)
397 EnumValue
398 Enum(cpp_bidirectional_level) String(ucn) Value(bidirectional_ucn) Set(2)
400 Wbool-compare
401 C ObjC C++ ObjC++ Var(warn_bool_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
402 Warn about boolean expression compared with an integer value different from true/false.
404 Wbool-operation
405 C ObjC C++ ObjC++ Var(warn_bool_op) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
406 Warn about certain operations on boolean expressions.
408 Wframe-address
409 C ObjC C++ ObjC++ Var(warn_frame_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
410 Warn when __builtin_frame_address or __builtin_return_address is used unsafely.
412 Wbuiltin-declaration-mismatch
413 C ObjC C++ ObjC++ Var(warn_builtin_declaration_mismatch) Init(1) Warning
414 Warn when a built-in function is declared with the wrong signature.
416 Wbuiltin-macro-redefined
417 C ObjC C++ ObjC++ CPP(warn_builtin_macro_redefined) CppReason(CPP_W_BUILTIN_MACRO_REDEFINED) Var(cpp_warn_builtin_macro_redefined) Init(1) Warning
418 Warn when a built-in preprocessor macro is undefined or redefined.
420 Wc11-c2x-compat
421 C ObjC CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT) Var(warn_c11_c2x_compat) Init(-1) Warning
422 Warn about features not present in ISO C11, but present in ISO C2X.
424 Wc90-c99-compat
425 C ObjC CPP(cpp_warn_c90_c99_compat) CppReason(CPP_W_C90_C99_COMPAT) Var(warn_c90_c99_compat) Init(-1) Warning
426 Warn about features not present in ISO C90, but present in ISO C99.
428 Wc99-c11-compat
429 C ObjC Var(warn_c99_c11_compat) Init(-1) Warning
430 Warn about features not present in ISO C99, but present in ISO C11.
432 Wc++-compat
433 C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPERATOR_NAMES) Init(0) Warning
434 Warn about C constructs that are not in the common subset of C and C++.
436 Wc++0x-compat
437 C++ ObjC++ Warning Alias(Wc++11-compat) Undocumented
439 Wc++11-compat
440 C++ ObjC++ Var(warn_cxx11_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT)
441 Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011.
443 Wc++14-compat
444 C++ ObjC++ Var(warn_cxx14_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
445 Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014.
447 Wc++1z-compat
448 C++ ObjC++ Warning Alias(Wc++17-compat) Undocumented
450 Wc++17-compat
451 C++ ObjC++ Var(warn_cxx17_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
452 Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017.
454 Wc++2a-compat
455 C++ ObjC++ Warning Alias(Wc++20-compat) Undocumented
457 Wc++20-compat
458 C++ ObjC++ Var(warn_cxx20_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx20_compat) CppReason(CPP_W_CXX20_COMPAT)
459 Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020.
461 Wc++11-extensions
462 C++ ObjC++ Var(warn_cxx11_extensions) Warning Init(1)
463 Warn about C++11 constructs in code compiled with an older standard.
465 Wc++14-extensions
466 C++ ObjC++ Var(warn_cxx14_extensions) Warning Init(1)
467 Warn about C++14 constructs in code compiled with an older standard.
469 Wc++17-extensions
470 C++ ObjC++ Var(warn_cxx17_extensions) Warning Init(1)
471 Warn about C++17 constructs in code compiled with an older standard.
473 Wc++20-extensions
474 C++ ObjC++ Var(warn_cxx20_extensions) Warning Init(1)
475 Warn about C++20 constructs in code compiled with an older standard.
477 Wc++23-extensions
478 C++ ObjC++ Var(warn_cxx23_extensions) Warning Init(1)
479 Warn about C++23 constructs in code compiled with an older standard.
481 Wcast-function-type
482 C ObjC C++ ObjC++ Var(warn_cast_function_type) Warning EnabledBy(Wextra)
483 Warn about casts between incompatible function types.
485 Wcast-qual
486 C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
487 Warn about casts which discard qualifiers.
489 Wcatch-value
490 C++ ObjC++ Warning Alias(Wcatch-value=, 1, 0)
491 Warn about catch handlers of non-reference type.
493 Wcatch-value=
494 C++ ObjC++ Var(warn_catch_value) Warning Joined RejectNegative UInteger LangEnabledBy(C++ ObjC++,Wall, 1, 0) IntegerRange(0, 3)
495 Warn about catch handlers of non-reference type.
497 Wchanges-meaning
498 C++ ObjC++ Var(warn_changes_meaning) Warning Init(1)
499 Complain about a name being declared as a class member after a previous use of the same name.
501 Wchar-subscripts
502 C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
503 Warn about subscripts whose type is \"char\".
505 Wchkp
506 C ObjC C++ ObjC++ Warning WarnRemoved
507 Removed in GCC 9.  This switch has no effect.
509 Wclobbered
510 C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra)
511 Warn about variables that might be changed by \"longjmp\" or \"vfork\".
513 Wcomma-subscript
514 C++ ObjC++ Var(warn_comma_subscript) Warning
515 Warn about uses of a comma operator within a subscripting expression.
517 Wcomment
518 C ObjC C++ ObjC++ CPP(warn_comments) CppReason(CPP_W_COMMENTS) Var(cpp_warn_comment) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
519 Warn about possibly nested block comments, and C++ comments spanning more than one physical line.
521 Wcomments
522 C ObjC C++ ObjC++ Warning Alias(Wcomment)
523 Synonym for -Wcomment.
525 Wconditionally-supported
526 C++ ObjC++ Var(warn_conditionally_supported) Warning
527 Warn for conditionally-supported constructs.
529 Wconversion
530 C ObjC C++ ObjC++ Var(warn_conversion) Warning
531 Warn for implicit type conversions that may change a value.
533 Wconversion-null
534 C++ ObjC++ Var(warn_conversion_null) Init(1) Warning
535 Warn for converting NULL from/to a non-pointer type.
537 Wcpp
538 C ObjC C++ ObjC++ CppReason(CPP_W_WARNING_DIRECTIVE)
539 ; Documented in common.opt
541 Wctad-maybe-unsupported
542 C++ ObjC++ Var(warn_ctad_maybe_unsupported) Warning
543 Warn when performing class template argument deduction on a type with no
544 deduction guides.
546 Wctor-dtor-privacy
547 C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning
548 Warn when all constructors and destructors are private.
550 Wdangling-else
551 C ObjC C++ ObjC++ Var(warn_dangling_else) Warning LangEnabledBy(C ObjC C++ ObjC++,Wparentheses)
552 Warn about dangling else.
554 Wdangling-pointer
555 C ObjC C++ LTO ObjC++ Alias(Wdangling-pointer=, 2, 0) Warning
556 Warn for uses of pointers to auto variables whose lifetime has ended.
558 Wdangling-pointer=
559 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_dangling_pointer) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 2, 0) IntegerRange(0, 2)
560 Warn for uses of pointers to auto variables whose lifetime has ended.
562 Wdangling-reference
563 C++ ObjC++ Var(warn_dangling_reference) Warning LangEnabledBy(C++ ObjC++, Wall)
564 Warn when a reference is bound to a temporary whose lifetime has ended.
566 Wdate-time
567 C ObjC C++ ObjC++ CPP(warn_date_time) CppReason(CPP_W_DATE_TIME) Var(cpp_warn_date_time) Init(0) Warning
568 Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage.
570 Wdeclaration-after-statement
571 C ObjC Var(warn_declaration_after_statement) Init(-1) Warning
572 Warn when a declaration is found after a statement.
574 Wdelete-incomplete
575 C++ ObjC++ Var(warn_delete_incomplete) Init(1) Warning
576 Warn when deleting a pointer to incomplete type.
578 Wdelete-non-virtual-dtor
579 C++ ObjC++ Var(warn_delnonvdtor) Warning LangEnabledBy(C++ ObjC++,Wall || Weffc++)
580 Warn about deleting polymorphic objects with non-virtual destructors.
582 Wdeprecated
583 C C++ ObjC ObjC++ CPP(cpp_warn_deprecated) CppReason(CPP_W_DEPRECATED)
584 ; Documented in common.opt
586 Wdeprecated-copy
587 C++ ObjC++ Var(warn_deprecated_copy) Warning LangEnabledBy(C++ ObjC++, Wextra)
588 Mark implicitly-declared copy operations as deprecated if the class has a
589 user-provided copy operation.
591 Wdeprecated-copy-dtor
592 C++ ObjC++ Var(warn_deprecated_copy, 2) Warning
593 Mark implicitly-declared copy operations as deprecated if the class has a
594 user-provided copy operation or destructor.
596 Wdeprecated-enum-enum-conversion
597 C++ ObjC++ Var(warn_deprecated_enum_enum_conv) Warning
598 Warn about deprecated arithmetic conversions on operands of enumeration types.
600 Wdeprecated-enum-float-conversion
601 C++ ObjC++ Var(warn_deprecated_enum_float_conv) Warning
602 Warn about deprecated arithmetic conversions on operands where one is of enumeration
603 type and the other is of a floating-point type.
605 Wdesignated-init
606 C ObjC Var(warn_designated_init) Init(1) Warning
607 Warn about positional initialization of structs requiring designated initializers.
609 Wdiscarded-array-qualifiers
610 C ObjC Var(warn_discarded_array_qualifiers) Init(1) Warning
611 Warn if qualifiers on arrays which are pointer targets are discarded.
613 Wdiscarded-qualifiers
614 C ObjC Var(warn_discarded_qualifiers) Init(1) Warning
615 Warn if type qualifiers on pointers are discarded.
617 Wdiv-by-zero
618 C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
619 Warn about compile-time integer division by zero.
621 Wduplicated-branches
622 C ObjC C++ ObjC++ Var(warn_duplicated_branches) Init(0) Warning
623 Warn about duplicated branches in if-else statements.
625 Wduplicated-cond
626 C ObjC C++ ObjC++ Var(warn_duplicated_cond) Init(0) Warning
627 Warn about duplicated conditions in an if-else-if chain.
629 Weffc++
630 C++ ObjC++ Var(warn_ecpp) Warning
631 Warn about violations of Effective C++ style rules.
633 Wempty-body
634 C ObjC C++ ObjC++ Var(warn_empty_body) Warning EnabledBy(Wextra)
635 Warn about an empty body in an if or else statement.
637 Wendif-labels
638 C 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)
639 Warn about stray tokens after #else and #endif.
641 Wenum-compare
642 C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat)
643 Warn about comparison of different enum types.
645 Wenum-conversion
646 C ObjC C++ ObjC++ Var(warn_enum_conversion) Init(0) Warning LangEnabledBy(C ObjC,Wextra)
647 Warn about implicit conversion of enum types.
649 Wenum-int-mismatch
650 C ObjC Var(warn_enum_int_mismatch) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat)
651 Warn about enum/integer type mismatches.
653 Werror
654 C ObjC C++ ObjC++
655 ; Documented in common.opt
657 Werror-implicit-function-declaration
658 C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
659 This switch is deprecated; use -Werror=implicit-function-declaration instead.
661 Wexceptions
662 C++ ObjC++ Var(warn_exceptions) Init(1) Warning
663 Warn when an exception handler is shadowed by another handler.
665 Wextra
666 C ObjC C++ ObjC++ Warning
667 ; in common.opt
669 Wextra-semi
670 C++ ObjC++ Var(warn_extra_semi) Warning
671 Warn about semicolon after in-class function definition.
673 Wfloat-conversion
674 C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion)
675 Warn for implicit type conversions that cause loss of floating point precision.
677 Wfloat-equal
678 C ObjC C++ ObjC++ Var(warn_float_equal) Warning
679 Warn if testing floating point numbers for equality.
681 Wformat
682 C ObjC C++ ObjC++ Warning Alias(Wformat=, 1, 0)
683 Warn about printf/scanf/strftime/strfmon format string anomalies.
685 Wformat-contains-nul
686 C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
687 Warn about format strings that contain NUL bytes.
689 Wformat-diag
690 C ObjC C++ ObjC++ Var(warn_format_diag) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
691 Warn about GCC format strings with strings unsuitable for diagnostics.
693 Wformat-extra-args
694 C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
695 Warn if passing too many arguments to a function for its format string.
697 Wformat-nonliteral
698 C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
699 Warn about format strings that are not literals.
701 Wformat-overflow
702 C ObjC C++ LTO ObjC++ Warning Alias(Wformat-overflow=, 1, 0) IntegerRange(0, 2)
703 Warn about function calls with format strings that write past the end
704 of the destination region.  Same as -Wformat-overflow=1.
706 Wformat-security
707 C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
708 Warn about possible security problems with format functions.
710 Wformat-signedness
711 C ObjC C++ ObjC++ Var(warn_format_signedness) Warning
712 Warn about sign differences with format functions.
714 Wformat-truncation
715 C ObjC C++ LTO ObjC++ Warning Alias(Wformat-truncation=, 1, 0)
716 Warn about calls to snprintf and similar functions that truncate output.
717 Same as -Wformat-truncation=1.
719 Wformat-y2k
720 C ObjC C++ ObjC++ Var(warn_format_y2k) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 2, 0)
721 Warn about strftime formats yielding 2-digit years.
723 Wformat-zero-length
724 C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 1, 0)
725 Warn about zero-length formats.
727 Wformat=
728 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
729 Warn about printf/scanf/strftime/strfmon format string anomalies.
731 Wformat-overflow=
732 C 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)
733 Warn about function calls with format strings that write past the end
734 of the destination region.
736 Wformat-truncation=
737 C 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)
738 Warn about calls to snprintf and similar functions that truncate output.
740 Wif-not-aligned
741 C ObjC C++ ObjC++ Var(warn_if_not_aligned) Init(1) Warning
742 Warn when the field in a struct is not aligned.
744 Wignored-qualifiers
745 C C++ Var(warn_ignored_qualifiers) Warning EnabledBy(Wextra)
746 Warn whenever type qualifiers are ignored.
748 Wignored-attributes
749 C C++ Var(warn_ignored_attributes) Init(1) Warning
750 Warn whenever attributes are ignored.
752 Winaccessible-base
753 C++ ObjC++ Var(warn_inaccessible_base) Init(1) Warning
754 Warn when a base is inaccessible in derived due to ambiguity.
756 Wincompatible-pointer-types
757 C ObjC Var(warn_incompatible_pointer_types) Init(1) Warning
758 Warn when there is a conversion between pointers that have incompatible types.
760 Winfinite-recursion
761 C ObjC C++ LTO ObjC++ Var(warn_infinite_recursion) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
762 Warn for infinitely recursive calls.
764 Waddress-of-packed-member
765 C ObjC C++ ObjC++ Var(warn_address_of_packed_member) Init(1) Warning
766 Warn when the address of packed member of struct or union is taken.
768 Winit-self
769 C ObjC C++ ObjC++ Var(warn_init_self) Warning LangEnabledBy(C++ ObjC++,Wall)
770 Warn about variables which are initialized to themselves.
772 Winit-list-lifetime
773 C++ ObjC++ Var(warn_init_list) Warning Init(1)
774 Warn about uses of std::initializer_list that can result in dangling pointers.
776 Winterference-size
777 C++ ObjC++ Var(warn_interference_size) Warning Init(1)
778 Warn about nonsensical values of --param destructive-interference-size or
779 constructive-interference-size.
781 Wimplicit
782 C ObjC Var(warn_implicit) Warning LangEnabledBy(C ObjC,Wall)
783 Warn about implicit declarations.
785 Wimplicit-fallthrough=
786 LangEnabledBy(C ObjC C++ ObjC++,Wextra,3,0)
787 ; in common.opt
789 Wdouble-promotion
790 C ObjC C++ ObjC++ Var(warn_double_promotion) Warning
791 Warn about implicit conversions from \"float\" to \"double\".
793 Wexpansion-to-defined
794 C 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)
795 Warn if \"defined\" is used outside #if.
797 Wimplicit-function-declaration
798 C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
799 Warn about implicit function declarations.
801 Wimplicit-int
802 C ObjC Var(warn_implicit_int) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
803 Warn when a declaration does not specify a type.
805 Wimport
806 C ObjC C++ ObjC++ Undocumented Ignore
808 Winherited-variadic-ctor
809 C++ ObjC++ Var(warn_inh_var_ctor) Init(1) Warning
810 Warn about C++11 inheriting constructors when the base has a variadic constructor.
812 Wint-conversion
813 C ObjC Var(warn_int_conversion) Init(1) Warning
814 Warn about incompatible integer to pointer and pointer to integer conversions.
816 Wint-in-bool-context
817 C ObjC C++ ObjC++ Var(warn_int_in_bool_context) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
818 Warn for suspicious integer expressions in boolean context.
820 Wint-to-pointer-cast
821 C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning
822 Warn when there is a cast to a pointer from an integer of a different size.
824 Winvalid-constexpr
825 C++ ObjC++ Var(warn_invalid_constexpr) Init(-1) Warning
826 Warn when a function never produces a constant expression.
828 Winvalid-offsetof
829 C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning
830 Warn about invalid uses of the \"offsetof\" macro.
832 Winvalid-pch
833 C ObjC C++ ObjC++ CPP(warn_invalid_pch) CppReason(CPP_W_INVALID_PCH) Var(cpp_warn_invalid_pch) Init(0) Warning
834 Warn about PCH files that are found but not used.
836 Winvalid-utf8
837 C ObjC C++ ObjC++ CPP(cpp_warn_invalid_utf8) CppReason(CPP_W_INVALID_UTF8) Var(warn_invalid_utf8) Init(0) Warning
838 Warn about invalid UTF-8 characters.
840 Wjump-misses-init
841 C ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C ObjC,Wc++-compat)
842 Warn when a jump misses a variable initialization.
844 Wliteral-suffix
845 C++ ObjC++ CPP(warn_literal_suffix) CppReason(CPP_W_LITERAL_SUFFIX) Var(cpp_warn_literal_suffix) Init(1) Warning
846 Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.
848 Wlogical-op
849 C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning
850 Warn when a logical operator is suspiciously always evaluating to true or false.
852 Wlogical-not-parentheses
853 C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
854 Warn when logical not is used on the left hand side operand of a comparison.
856 Wlong-long
857 C 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)
858 Do not warn about using \"long long\" when -pedantic.
860 Wmain
861 C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning LangEnabledBy(C ObjC,Wall, 2, 0)
862 Warn about suspicious declarations of \"main\".
864 Wmain
865 LangEnabledBy(C ObjC C++ ObjC++,Wpedantic, 2, 0)
868 Wmemset-transposed-args
869 C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
870 Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not.
872 Wmemset-elt-size
873 C ObjC C++ ObjC++ Var(warn_memset_elt_size) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
874 Warn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size.
876 Wmisleading-indentation
877 C C++ Common Var(warn_misleading_indentation) Warning LangEnabledBy(C C++,Wall)
878 Warn when the indentation of the code does not reflect the block structure.
880 Wmismatched-dealloc
881 C ObjC C++ ObjC++ Var(warn_mismatched_alloc) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
882 Warn for deallocation calls with arguments returned from mismatched allocation
883 functions.
885 Wmismatched-new-delete
886 C++ ObjC++ Var(warn_mismatched_new_delete) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
887 Warn for mismatches between calls to operator new or delete and the corresponding
888 call to the allocation or deallocation function.
890 Wmismatched-tags
891 C++ ObjC++ Var(warn_mismatched_tags) Warning
892 Warn when a class is redeclared or referenced using a mismatched class-key.
894 Wmissing-braces
895 C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
896 Warn about possibly missing braces around initializers.
898 Wmissing-declarations
899 C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
900 Warn about global functions without previous declarations.
902 Wmissing-field-initializers
903 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra)
904 Warn about missing fields in struct initializers.
906 Wmissing-requires
907 C++ ObjC++ Var(warn_missing_requires) Init(1) Warning
908 Warn about likely missing requires keyword.
910 Wmissing-template-keyword
911 C++ ObjC++ Var(warn_missing_template_keyword) Init(1) Warning
912 Warn when the template keyword is missing after a member access token in a dependent member access expression if that member is a template.
914 Wmultistatement-macros
915 C ObjC C++ ObjC++ Var(warn_multistatement_macros) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
916 Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for.
918 Wmultiple-inheritance
919 C++ ObjC++ Var(warn_multiple_inheritance) Warning
920 Warn on direct multiple inheritance.
922 Wnamespaces
923 C++ ObjC++ Var(warn_namespaces) Warning
924 Warn on namespace definition.
926 Wpacked-not-aligned
927 C ObjC C++ ObjC++ Var(warn_packed_not_aligned) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
928 Warn when fields in a struct with the packed attribute are misaligned.
930 Wrange-loop-construct
931 C++ ObjC++ Var(warn_range_loop_construct) Warning LangEnabledBy(C++ ObjC++,Wall)
932 Warn when a range-based for-loop is creating unnecessary copies.
934 Wredundant-tags
935 C++ ObjC++ Var(warn_redundant_tags) Warning
936 Warn when a class or enumerated type is referenced using a redundant class-key.
938 Wsized-deallocation
939 C++ ObjC++ Var(warn_sized_deallocation) Warning EnabledBy(Wextra)
940 Warn about missing sized deallocation functions.
942 Wsizeof-pointer-div
943 C ObjC C++ ObjC++ Var(warn_sizeof_pointer_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
944 Warn about suspicious divisions of two sizeof expressions that don't work correctly with pointers.
946 Wsizeof-array-div
947 C ObjC C++ ObjC++ Var(warn_sizeof_array_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
948 Warn about divisions of two sizeof operators when the first one is applied
949 to an array and the divisor does not equal the size of the array element.
951 Wsizeof-pointer-memaccess
952 C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
953 Warn about suspicious length parameters to certain string functions if the argument uses sizeof.
955 Wsizeof-array-argument
956 C ObjC C++ ObjC++ Var(warn_sizeof_array_argument) Warning Init(1)
957 Warn when sizeof is applied on a parameter declared as an array.
959 Wstring-compare
960 C ObjC C++ LTO ObjC++ Warning Var(warn_string_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wextra)
961 Warn about calls to strcmp and strncmp used in equality expressions that
962 are necessarily true or false due to the length of one and size of the other
963 argument.
965 Wstringop-overflow
966 C ObjC C++ LTO ObjC++ Warning Alias(Wstringop-overflow=, 2, 0)
967 Warn about buffer overflow in string manipulation functions like memcpy
968 and strcpy.
970 Wstringop-overflow=
971 C 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)
972 Under the control of Object Size type, warn about buffer overflow in string
973 manipulation functions like memcpy and strcpy.
975 Wstringop-overread
976 C ObjC C++ LTO ObjC++ Var(warn_stringop_overread) Init(1) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
977 Warn about reading past the end of a source array in string manipulation functions like memchr and memcpy.
979 Wstringop-truncation
980 C ObjC C++ LTO ObjC++ Var(warn_stringop_truncation) Warning Init (1) LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
981 Warn about truncation in string manipulation functions like strncat and strncpy.
983 Wstrict-flex-arrays
984 C C++ Var(warn_strict_flex_arrays) Warning
985 Warn about inproper usages of flexible array members
986 according to the level of -fstrict-flex-arrays.
988 Wsuggest-attribute=format
989 C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning
990 Warn about functions which might be candidates for format attributes.
992 Wsuggest-override
993 C++ ObjC++ Var(warn_override) Warning
994 Suggest that the override keyword be used when the declaration of a virtual
995 function overrides another.
997 Wswitch
998 C ObjC C++ ObjC++ Var(warn_switch) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
999 Warn about enumerated switches, with no default, missing a case.
1001 Wswitch-default
1002 C ObjC C++ ObjC++ Var(warn_switch_default) Warning
1003 Warn about enumerated switches missing a \"default:\" statement.
1005 Wswitch-enum
1006 C ObjC C++ ObjC++ Var(warn_switch_enum) Warning
1007 Warn about all enumerated switches missing a specific case.
1009 Wswitch-bool
1010 C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1)
1011 Warn about switches with boolean controlling expression.
1013 Wswitch-outside-range
1014 C ObjC C++ ObjC++ Var(warn_switch_outside_range) Warning Init(1)
1015 Warn about switch values that are outside of the switch's type range.
1017 Wtemplates
1018 C++ ObjC++ Var(warn_templates) Warning
1019 Warn on primary template declaration.
1021 Wmissing-attributes
1022 C ObjC C++ ObjC++ Var(warn_missing_attributes) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1023 Warn about declarations of entities that may be missing attributes
1024 that related entities have been declared with.
1026 Wmissing-format-attribute
1027 C ObjC C++ ObjC++ Warning Alias(Wsuggest-attribute=format)
1030 Wmissing-include-dirs
1031 C ObjC C++ ObjC++ CPP(warn_missing_include_dirs) CppReason(CPP_W_MISSING_INCLUDE_DIRS) Var(cpp_warn_missing_include_dirs) Init(0) Warning
1032 Warn about user-specified include directories that do not exist.
1034 Wmissing-parameter-type
1035 C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra)
1036 Warn about function parameters declared without a type specifier in K&R-style functions.
1038 Wmissing-prototypes
1039 C ObjC Var(warn_missing_prototypes) Warning
1040 Warn about global functions without prototypes.
1042 Wmudflap
1043 C ObjC C++ ObjC++ WarnRemoved
1045 Wmultichar
1046 C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning
1047 Warn about use of multi-character character constants.
1049 Wnarrowing
1050 C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++11-compat)
1051 Warn about narrowing conversions within { } that are ill-formed in C++11.
1053 Wnested-externs
1054 C ObjC Var(warn_nested_externs) Warning
1055 Warn about \"extern\" declarations not at file scope.
1057 Wnoexcept
1058 C++ ObjC++ Var(warn_noexcept) Warning
1059 Warn when a noexcept expression evaluates to false even though the expression can't actually throw.
1061 Wnoexcept-type
1062 C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++17-compat)
1063 Warn if C++17 noexcept function type will change the mangled name of a symbol.
1065 Wnon-template-friend
1066 C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
1067 Warn when non-templatized friend functions are declared within a template.
1069 Wclass-conversion
1070 C++ ObjC++ Var(warn_class_conversion) Init(1) Warning
1071 Warn when a conversion function will never be called due to the type it converts to.
1073 Wclass-memaccess
1074 C++ ObjC++ Var(warn_class_memaccess) Warning LangEnabledBy(C++ ObjC++, Wall)
1075 Warn for unsafe raw memory writes to objects of class types.
1077 Wnon-virtual-dtor
1078 C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
1079 Warn about non-virtual destructors.
1081 Wnonnull
1082 C ObjC C++ LTO ObjC++ Var(warn_nonnull) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=,warn_format >= 1,0)
1083 Warn about NULL being passed to argument slots marked as requiring non-NULL.
1085 Wnonnull
1086 C ObjC C++ LTO ObjC++ LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
1089 Wnonnull-compare
1090 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1093 Wnormalized
1094 C ObjC C++ ObjC++ Warning Alias(Wnormalized=,nfc,none)
1097 Wnormalized=
1098 C ObjC C++ ObjC++ RejectNegative Joined Warning CPP(warn_normalize) CppReason(CPP_W_NORMALIZE) Init(normalized_C) Var(cpp_warn_normalize) Enum(cpp_normalize_level)
1099 -Wnormalized=[none|id|nfc|nfkc] Warn about non-normalized Unicode strings.
1101 ; Required for these enum values.
1102 SourceInclude
1103 cpplib.h
1105 Enum
1106 Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
1108 EnumValue
1109 Enum(cpp_normalize_level) String(none) Value(normalized_none)
1111 EnumValue
1112 Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC)
1114 EnumValue
1115 Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C)
1117 EnumValue
1118 Enum(cpp_normalize_level) String(nfc) Value(normalized_C)
1120 Wobjc-root-class
1121 ObjC ObjC++ Var(warn_objc_root_class) Warning Init(1)
1122 Warn if a class interface has no superclass.  Root classes may use an attribute
1123 to suppress this warning.
1125 Wold-style-cast
1126 C++ ObjC++ Var(warn_old_style_cast) Warning
1127 Warn if a C-style cast is used in a program.
1129 Wold-style-declaration
1130 C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra)
1131 Warn for obsolescent usage in a declaration.
1133 Wold-style-definition
1134 C ObjC Var(warn_old_style_definition) Init(-1) Warning
1135 Warn if an old-style parameter definition is used.
1137 Wopenacc-parallelism
1138 C C++ Var(warn_openacc_parallelism) Warning
1139 Warn about potentially suboptimal choices related to OpenACC parallelism.
1141 Wopenmp-simd
1142 C C++ Var(warn_openmp_simd) Warning LangEnabledBy(C C++,Wall)
1143 Warn if a simd directive is overridden by the vectorizer cost model.
1145 Woverlength-strings
1146 C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
1147 Warn if a string is longer than the maximum portable length specified by the standard.
1149 Woverloaded-virtual
1150 C++ ObjC++ Warning Alias(Woverloaded-virtual=,2,0)
1151 Warn about overloaded virtual function names.
1153 Woverloaded-virtual=
1154 C++ ObjC++ Joined UInteger IntegerRange(0,2) Var(warn_overloaded_virtual) Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
1155 Warn about overloaded virtual function names.
1157 Woverride-init
1158 C ObjC Var(warn_override_init) Warning EnabledBy(Wextra)
1159 Warn about overriding initializers without side effects.
1161 Woverride-init-side-effects
1162 C ObjC Var(warn_override_init_side_effects) Init(1) Warning
1163 Warn about overriding initializers with side effects.
1165 Wpacked-bitfield-compat
1166 C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
1167 Warn about packed bit-fields whose offset changed in GCC 4.4.
1169 Wparentheses
1170 C ObjC C++ ObjC++ Var(warn_parentheses) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1171 Warn about possibly missing parentheses.
1173 Wpedantic
1174 C ObjC C++ ObjC++ CPP(cpp_pedantic) CppReason(CPP_W_PEDANTIC) Warning
1175 ; Documented in common.opt
1177 Wpessimizing-move
1178 C++ ObjC++ Var(warn_pessimizing_move) Warning LangEnabledBy(C++ ObjC++, Wall)
1179 Warn about calling std::move on a local object in a return statement preventing copy elision.
1181 Wpmf-conversions
1182 C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
1183 Warn when converting the type of pointers to member functions.
1185 Wpointer-arith
1186 C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
1187 Warn about function pointer arithmetic.
1189 Wpointer-sign
1190 C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic)
1191 Warn when a pointer differs in signedness in an assignment.
1193 Wpointer-compare
1194 C ObjC C++ ObjC++ Var(warn_pointer_compare) Init(1) Warning
1195 Warn when a pointer is compared with a zero character constant.
1197 Wpointer-to-int-cast
1198 C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
1199 Warn when a pointer is cast to an integer of a different size.
1201 Wpragmas
1202 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
1203 Warn about misuses of pragmas.
1205 Wprio-ctor-dtor
1206 C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
1207 Warn if constructor or destructors with priorities from 0 to 100 are used.
1209 Wproperty-assign-default
1210 ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning
1211 Warn if a property for an Objective-C object has no assign semantics specified.
1213 Wprotocol
1214 ObjC ObjC++ Var(warn_protocol) Init(1) Warning
1215 Warn if inherited methods are unimplemented.
1217 Wplacement-new
1218 C++ Warning Alias(Wplacement-new=, 1, 0)
1219 Warn for placement new expressions with undefined behavior.
1221 Wplacement-new=
1222 C++ Joined RejectNegative UInteger Var(warn_placement_new) Init(-1) Warning IntegerRange(0, 2)
1223 Warn for placement new expressions with undefined behavior.
1225 Wredundant-decls
1226 C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
1227 Warn about multiple declarations of the same object.
1229 Wredundant-move
1230 C++ ObjC++ Var(warn_redundant_move) Warning LangEnabledBy(C++ ObjC++,Wextra)
1231 Warn about redundant calls to std::move.
1233 Wregister
1234 C++ ObjC++ Var(warn_register) Warning
1235 Warn about uses of register storage specifier.
1237 Wreorder
1238 C++ ObjC++ Var(warn_reorder) Warning LangEnabledBy(C++ ObjC++,Wall)
1239 Warn when the compiler reorders code.
1241 Wreturn-type
1242 C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) Init(-1)
1243 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++).
1245 Wscalar-storage-order
1246 C ObjC C++ ObjC++ Var(warn_scalar_storage_order) Init(1) Warning
1247 Warn on suspicious constructs involving reverse scalar storage order.
1249 Wselector
1250 ObjC ObjC++ Var(warn_selector) Warning
1251 Warn if a selector has multiple methods.
1253 Wself-move
1254 C++ ObjC++ Var(warn_self_move) Warning LangEnabledBy(C++ ObjC++, Wall)
1255 Warn when a value is moved to itself with std::move.
1257 Wsequence-point
1258 C ObjC C++ ObjC++ Var(warn_sequence_point) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1259 Warn about possible violations of sequence point rules.
1261 Wshadow-ivar
1262 ObjC ObjC++ Var(warn_shadow_ivar) EnabledBy(Wshadow) Init(1) Warning
1263 Warn if a local declaration hides an instance variable.
1265 Wshift-overflow
1266 C ObjC C++ ObjC++ Warning Alias(Wshift-overflow=, 1, 0)
1267 Warn if left shift of a signed value overflows.
1269 Wshift-overflow=
1270 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_shift_overflow) Init(-1) Warning IntegerRange(0, 2)
1271 Warn if left shift of a signed value overflows.
1273 Wshift-count-negative
1274 C ObjC C++ ObjC++ Var(warn_shift_count_negative) Init(1) Warning
1275 Warn if shift count is negative.
1277 Wshift-count-overflow
1278 C ObjC C++ ObjC++ Var(warn_shift_count_overflow) Init(1) Warning
1279 Warn if shift count >= width of type.
1281 Wshift-negative-value
1282 C ObjC C++ ObjC++ Var(warn_shift_negative_value) Init(-1) Warning
1283 Warn if left shifting a negative value.
1285 Warith-conversion
1286 C ObjC C++ ObjC++ Var(warn_arith_conv) Warning
1287 Warn if conversion of the result of arithmetic might change the value even though converting the operands cannot.
1289 Wsign-compare
1290 C ObjC C++ ObjC++ Var(warn_sign_compare) Warning LangEnabledBy(C++ ObjC++,Wall)
1291 Warn about signed-unsigned comparisons.
1293 Wsign-compare
1294 C ObjC C++ ObjC++ EnabledBy(Wextra)
1297 Wsign-conversion
1298 C ObjC C++ ObjC++ Var(warn_sign_conversion) Warning LangEnabledBy(C ObjC,Wconversion)
1299 Warn for implicit type conversions between signed and unsigned integers.
1301 Wsign-promo
1302 C++ ObjC++ Var(warn_sign_promo) Warning
1303 Warn when overload promotes from unsigned to signed.
1305 Wstrict-null-sentinel
1306 C++ ObjC++ Warning Var(warn_strict_null_sentinel)
1307 Warn about uncasted NULL used as sentinel.
1309 Wstrict-prototypes
1310 C ObjC Var(warn_strict_prototypes) Warning
1311 Warn about unprototyped function declarations.
1313 Wstrict-aliasing=
1314 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0) IntegerRange(0, 3)
1317 Wstrict-overflow=
1318 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 5)
1321 Wstrict-selector-match
1322 ObjC ObjC++ Var(warn_strict_selector_match) Warning
1323 Warn if type signatures of candidate methods do not match exactly.
1325 Wsync-nand
1326 C C++ Var(warn_sync_nand) Init(1) Warning
1327 Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used.
1329 Wsynth
1330 C++ ObjC++ Var(warn_synth) Warning
1331 Deprecated.  This switch has no effect.
1333 Wsystem-headers
1334 C ObjC C++ ObjC++ Warning
1335 ; Documented in common.opt
1337 Wtautological-compare
1338 C ObjC C++ ObjC++ Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1339 Warn if a comparison always evaluates to true or false.
1341 Wterminate
1342 C++ ObjC++ Warning Var(warn_terminate) Init(1)
1343 Warn if a throw expression will always result in a call to terminate().
1345 Wtraditional
1346 C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning
1347 Warn about features not present in traditional C.
1349 Wtraditional-conversion
1350 C ObjC Var(warn_traditional_conversion) Warning
1351 Warn of prototypes causing type conversions different from what would happen in the absence of prototype.
1353 Wtrigraphs
1354 C ObjC C++ ObjC++ CPP(warn_trigraphs) CppReason(CPP_W_TRIGRAPHS) Var(cpp_warn_trigraphs) Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1355 Warn if trigraphs are encountered that might affect the meaning of the program.
1357 Wundeclared-selector
1358 ObjC ObjC++ Var(warn_undeclared_selector) Warning
1359 Warn about @selector()s without previously declared methods.
1361 Wundef
1362 C ObjC C++ ObjC++ CPP(warn_undef) CppReason(CPP_W_UNDEF) Var(cpp_warn_undef) Init(0) Warning
1363 Warn if an undefined macro is used in an #if directive.
1365 Wunicode
1366 C ObjC C++ ObjC++ CPP(cpp_warn_unicode) CppReason(CPP_W_UNICODE) Var(warn_unicode) Init(1) Warning
1367 Warn about invalid forms of delimited or named escape sequences.
1369 Wuninitialized
1370 C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
1373 Wmaybe-uninitialized
1374 C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
1377 Wunknown-pragmas
1378 C ObjC C++ ObjC++ Warning Var(warn_unknown_pragmas) LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0)
1379 Warn about unrecognized pragmas.
1381 Wunsuffixed-float-constants
1382 C ObjC Var(warn_unsuffixed_float_constants) Warning
1383 Warn about unsuffixed float constants.
1385 Wunused
1386 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1387 ; documented in common.opt
1389 Wunused-local-typedefs
1390 C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
1391 Warn when typedefs locally defined in a function are not used.
1393 Wunused-macros
1394 C ObjC C++ ObjC++ CppReason(CPP_W_UNUSED_MACROS) Var(cpp_warn_unused_macros) Warning
1395 Warn about macros defined in the main file that are not used.
1397 Wunused-result
1398 C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning
1399 Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.
1401 Wunused-variable
1402 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wunused)
1403 ; documented in common.opt
1405 Wunused-const-variable
1406 C ObjC C++ ObjC++ Warning Alias(Wunused-const-variable=, 2, 0)
1407 Warn when a const variable is unused.
1409 Wunused-const-variable=
1410 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(C ObjC,Wunused-variable, 1, 0) IntegerRange(0, 2)
1411 Warn when a const variable is unused.
1413 ; Defining this option here in addition to common.opt is necessary
1414 ; in order for the default -Wall setting of -Wuse-after-free=2 to take
1415 ; effect.
1417 Wuse-after-free=
1418 LangEnabledBy(C ObjC C++ LTO ObjC++, Wall,2,0)
1419 ; in common.opt
1421 Wvariadic-macros
1422 C 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)
1423 Warn about using variadic macros.
1425 Wvarargs
1426 C ObjC C++ ObjC++ Warning Var(warn_varargs) Init(1)
1427 Warn about questionable usage of the macros used to retrieve variable arguments.
1429 Wvexing-parse
1430 C++ ObjC++ Warning Var(warn_vexing_parse) Init(1)
1431 Warn about the most vexing parse syntactic ambiguity.
1433 Wvla
1434 C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
1435 Warn if a variable length array is used.
1437 Wvla-larger-than=
1438 C ObjC C++ LTO ObjC++ Var(warn_vla_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
1439 -Wvla-larger-than=<number>      Warn on unbounded uses of variable-length
1440 arrays, and on bounded uses of variable-length arrays whose bound can be
1441 larger than <number> bytes.
1443 Wno-vla-larger-than
1444 C ObjC C++ LTO ObjC++ Alias(Wvla-larger-than=,18446744073709551615EiB,none) Warning
1445 Disable Wvla-larger-than= warning.  Equivalent to Wvla-larger-than=<SIZE_MAX> or larger.
1447 Wvla-parameter
1448 C ObjC C++ ObjC++ Var(warn_vla_parameter) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1449 Warn about mismatched declarations of VLA parameters.
1451 Wvolatile
1452 C++ ObjC++ Var(warn_volatile) Warning
1453 Warn about deprecated uses of volatile qualifier.
1455 Wvolatile-register-var
1456 C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1457 Warn when a register variable is declared volatile.
1459 Wvirtual-inheritance
1460 C++ ObjC++ Var(warn_virtual_inheritance) Warning
1461 Warn on direct virtual inheritance.
1463 Wvirtual-move-assign
1464 C++ ObjC++ Var(warn_virtual_move_assign) Warning Init(1)
1465 Warn if a virtual base has a non-trivial move assignment operator.
1467 Wwrite-strings
1468 C ObjC C++ ObjC++ Var(warn_write_strings) Warning
1469 In 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.
1471 Wxor-used-as-pow
1472 C ObjC C++ ObjC++ Var(warn_xor_used_as_pow) Warning Init(1)
1473 Warn about xor operators where it appears the user meant exponentiation.
1475 Wzero-as-null-pointer-constant
1476 C++ ObjC++ Var(warn_zero_as_null_pointer_constant) Warning
1477 Warn when a literal '0' is used as null pointer.
1479 Wuseless-cast
1480 C++ ObjC++ Var(warn_useless_cast) Warning
1481 Warn about useless casts.
1483 Wsubobject-linkage
1484 C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1)
1485 Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage.
1487 Wduplicate-decl-specifier
1488 C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall)
1489 Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier.
1491 Wrestrict
1492 C ObjC C++ ObjC++ Var(warn_restrict) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
1493 Warn when an argument passed to a restrict-qualified parameter aliases with
1494 another argument.
1496 ansi
1497 C ObjC C++ ObjC++
1498 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
1501 C ObjC C++ ObjC++ Joined
1502 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
1504 fabi-compat-version=
1505 C++ ObjC++ Joined RejectNegative UInteger Var(flag_abi_compat_version) Init(-1)
1506 The version of the C++ ABI used for -Wabi warnings and link compatibility aliases.
1508 faccess-control
1509 C++ ObjC++ Var(flag_access_control) Init(1)
1510 Enforce class member access control semantics.
1512 fada-spec-parent=
1513 C ObjC C++ ObjC++ RejectNegative Joined Var(ada_specs_parent)
1514 -fada-spec-parent=unit  Dump Ada specs as child units of given parent.
1516 faligned-new
1517 C++ ObjC++ Alias(faligned-new=,1,0)
1518 Support C++17 allocation of over-aligned types.
1520 faligned-new=
1521 C++ ObjC++ Joined RejectNegative Var(aligned_new_threshold) UInteger Init(-1)
1522 -faligned-new=<N>       Use C++17 over-aligned type allocation for alignments greater than N.
1524 fall-virtual
1525 C++ ObjC++ WarnRemoved
1527 fallow-parameterless-variadic-functions
1528 C ObjC Ignore
1529 Does nothing. Preserved for backward compatibility.
1531 falt-external-templates
1532 C++ ObjC++ WarnRemoved
1533 No longer supported.
1535 fasm
1536 C ObjC C++ ObjC++ Var(flag_no_asm, 0)
1537 Recognize the \"asm\" keyword.
1539 ; Define extra predefined macros for use in libgcc.
1540 fbuilding-libgcc
1541 C ObjC C++ ObjC++ Undocumented Var(flag_building_libgcc)
1543 fbuiltin
1544 C ObjC C++ ObjC++ Var(flag_no_builtin, 0)
1545 Recognize built-in functions.
1547 fbuiltin-
1548 C ObjC C++ ObjC++ Joined
1550 fcanonical-system-headers
1551 C ObjC C++ ObjC++
1552 Where shorter, use canonicalized paths to systems headers.
1554 fchar8_t
1555 C++ ObjC++ Var(flag_char8_t) Init(-1)
1556 Enable the char8_t fundamental type and use it as the type for UTF-8 string
1557 and character literals.
1559 fcheck-pointer-bounds
1560 C ObjC C++ ObjC++ LTO WarnRemoved
1561 Removed in GCC 9.  This switch has no effect.
1563 fchkp-check-incomplete-type
1564 C ObjC C++ ObjC++ LTO WarnRemoved
1565 Removed in GCC 9.  This switch has no effect.
1567 fchkp-zero-input-bounds-for-main
1568 C ObjC C++ ObjC++ LTO WarnRemoved
1569 Removed in GCC 9.  This switch has no effect.
1571 fchkp-first-field-has-own-bounds
1572 C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
1573 Removed in GCC 9.  This switch has no effect.
1575 fchkp-narrow-bounds
1576 C ObjC C++ ObjC++ LTO WarnRemoved
1577 Removed in GCC 9.  This switch has no effect.
1579 fchkp-narrow-to-innermost-array
1580 C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
1581 Removed in GCC 9.  This switch has no effect.
1583 fchkp-flexible-struct-trailing-arrays
1584 C ObjC C++ ObjC++ LTO WarnRemoved
1585 Removed in GCC 9.  This switch has no effect.
1587 fchkp-optimize
1588 C ObjC C++ ObjC++ LTO WarnRemoved
1590 fchkp-use-fast-string-functions
1591 C ObjC C++ ObjC++ LTO WarnRemoved
1592 Removed in GCC 9.  This switch has no effect.
1594 fchkp-use-nochk-string-functions
1595 C ObjC C++ ObjC++ LTO WarnRemoved
1596 Removed in GCC 9.  This switch has no effect.
1598 fchkp-use-static-bounds
1599 C ObjC C++ ObjC++ LTO WarnRemoved
1600 Removed in GCC 9.  This switch has no effect.
1602 fchkp-use-static-const-bounds
1603 C ObjC C++ ObjC++ LTO WarnRemoved
1604 Removed in GCC 9.  This switch has no effect.
1606 fchkp-treat-zero-dynamic-size-as-infinite
1607 C ObjC C++ ObjC++ LTO WarnRemoved
1608 Removed in GCC 9.  This switch has no effect.
1610 fchkp-check-read
1611 C ObjC C++ ObjC++ LTO WarnRemoved
1612 Removed in GCC 9.  This switch has no effect.
1614 fchkp-check-write
1615 C ObjC C++ ObjC++ LTO WarnRemoved
1616 Removed in GCC 9.  This switch has no effect.
1618 fchkp-store-bounds
1619 C ObjC C++ ObjC++ LTO WarnRemoved
1620 Removed in GCC 9.  This switch has no effect.
1622 fchkp-instrument-calls
1623 C ObjC C++ ObjC++ LTO WarnRemoved
1624 Removed in GCC 9.  This switch has no effect.
1626 fchkp-instrument-marked-only
1627 C ObjC C++ ObjC++ LTO WarnRemoved
1628 Removed in GCC 9.  This switch has no effect.
1630 fchkp-use-wrappers
1631 C ObjC C++ ObjC++ LTO WarnRemoved
1632 Removed in GCC 9.  This switch has no effect.
1634 static-libmpx
1635 Driver WarnRemoved
1636 Removed in GCC 9.  This switch has no effect.
1638 static-libmpxwrappers
1639 Driver WarnRemoved
1640 Removed in GCC 9.  This switch has no effect.
1642 fcilkplus
1643 C ObjC C++ ObjC++ LTO Undocumented Ignore
1644 Removed in GCC 8.  This switch has no effect.
1646 fconcepts
1647 C++ ObjC++ Var(flag_concepts)
1648 Enable support for C++ concepts.
1650 fconcepts-ts
1651 C++ ObjC++ Var(flag_concepts_ts) Init(0)
1652 Enable certain features present in the Concepts TS.
1654 fconcepts-diagnostics-depth=
1655 C++ ObjC++ Joined RejectNegative UInteger Var(concepts_diagnostics_max_depth) Init(1)
1656 Specify maximum error replay depth during recursive diagnosis of a constraint satisfaction failure.
1658 fcond-mismatch
1659 C ObjC C++ ObjC++
1660 Allow the arguments of the '?' operator to have different types.
1662 fconserve-space
1663 C++ ObjC++ Ignore
1664 Does nothing.  Preserved for backward compatibility.
1666 fconstant-string-class=
1667 ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
1668 -fconst-string-class=<name>     Use class <name> for constant strings.
1670 fconstexpr-depth=
1671 C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512)
1672 -fconstexpr-depth=<number>      Specify maximum constexpr recursion depth.
1674 fconstexpr-cache-depth=
1675 C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_cache_depth) Init(8)
1676 -fconstexpr-cache-depth=<number>        Specify maximum constexpr recursion cache depth.
1678 fconstexpr-fp-except
1679 C++ ObjC++ Var(flag_constexpr_fp_except) Init(0)
1680 Allow IEC559 floating point exceptions in constant expressions.
1682 fconstexpr-loop-limit=
1683 C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_loop_limit) Init(262144)
1684 -fconstexpr-loop-limit=<number> Specify maximum constexpr loop iteration count.
1686 fconstexpr-ops-limit=
1687 C++ ObjC++ Joined RejectNegative Host_Wide_Int Var(constexpr_ops_limit) Init(33554432)
1688 -fconstexpr-ops-limit=<number>  Specify maximum number of constexpr operations during a single constexpr evaluation.
1690 fcontracts
1691 C++ ObjC++ Var(flag_contracts) Init(0)
1692 Enable certain features present in drafts of C++ Contracts.
1694 Enum
1695 Name(on_off) Type(int) UnknownError(argument %qs must be either %<on%> or %<off%>)
1697 EnumValue
1698 Enum(on_off) String(off) Value(0)
1700 EnumValue
1701 Enum(on_off) String(on) Value(1)
1703 fcontract-assumption-mode=
1704 C++ Joined RejectNegative
1705 -fcontract-assumption-mode=[on|off]     Enable or disable treating axiom level contracts as assumptions (default on).
1707 fcontract-build-level=
1708 C++ Joined RejectNegative
1709 -fcontract-build-level=[off|default|audit]      Specify max contract level to generate runtime checks for.
1711 fcontract-strict-declarations=
1712 C++ Var(flag_contract_strict_declarations) Enum(on_off) Joined Init(0) RejectNegative
1713 -fcontract-strict-declarations=[on|off] Enable or disable warnings on generalized redeclaration of functions with contracts (default off).
1715 fcontract-mode=
1716 C++ Var(flag_contract_mode) Enum(on_off) Joined Init(1) RejectNegative
1717 -fcontract-mode=[on|off]        Enable or disable all contract facilities (default on).
1719 fcontract-continuation-mode=
1720 C++ Joined RejectNegative
1721 -fcontract-continuation-mode=[on|off]   Enable or disable contract continuation mode (default off).
1723 fcontract-role=
1724 C++ Joined RejectNegative
1725 -fcontract-role=<name>:<semantics>      Specify the semantics for all levels in a role (default, review), or a custom contract role with given semantics (ex: opt:assume,assume,assume).
1727 fcontract-semantic=
1728 C++ Joined RejectNegative
1729 -fcontract-semantic=<level>:<semantic>  Specify the concrete semantics for level.
1731 fcoroutines
1732 C++ LTO Var(flag_coroutines)
1733 Enable C++ coroutines (experimental).
1735 fdebug-cpp
1736 C ObjC C++ ObjC++
1737 Emit debug annotations during preprocessing.
1739 fdeduce-init-list
1740 C++ ObjC++ Ignore
1741 Does nothing.  Preserved for backward compatibility.
1743 fdeclone-ctor-dtor
1744 C++ ObjC++ Var(flag_declone_ctor_dtor) Init(-1)
1745 Factor complex constructors and destructors to favor space over speed.
1747 fdefault-inline
1748 C++ ObjC++ Ignore
1749 Does nothing.  Preserved for backward compatibility.
1751 fdiagnostics-show-template-tree
1752 C++ ObjC++ Var(flag_diagnostics_show_template_tree) Init(0)
1753 Print hierarchical comparisons when template types are mismatched.
1755 fdirectives-only
1756 C ObjC C++ ObjC++
1757 Preprocess directives only.
1759 fdollars-in-identifiers
1760 C ObjC C++ ObjC++
1761 Permit '$' as an identifier character.
1763 fmacro-prefix-map=
1764 C ObjC C++ ObjC++ Joined RejectNegative
1765 -fmacro-prefix-map=<old>=<new>  Map one directory name to another in __FILE__, __BASE_FILE__, and __builtin_FILE().
1767 fdump-ada-spec
1768 C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec)
1769 Write all declarations as Ada code transitively.
1771 fdump-ada-spec-slim
1772 C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec_slim)
1773 Write all declarations as Ada code for the given file only.
1775 felide-constructors
1776 C++ ObjC++ Var(flag_elide_constructors) Init(1)
1778 felide-type
1779 C++ ObjC++ Var(flag_elide_type) Init(1)
1780 Do not elide common elements in template comparisons.
1782 fenforce-eh-specs
1783 C++ ObjC++ Var(flag_enforce_eh_specs) Init(1)
1784 Generate code to check exception specifications.
1786 fenum-int-equiv
1787 C++ ObjC++ WarnRemoved
1789 fexec-charset=
1790 C ObjC C++ ObjC++ Joined RejectNegative
1791 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>.
1793 fextended-identifiers
1794 C ObjC C++ ObjC++
1795 Permit universal character names (\\u and \\U) in identifiers.
1797 finput-charset=
1798 C ObjC C++ ObjC++ Joined RejectNegative
1799 -finput-charset=<cset>  Specify the default character set for source files.
1801 fextern-tls-init
1802 C++ ObjC++ Var(flag_extern_tls_init) Init(-1)
1803 Support dynamic initialization of thread-local variables in a different translation unit.
1805 fexternal-templates
1806 C++ ObjC++ WarnRemoved
1808 ffold-simple-inlines
1809 C++ ObjC++ Optimization Var(flag_fold_simple_inlines)
1810 Fold calls to simple inline functions.
1812 ffor-scope
1813 C++ ObjC++ WarnRemoved
1815 ffreestanding
1816 C ObjC C++ ObjC++
1817 Do not assume that standard C libraries and \"main\" exist.
1819 fgnu-keywords
1820 C++ ObjC++ Var(flag_no_gnu_keywords, 0)
1821 Recognize GNU-defined keywords.
1823 fgnu-runtime
1824 ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime,0) Init(NEXT_OBJC_RUNTIME)
1825 Generate code for GNU runtime environment.
1827 fgnu89-inline
1828 C ObjC Var(flag_gnu89_inline) Init(-1)
1829 Use traditional GNU semantics for inline functions.
1831 fguiding-decls
1832 C++ ObjC++ WarnRemoved
1834 fhandle-exceptions
1835 C++ ObjC++ Optimization Alias(fexceptions) Warn({%<-fhandle-exceptions%> has been renamed %<-fexceptions%> (and is now on by default)})
1837 fhonor-std
1838 C++ ObjC++ WarnRemoved
1840 fhosted
1841 C ObjC
1842 Assume normal C execution environment.
1844 fhuge-objects
1845 C++ ObjC++ WarnRemoved
1846 No longer supported.
1848 fimplement-inlines
1849 C++ ObjC++ Var(flag_implement_inlines) Init(1)
1850 Export functions even if they can be inlined.
1852 fimplicit-constexpr
1853 C++ ObjC++ Var(flag_implicit_constexpr)
1854 Make inline functions constexpr by default.
1856 fimplicit-inline-templates
1857 C++ ObjC++ Var(flag_implicit_inline_templates) Init(1)
1858 Emit implicit instantiations of inline templates.
1860 fimplicit-templates
1861 C++ ObjC++ Var(flag_implicit_templates) Init(1)
1862 Emit implicit instantiations of templates.
1864 fnew-inheriting-ctors
1865 C++ ObjC++ Var(flag_new_inheriting_ctors) Init(1)
1866 Implement C++17 inheriting constructor semantics.
1868 ffriend-injection
1869 C++ ObjC++ WarnRemoved
1871 fkeep-inline-dllexport
1872 C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES)
1873 Don't emit dllexported inline functions unless needed.
1875 flabels-ok
1876 C++ ObjC++ WarnRemoved
1878 flax-vector-conversions
1879 C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
1880 Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
1882 fmodules-ts
1883 C++ ObjC++ Var(flag_modules) Integer Init(0)
1884 Enable C++ modules-ts (experimental).
1886 fno-modules
1887 C++ ObjC++ Undocumented RejectNegative Var(flag_modules,0) Integer
1888 ;; undocumented
1890 fmodule-header
1891 C++ ObjC RejectNegative Var(flag_header_unit,0) Integer
1892 Enable C++ header module (experimental).
1894 fmodule-header=
1895 C++ ObjC++ Joined RejectNegative Undocumented
1897 fmodule-implicit-inline
1898 C++ ObjC++ Var(flag_module_implicit_inline,0) Integer
1899 Member functions defined within their class are inline in module purview.
1901 fmodule-only
1902 C++ ObjC RejectNegative Var(flag_module_only) Integer
1903 Only emit Compiled Module Interface.
1905 fmodule-mapper=
1906 C++ ObjC++ Joined RejectNegative MissingArgError(missing mapper)
1907 Mapper for module to CMI files.
1909 fmodule-lazy
1910 C++ ObjC++ Var(flag_module_lazy) Init(1)
1911 Enable lazy module importing.
1913 fmodule-version-ignore
1914 C++ ObjC Var(flag_module_version_ignore) Integer
1915 ; undocumented, Very dangerous, but occasionally useful
1917 Winvalid-imported-macros
1918 C++ ObjC++ Var(warn_imported_macros) Warning
1919 Warn about macros that have conflicting header units definitions.
1921 flang-info-include-translate
1922 C++ Var(note_include_translate_yes)
1923 Note #include directives translated to import declarations.
1925 flang-info-include-translate-not
1926 C++ Var(note_include_translate_no)
1927 Note #include directives not translated to import declarations, and not known to be textual.
1929 flang-info-include-translate=
1930 C++ Joined RejectNegative MissingArgError(missing header name)
1931 Note a #include translation of a specific header.
1933 flang-info-module-cmi
1934 C++ Var(note_module_cmi_yes)
1935 Note Compiled Module Interface pathnames.
1937 flang-info-module-cmi=
1938 C++ Joined RejectNegative MissingArgError(missing module name)
1939 Note Compiled Module Interface pathname of a specific module or header-unit.
1941 fmax-include-depth=
1942 C ObjC C++ ObjC++ Joined RejectNegative UInteger
1943 fmax-include-depth=<number> Set the maximum depth of the nested #include.
1945 fms-extensions
1946 C ObjC C++ ObjC++ Var(flag_ms_extensions)
1947 Don't warn about uses of Microsoft extensions.
1949 fmudflap
1950 C ObjC C++ ObjC++ WarnRemoved
1952 fmudflapth
1953 C ObjC C++ ObjC++ WarnRemoved
1955 fmudflapir
1956 C ObjC C++ ObjC++ WarnRemoved
1958 fname-mangling-version-
1959 C++ ObjC++ Joined WarnRemoved
1961 fnew-abi
1962 C++ ObjC++ WarnRemoved
1964 fnew-ttp-matching
1965 C++ ObjC++ Var(flag_new_ttp)
1966 Implement resolution of DR 150 for matching of template template arguments.
1968 fnext-runtime
1969 ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime)
1970 Generate code for NeXT (Apple Mac OS X) runtime environment.
1972 fnil-receivers
1973 ObjC ObjC++ Var(flag_nil_receivers) Init(1)
1974 Assume that receivers of Objective-C messages may be nil.
1976 flocal-ivars
1977 ObjC ObjC++ Var(flag_local_ivars) Init(1)
1978 Allow access to instance variables as if they were local declarations within instance method implementations.
1980 fivar-visibility=
1981 ObjC ObjC++ Joined RejectNegative Enum(ivar_visibility) Var(default_ivar_visibility) Init(IVAR_VISIBILITY_PROTECTED)
1982 -fvisibility=[private|protected|public|package] Set the default symbol visibility.
1984 Enum
1985 Name(ivar_visibility) Type(enum ivar_visibility) UnknownError(unrecognized ivar visibility value %qs)
1987 EnumValue
1988 Enum(ivar_visibility) String(private) Value(IVAR_VISIBILITY_PRIVATE)
1990 EnumValue
1991 Enum(ivar_visibility) String(protected) Value(IVAR_VISIBILITY_PROTECTED)
1993 EnumValue
1994 Enum(ivar_visibility) String(public) Value(IVAR_VISIBILITY_PUBLIC)
1996 EnumValue
1997 Enum(ivar_visibility) String(package) Value(IVAR_VISIBILITY_PACKAGE)
1999 fnonansi-builtins
2000 C++ ObjC++ Var(flag_no_nonansi_builtin, 0)
2002 fnonnull-objects
2003 C++ ObjC++ WarnRemoved
2005 fnothrow-opt
2006 C++ ObjC++ Optimization Var(flag_nothrow_opt)
2007 Treat a throw() exception specification as noexcept to improve code size.
2009 fobjc-abi-version=
2010 ObjC ObjC++ LTO Joined RejectNegative UInteger Var(flag_objc_abi)
2011 Specify which ABI to use for Objective-C family code and meta-data generation.
2013 ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
2014 ; to initialize any non-POD ivars in Objective-C++ classes.
2015 fobjc-call-cxx-cdtors
2016 ObjC++ Var(flag_objc_call_cxx_cdtors)
2017 Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed.
2019 fobjc-direct-dispatch
2020 ObjC ObjC++ Var(flag_objc_direct_dispatch)
2021 Allow fast jumps to the message dispatcher.
2023 ; Nonzero means that we will allow new ObjC exception syntax (@throw,
2024 ; @try, etc.) in source code.
2025 fobjc-exceptions
2026 ObjC ObjC++ Var(flag_objc_exceptions)
2027 Enable Objective-C exception and synchronization syntax.
2029 fobjc-gc
2030 ObjC ObjC++ LTO Var(flag_objc_gc)
2031 Enable garbage collection (GC) in Objective-C/Objective-C++ programs.
2033 fobjc-nilcheck
2034 ObjC ObjC++ Var(flag_objc_nilcheck,1)
2035 Enable inline checks for nil receivers with the NeXT runtime and ABI version 2.
2037 ; Nonzero means that we generate NeXT setjmp based exceptions.
2038 fobjc-sjlj-exceptions
2039 ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
2040 Enable Objective-C setjmp exception handling runtime.
2042 fobjc-std=objc1
2043 ObjC ObjC++ Var(flag_objc1_only)
2044 Conform to the Objective-C 1.0 language as implemented in GCC 4.0.
2046 fopenacc
2047 C ObjC C++ ObjC++ LTO Var(flag_openacc)
2048 Enable OpenACC.
2050 fopenacc-dim=
2051 C ObjC C++ ObjC++ LTO Joined Var(flag_openacc_dims)
2052 Specify default OpenACC compute dimensions.
2054 fopenmp
2055 C ObjC C++ ObjC++ LTO Var(flag_openmp)
2056 Enable OpenMP (implies -frecursive in Fortran).
2058 fopenmp-simd
2059 C ObjC C++ ObjC++ Var(flag_openmp_simd)
2060 Enable OpenMP's SIMD directives.
2062 foperator-names
2063 C++ ObjC++
2064 Recognize C++ keywords like \"compl\" and \"xor\".
2066 foptional-diags
2067 C++ ObjC++ Ignore
2068 Does nothing.  Preserved for backward compatibility.
2070 fpch-deps
2071 C ObjC C++ ObjC++
2073 fpch-preprocess
2074 C ObjC C++ ObjC++
2075 Look for and use PCH files even when preprocessing.
2077 fpermissive
2078 C++ ObjC++ Var(flag_permissive)
2079 Downgrade conformance errors to warnings.
2081 fplan9-extensions
2082 C ObjC Var(flag_plan9_extensions)
2083 Enable Plan 9 language extensions.
2085 fpreprocessed
2086 C ObjC C++ ObjC++
2087 Treat the input file as already preprocessed.
2089 ftrack-macro-expansion
2090 C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
2091 ; converted into ftrack-macro-expansion=
2093 ftrack-macro-expansion=
2094 C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
2095 -ftrack-macro-expansion=<0|1|2> Track locations of tokens coming from macro expansion and display them in error messages.
2097 fpretty-templates
2098 C++ ObjC++ Var(flag_pretty_templates) Init(1)
2099 Do not pretty-print template specializations as the template signature followed by the arguments.
2101 fprintf-return-value
2102 C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(1)
2103 Treat known sprintf return values as constants.
2105 freplace-objc-classes
2106 ObjC ObjC++ LTO Var(flag_replace_objc_classes)
2107 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
2109 frepo
2110 C++ ObjC++ WarnRemoved
2111 Removed in GCC 10.  This switch has no effect.
2113 frtti
2114 C++ ObjC++ Optimization Var(flag_rtti) Init(1)
2115 Generate run time type descriptor information.
2117 fshort-enums
2118 C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums)
2119 Use the narrowest integer type possible for enumeration types.
2121 fshort-wchar
2122 C ObjC C++ ObjC++ LTO Optimization Var(flag_short_wchar)
2123 Force the underlying type for \"wchar_t\" to be \"unsigned short\".
2125 fsigned-bitfields
2126 C ObjC C++ ObjC++ Var(flag_signed_bitfields) Init(1)
2127 When \"signed\" or \"unsigned\" is not given make the bitfield signed.
2129 fsigned-char
2130 C ObjC C++ ObjC++ LTO Var(flag_signed_char)
2131 Make \"char\" signed by default.
2133 fsized-deallocation
2134 C++ ObjC++ Var(flag_sized_deallocation) Init(-1)
2135 Enable C++14 sized deallocation support.
2137 fstrict-flex-arrays
2138 C C++ Common Alias(fstrict-flex-arrays=,3,0)
2140 fstrict-flex-arrays=
2141 C C++ Common Joined RejectNegative UInteger Var(flag_strict_flex_arrays) Init(0) IntegerRange(0,3)
2142 -fstrict-flex-arrays=<level>    Control when to treat the trailing array of a structure as a flexible array member for the purposes of accessing the elements of such an array. The default is treating all trailing arrays of structures as flexible array members.
2144 fsquangle
2145 C++ ObjC++ WarnRemoved
2147 fsso-struct=
2148 C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE)
2149 -fsso-struct=[big-endian|little-endian|native]  Set the default scalar storage order.
2151 Enum
2152 Name(sso_struct) Type(enum scalar_storage_order_kind) UnknownError(unrecognized scalar storage order value %qs)
2154 EnumValue
2155 Enum(sso_struct) String(big-endian) Value(SSO_BIG_ENDIAN)
2157 EnumValue
2158 Enum(sso_struct) String(little-endian) Value(SSO_LITTLE_ENDIAN)
2160 EnumValue
2161 Enum(sso_struct) String(native) Value(SSO_NATIVE)
2163 fstats
2164 C++ ObjC++ Var(flag_detailed_statistics)
2165 Display statistics accumulated during compilation.
2167 fstrict-enums
2168 C++ ObjC++ Optimization Var(flag_strict_enums)
2169 Assume that values of enumeration type are always within the minimum range of that type.
2171 fstrict-prototype
2172 C++ ObjC++ WarnRemoved
2174 fstrong-eval-order
2175 C++ ObjC++ Common Alias(fstrong-eval-order=, all, none)
2176 Follow the C++17 evaluation order requirements for assignment expressions,
2177 shift, member function calls, etc.
2179 fstrong-eval-order=
2180 C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1)
2181 Follow the C++17 evaluation order requirements for assignment expressions,
2182 shift, member function calls, etc.
2184 Enum
2185 Name(strong_eval_order) Type(int)
2187 EnumValue
2188 Enum(strong_eval_order) String(none) Value(0)
2190 EnumValue
2191 Enum(strong_eval_order) String(some) Value(1)
2193 EnumValue
2194 Enum(strong_eval_order) String(all) Value(2)
2196 ftemplate-backtrace-limit=
2197 C++ ObjC++ Joined RejectNegative UInteger Var(template_backtrace_limit) Init(10)
2198 Set the maximum number of template instantiation notes for a single warning or error.
2200 ftemplate-depth-
2201 C++ ObjC++ Joined RejectNegative Undocumented Alias(ftemplate-depth=)
2203 ftemplate-depth=
2204 C++ ObjC++ Joined RejectNegative UInteger
2205 -ftemplate-depth=<number>       Specify maximum template instantiation depth.
2207 fthis-is-variable
2208 C++ ObjC++ WarnRemoved
2210 fthreadsafe-statics
2211 C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
2212 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
2214 funsigned-bitfields
2215 C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)
2216 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned.
2218 funsigned-char
2219 C ObjC C++ ObjC++ LTO Var(flag_signed_char, 0)
2220 Make \"char\" unsigned by default.
2222 fuse-cxa-atexit
2223 C++ ObjC++ Var(flag_use_cxa_atexit) Init(DEFAULT_USE_CXA_ATEXIT)
2224 Use __cxa_atexit to register destructors.
2226 fuse-cxa-get-exception-ptr
2227 C++ ObjC++ Var(flag_use_cxa_get_exception_ptr) Init(2)
2228 Use __cxa_get_exception_ptr in exception handling.
2230 fvisibility-inlines-hidden
2231 C++ ObjC++
2232 Marks all inlined functions and methods as having hidden visibility.
2234 fvisibility-ms-compat
2235 C++ ObjC++ Var(flag_visibility_ms_compat)
2236 Changes visibility to match Microsoft Visual Studio by default.
2238 fvtable-gc
2239 C++ ObjC++ WarnRemoved
2240 No longer supported.
2242 fvtable-thunks
2243 C++ ObjC++ WarnRemoved 
2244 No longer supported.
2246 fweak
2247 C++ ObjC++ Var(flag_weak) Init(1)
2248 Emit common-like symbols as weak symbols.
2250 fwide-exec-charset=
2251 C ObjC C++ ObjC++ Joined RejectNegative
2252 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>.
2254 fworking-directory
2255 C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1)
2256 Generate a #line directive pointing at the current working directory.
2258 fxref
2259 C++ ObjC++ WarnRemoved
2260 No longer supported.
2262 fzero-link
2263 ObjC ObjC++ Var(flag_zero_link)
2264 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode.
2266 gen-decls
2267 ObjC ObjC++ Driver Var(flag_gen_declaration) RejectNegative
2268 Dump declarations to a .decl file.
2270 femit-struct-debug-baseonly
2271 C ObjC C++ ObjC++
2272 -femit-struct-debug-baseonly    Aggressive reduced debug info for structs.
2274 femit-struct-debug-reduced
2275 C ObjC C++ ObjC++
2276 -femit-struct-debug-reduced     Conservative reduced debug info for structs.
2278 femit-struct-debug-detailed=
2279 C ObjC C++ ObjC++ Joined
2280 -femit-struct-debug-detailed=<spec-list>        Detailed reduced debug info for structs.
2282 fext-numeric-literals
2283 C++ ObjC++ Var(flag_ext_numeric_literals) Init(1)
2284 Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding
2285 number literal rather than a user-defined number literal.
2287 idirafter
2288 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2289 -idirafter <dir>        Add <dir> to the end of the system include path.
2291 imacros
2292 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2293 -imacros <file> Accept definition of macros in <file>.
2295 imultilib
2296 C ObjC C++ ObjC++ Joined Separate
2297 -imultilib <dir>        Set <dir> to be the multilib include subdirectory.
2299 include
2300 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2301 -include <file> Include the contents of <file> before other files.
2303 iprefix
2304 C ObjC C++ ObjC++ Joined Separate
2305 -iprefix <path> Specify <path> as a prefix for next two options.
2307 isysroot
2308 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2309 -isysroot <dir> Set <dir> to be the system root directory.
2311 isystem
2312 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2313 -isystem <dir>  Add <dir> to the start of the system include path.
2315 iquote
2316 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2317 -iquote <dir>   Add <dir> to the end of the quote include path.
2319 iwithprefix
2320 C ObjC C++ ObjC++ Joined Separate
2321 -iwithprefix <dir>      Add <dir> to the end of the system include path.
2323 iwithprefixbefore
2324 C ObjC C++ ObjC++ Joined Separate
2325 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path.
2327 lang-asm
2328 C Undocumented RejectDriver
2330 no-integrated-cpp
2331 Driver
2333 nostdinc
2334 C ObjC C++ ObjC++
2335 Do not search standard system include directories (those specified with -isystem will still be used).
2337 nostdinc++
2338 C++ ObjC++
2339 Do not search standard system include directories for C++.
2342 C ObjC C++ ObjC++ Joined Separate
2343 ; Documented in common.opt
2345 pedantic
2346 C ObjC C++ ObjC++ Alias(Wpedantic)
2347 ; Documented in common.opt
2349 print-objc-runtime-info
2350 ObjC ObjC++
2351 Generate C header of platform-specific features.
2353 remap
2354 C ObjC C++ ObjC++
2355 Remap file names when including files.
2357 std=c++98
2358 C++ ObjC++
2359 Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2361 std=c++03
2362 C++ ObjC++ Alias(std=c++98)
2363 Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2365 std=c++11
2366 C++ ObjC++
2367 Conform to the ISO 2011 C++ standard.
2369 std=c++0x
2370 C++ ObjC++ Alias(std=c++11) Undocumented
2371 Deprecated in favor of -std=c++11.
2373 std=c++1y
2374 C++ ObjC++ Alias(std=c++14) Undocumented
2375 Deprecated in favor of -std=c++14.
2377 std=c++14
2378 C++ ObjC++
2379 Conform to the ISO 2014 C++ standard.
2381 std=c++1z
2382 C++ ObjC++ Alias(std=c++17) Undocumented
2383 Deprecated in favor of -std=c++17.
2385 std=c++17
2386 C++ ObjC++
2387 Conform to the ISO 2017 C++ standard.
2389 std=c++2a
2390 C++ ObjC++ Alias(std=c++20) Undocumented
2391 Conform to the ISO 2020 C++ standard (experimental and incomplete support).
2393 std=c++20
2394 C++ ObjC++
2395 Conform to the ISO 2020 C++ standard (experimental and incomplete support).
2397 std=c++2b
2398 C++ ObjC++ Alias(std=c++23)
2399 Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
2401 std=c++23
2402 C++ ObjC++ Undocumented
2403 Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
2405 std=c11
2406 C ObjC
2407 Conform to the ISO 2011 C standard.
2409 std=c1x
2410 C ObjC Alias(std=c11)
2411 Deprecated in favor of -std=c11.
2413 std=c17
2414 C ObjC
2415 Conform to the ISO 2017 C standard (published in 2018).
2417 std=c18
2418 C ObjC Alias(std=c17)
2419 Conform to the ISO 2017 C standard (published in 2018).
2421 std=c2x
2422 C ObjC
2423 Conform to the ISO 202X C standard draft (experimental and incomplete support).
2425 std=c89
2426 C ObjC Alias(std=c90)
2427 Conform to the ISO 1990 C standard.
2429 std=c90
2430 C ObjC
2431 Conform to the ISO 1990 C standard.
2433 std=c99
2434 C ObjC
2435 Conform to the ISO 1999 C standard.
2437 std=c9x
2438 C ObjC Alias(std=c99)
2439 Deprecated in favor of -std=c99.
2441 std=gnu++98
2442 C++ ObjC++
2443 Conform to the ISO 1998 C++ standard revised by the 2003 technical
2444 corrigendum with GNU extensions.
2446 std=gnu++03
2447 C++ ObjC++ Alias(std=gnu++98)
2448 Conform to the ISO 1998 C++ standard revised by the 2003 technical
2449 corrigendum with GNU extensions.
2451 std=gnu++11
2452 C++ ObjC++
2453 Conform to the ISO 2011 C++ standard with GNU extensions.
2455 std=gnu++0x
2456 C++ ObjC++ Alias(std=gnu++11) Undocumented
2457 Deprecated in favor of -std=gnu++11.
2459 std=gnu++1y
2460 C++ ObjC++ Alias(std=gnu++14) Undocumented
2461 Deprecated in favor of -std=gnu++14.
2463 std=gnu++14
2464 C++ ObjC++
2465 Conform to the ISO 2014 C++ standard with GNU extensions.
2467 std=gnu++1z
2468 C++ ObjC++ Alias(std=gnu++17) Undocumented
2469 Deprecated in favor of -std=gnu++17.
2471 std=gnu++17
2472 C++ ObjC++
2473 Conform to the ISO 2017 C++ standard with GNU extensions.
2475 std=gnu++2a
2476 C++ ObjC++ Alias(std=gnu++20) Undocumented
2477 Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
2479 std=gnu++20
2480 C++ ObjC++
2481 Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
2483 std=gnu++2b
2484 C++ ObjC++ Alias(std=gnu++23)
2485 Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
2487 std=gnu++23
2488 C++ ObjC++ Undocumented
2489 Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
2491 std=gnu11
2492 C ObjC
2493 Conform to the ISO 2011 C standard with GNU extensions.
2495 std=gnu1x
2496 C ObjC Alias(std=gnu11)
2497 Deprecated in favor of -std=gnu11.
2499 std=gnu17
2500 C ObjC
2501 Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
2503 std=gnu18
2504 C ObjC Alias(std=gnu17)
2505 Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
2507 std=gnu2x
2508 C ObjC
2509 Conform to the ISO 202X C standard draft with GNU extensions (experimental and incomplete support).
2511 std=gnu89
2512 C ObjC Alias(std=gnu90)
2513 Conform to the ISO 1990 C standard with GNU extensions.
2515 std=gnu90
2516 C ObjC
2517 Conform to the ISO 1990 C standard with GNU extensions.
2519 std=gnu99
2520 C ObjC
2521 Conform to the ISO 1999 C standard with GNU extensions.
2523 std=gnu9x
2524 C ObjC Alias(std=gnu99)
2525 Deprecated in favor of -std=gnu99.
2527 std=iso9899:1990
2528 C ObjC Alias(std=c90)
2529 Conform to the ISO 1990 C standard.
2531 std=iso9899:199409
2532 C ObjC
2533 Conform to the ISO 1990 C standard as amended in 1994.
2535 std=iso9899:1999
2536 C ObjC Alias(std=c99)
2537 Conform to the ISO 1999 C standard.
2539 std=iso9899:199x
2540 C ObjC Alias(std=c99)
2541 Deprecated in favor of -std=iso9899:1999.
2543 std=iso9899:2011
2544 C ObjC Alias(std=c11)
2545 Conform to the ISO 2011 C standard.
2547 std=iso9899:2017
2548 C ObjC Alias(std=c17)
2549 Conform to the ISO 2017 C standard (published in 2018).
2551 std=iso9899:2018
2552 C ObjC Alias(std=c17)
2553 Conform to the ISO 2017 C standard (published in 2018).
2555 stdlib=
2556 Driver C++ ObjC++ Common Condition(ENABLE_STDLIB_OPTION) Var(flag_stdlib_kind) Joined Enum(stdlib_kind) RejectNegative Init(1)
2557 -stdlib=[libstdc++|libc++]      The standard library to be used for C++ headers
2558 and runtime.
2560 Enum
2561 Name(stdlib_kind) Type(int)
2563 EnumValue
2564 Enum(stdlib_kind) String(libstdc++) Value(1)
2566 EnumValue
2567 Enum(stdlib_kind) String(libc++) Value(2)
2569 traditional
2570 Driver
2572 traditional-cpp
2573 C ObjC C++ ObjC++
2574 Enable traditional preprocessing.
2576 trigraphs
2577 C ObjC C++ ObjC++
2578 -trigraphs      Support ISO C trigraphs.
2580 undef
2581 C ObjC C++ ObjC++ Var(flag_undef)
2582 Do not predefine system-specific and GCC-specific macros.
2585 C ObjC C++ ObjC++
2586 ; Documented in common.opt
2589 C ObjC C++ ObjC++
2590 ; Documented in common.opt
2592 ; This comment is to ensure we retain the blank line above.