tree-optimization/112450 - avoid AVX512 style masking for BImode masks
[official-gcc.git] / gcc / c-family / c.opt
blobb10c6057cd153afa981a4b9d0881dd5425e82b46
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.
259 fdeps-format=
260 C ObjC C++ ObjC++ NoDriverArg Joined MissingArgError(missing format after %qs)
261 Structured format for output dependency information.  Supported (\"p1689r5\").
263 fdeps-file=
264 C ObjC C++ ObjC++ NoDriverArg Joined MissingArgError(missing output path after %qs)
265 File for output dependency information.
267 fdeps-target=
268 C ObjC C++ ObjC++ NoDriverArg Joined MissingArgError(missing path after %qs)
269 -fdeps-target=obj.o Output file for the compile step.
272 C ObjC C++ ObjC++
273 Do not generate #line directives.
276 C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
277 -U<macro>       Undefine <macro>.
279 WNSObject-attribute
280 C ObjC C++ ObjC++ LTO Var(warn_nsobject_attribute) Warning Init(1)
281 Warn if the NSObject attribute is applied to a non-typedef.
283 Wabi
284 C ObjC C++ ObjC++ LTO Var(warn_abi) Warning
285 Warn about things that will change when compiling with an ABI-compliant compiler.
287 Wabi=
288 C ObjC C++ ObjC++ LTO Joined RejectNegative UInteger Warning
289 Warn about things that change between the current -fabi-version and the specified version.
291 Wabi-tag
292 C++ ObjC++ Var(warn_abi_tag) Warning
293 Warn if a subobject has an abi_tag attribute that the complete object type does not have.
295 Wpsabi
296 C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Warning Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi)
298 Wabsolute-value
299 C ObjC Var(warn_absolute_value) Warning EnabledBy(Wextra)
300 Warn on suspicious calls of standard functions computing absolute values.
302 Waddress
303 C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
304 Warn about suspicious uses of memory addresses.
306 Enum
307 Name(warn_aligned_new_level) Type(int) UnknownError(argument %qs to %<-Waligned-new%> not recognized)
309 EnumValue
310 Enum(warn_aligned_new_level) String(none) Value(0)
312 EnumValue
313 Enum(warn_aligned_new_level) String(global) Value(1)
315 EnumValue
316 Enum(warn_aligned_new_level) String(all) Value(2)
318 Waligned-new
319 C++ ObjC++ Alias(Waligned-new=,global,none)
320 Warn about 'new' of type with extended alignment without -faligned-new.
322 Waligned-new=
323 C++ ObjC++ Var(warn_aligned_new) Enum(warn_aligned_new_level) Joined RejectNegative Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
324 -Waligned-new=[none|global|all] Warn even if 'new' uses a class member allocation function.
326 Wall
327 C ObjC C++ ObjC++ Warning
328 Enable most warning messages.
330 Walloca
331 C ObjC C++ ObjC++ Var(warn_alloca) Warning
332 Warn on any use of alloca.
334 Walloc-size
335 C ObjC Var(warn_alloc_size) Warning LangEnabledBy(C ObjC, Wextra)
336 Warn when allocating insufficient storage for the target type of the assigned pointer.
338 Walloc-size-larger-than=
339 C ObjC C++ LTO ObjC++ Var(warn_alloc_size_limit) Joined Host_Wide_Int ByteSize Warning Init(HOST_WIDE_INT_MAX)
340 -Walloc-size-larger-than=<bytes>        Warn for calls to allocation functions that
341 attempt to allocate objects larger than the specified number of bytes.
343 Wno-alloc-size-larger-than
344 C ObjC C++ LTO ObjC++ Alias(Walloc-size-larger-than=,18446744073709551615EiB,none) Warning
345 Disable Walloc-size-larger-than= warning.  Equivalent to Walloc-size-larger-than=<SIZE_MAX> or larger.
347 Walloc-zero
348 C ObjC C++ ObjC++ Var(warn_alloc_zero) Warning
349 Warn for calls to allocation functions that specify zero bytes.
351 Walloca-larger-than=
352 C ObjC C++ LTO ObjC++ Var(warn_alloca_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
353 -Walloca-larger-than=<number>   Warn on unbounded uses of
354 alloca, and on bounded uses of alloca whose bound can be larger than
355 <number> bytes.
357 Wno-alloca-larger-than
358 C ObjC C++ LTO ObjC++ Alias(Walloca-larger-than=,18446744073709551615EiB,none) Warning
359 Disable Walloca-larger-than= warning.  Equivalent to Walloca-larger-than=<SIZE_MAX> or larger.
361 Warray-bounds=
362 LangEnabledBy(C ObjC C++ LTO ObjC++,Wall,1,0)
363 ; in common.opt
365 Warray-compare
366 C ObjC C++ ObjC++ Var(warn_array_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
367 Warn about comparisons between two operands of array type.
369 Warray-parameter
370 C ObjC C++ ObjC++ Warning Alias(Warray-parameter=, 2, 0)
371 Warn about mismatched declarations of array parameters and unsafe accesses to them.
373 Warray-parameter=
374 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_array_parameter) IntegerRange(0, 2) LangEnabledBy(C ObjC C++ ObjC++,Wall, 2, 0) Warning
375 Warn about mismatched declarations of array parameters and unsafe accesses to them.
377 Wzero-length-bounds
378 C ObjC C++ ObjC++ Var(warn_zero_length_bounds) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
379 Warn about accesses to interior zero-length array members.
381 Wassign-intercept
382 ObjC ObjC++ Var(warn_assign_intercept) Warning
383 Warn whenever an Objective-C assignment is being intercepted by the garbage collector.
385 Wbad-function-cast
386 C ObjC Var(warn_bad_function_cast) Warning
387 Warn about casting functions to incompatible types.
389 Wbidi-chars
390 C ObjC C++ ObjC++ Warning Alias(Wbidi-chars=,any,none)
393 Wbidi-chars=
394 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
395 -Wbidi-chars=[none|unpaired|any|ucn] Warn about UTF-8 bidirectional control characters.
397 ; Required for these enum values.
398 SourceInclude
399 cpplib.h
401 Enum
402 Name(cpp_bidirectional_level) Type(int) UnknownError(argument %qs to %<-Wbidi-chars%> not recognized)
404 EnumValue
405 Enum(cpp_bidirectional_level) String(none) Value(bidirectional_none) Set(1)
407 EnumValue
408 Enum(cpp_bidirectional_level) String(unpaired) Value(bidirectional_unpaired) Set(1)
410 EnumValue
411 Enum(cpp_bidirectional_level) String(any) Value(bidirectional_any) Set(1)
413 EnumValue
414 Enum(cpp_bidirectional_level) String(ucn) Value(bidirectional_ucn) Set(2)
416 Wbool-compare
417 C ObjC C++ ObjC++ Var(warn_bool_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
418 Warn about boolean expression compared with an integer value different from true/false.
420 Wbool-operation
421 C ObjC C++ ObjC++ Var(warn_bool_op) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
422 Warn about certain operations on boolean expressions.
424 Wframe-address
425 C ObjC C++ ObjC++ Var(warn_frame_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
426 Warn when __builtin_frame_address or __builtin_return_address is used unsafely.
428 Wbuiltin-declaration-mismatch
429 C ObjC C++ ObjC++ Var(warn_builtin_declaration_mismatch) Init(1) Warning
430 Warn when a built-in function is declared with the wrong signature.
432 Wbuiltin-macro-redefined
433 C ObjC C++ ObjC++ CPP(warn_builtin_macro_redefined) CppReason(CPP_W_BUILTIN_MACRO_REDEFINED) Var(cpp_warn_builtin_macro_redefined) Init(1) Warning
434 Warn when a built-in preprocessor macro is undefined or redefined.
436 Wc11-c23-compat
437 C ObjC CPP(cpp_warn_c11_c23_compat) CppReason(CPP_W_C11_C23_COMPAT) Var(warn_c11_c23_compat) Init(-1) Warning
438 Warn about features not present in ISO C11, but present in ISO C23.
440 Wc11-c2x-compat
441 C ObjC Alias(Wc11-c23-compat)
442 Deprecated in favor of -Wc11-c23-compat.
444 Wc90-c99-compat
445 C ObjC CPP(cpp_warn_c90_c99_compat) CppReason(CPP_W_C90_C99_COMPAT) Var(warn_c90_c99_compat) Init(-1) Warning
446 Warn about features not present in ISO C90, but present in ISO C99.
448 Wc99-c11-compat
449 C ObjC Var(warn_c99_c11_compat) Init(-1) Warning
450 Warn about features not present in ISO C99, but present in ISO C11.
452 Wc++-compat
453 C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPERATOR_NAMES) Init(0) Warning
454 Warn about C constructs that are not in the common subset of C and C++.
456 Wc++0x-compat
457 C++ ObjC++ Warning Alias(Wc++11-compat) Undocumented
459 Wc++11-compat
460 C++ ObjC++ Var(warn_cxx11_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT)
461 Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011.
463 Wc++14-compat
464 C++ ObjC++ Var(warn_cxx14_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
465 Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014.
467 Wc++1z-compat
468 C++ ObjC++ Warning Alias(Wc++17-compat) Undocumented
470 Wc++17-compat
471 C++ ObjC++ Var(warn_cxx17_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
472 Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017.
474 Wc++2a-compat
475 C++ ObjC++ Warning Alias(Wc++20-compat) Undocumented
477 Wc++20-compat
478 C++ ObjC++ Var(warn_cxx20_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx20_compat) CppReason(CPP_W_CXX20_COMPAT)
479 Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020.
481 Wc++11-extensions
482 C++ ObjC++ Var(warn_cxx11_extensions) Warning Init(1)
483 Warn about C++11 constructs in code compiled with an older standard.
485 Wc++14-extensions
486 C++ ObjC++ Var(warn_cxx14_extensions) Warning Init(1)
487 Warn about C++14 constructs in code compiled with an older standard.
489 Wc++17-extensions
490 C++ ObjC++ Var(warn_cxx17_extensions) Warning Init(1)
491 Warn about C++17 constructs in code compiled with an older standard.
493 Wc++20-extensions
494 C++ ObjC++ Var(warn_cxx20_extensions) Warning Init(1)
495 Warn about C++20 constructs in code compiled with an older standard.
497 Wc++23-extensions
498 C++ ObjC++ Var(warn_cxx23_extensions) Warning Init(1)
499 Warn about C++23 constructs in code compiled with an older standard.
501 Wcast-function-type
502 C ObjC C++ ObjC++ Var(warn_cast_function_type) Warning EnabledBy(Wextra)
503 Warn about casts between incompatible function types.
505 Wcast-qual
506 C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
507 Warn about casts which discard qualifiers.
509 Wcatch-value
510 C++ ObjC++ Warning Alias(Wcatch-value=, 1, 0)
511 Warn about catch handlers of non-reference type.
513 Wcatch-value=
514 C++ ObjC++ Var(warn_catch_value) Warning Joined RejectNegative UInteger LangEnabledBy(C++ ObjC++,Wall, 1, 0) IntegerRange(0, 3)
515 Warn about catch handlers of non-reference type.
517 Wchanges-meaning
518 C++ ObjC++ Var(warn_changes_meaning) Warning Init(1)
519 Complain about a name being declared as a class member after a previous use of the same name.
521 Wchar-subscripts
522 C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
523 Warn about subscripts whose type is \"char\".
525 Wchkp
526 C ObjC C++ ObjC++ Warning WarnRemoved
527 Removed in GCC 9.  This switch has no effect.
529 Wclobbered
530 C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra)
531 Warn about variables that might be changed by \"longjmp\" or \"vfork\".
533 Wcomma-subscript
534 C++ ObjC++ Var(warn_comma_subscript) Warning
535 Warn about uses of a comma operator within a subscripting expression.
537 Wcomment
538 C ObjC C++ ObjC++ CPP(warn_comments) CppReason(CPP_W_COMMENTS) Var(cpp_warn_comment) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
539 Warn about possibly nested block comments, and C++ comments spanning more than one physical line.
541 Wcomments
542 C ObjC C++ ObjC++ Warning Alias(Wcomment)
543 Synonym for -Wcomment.
545 Wconditionally-supported
546 C++ ObjC++ Var(warn_conditionally_supported) Warning
547 Warn for conditionally-supported constructs.
549 Wconversion
550 C ObjC C++ ObjC++ Var(warn_conversion) Warning
551 Warn for implicit type conversions that may change a value.
553 Wconversion-null
554 C++ ObjC++ Var(warn_conversion_null) Init(1) Warning
555 Warn for converting NULL from/to a non-pointer type.
557 Wcpp
558 C ObjC C++ ObjC++ CppReason(CPP_W_WARNING_DIRECTIVE)
559 ; Documented in common.opt
561 Wctad-maybe-unsupported
562 C++ ObjC++ Var(warn_ctad_maybe_unsupported) Warning
563 Warn when performing class template argument deduction on a type with no
564 deduction guides.
566 Wctor-dtor-privacy
567 C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning
568 Warn when all constructors and destructors are private.
570 Wdangling-else
571 C ObjC C++ ObjC++ Var(warn_dangling_else) Warning LangEnabledBy(C ObjC C++ ObjC++,Wparentheses)
572 Warn about dangling else.
574 Wdangling-pointer
575 C ObjC C++ LTO ObjC++ Alias(Wdangling-pointer=, 2, 0) Warning
576 Warn for uses of pointers to auto variables whose lifetime has ended.
578 Wdangling-pointer=
579 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_dangling_pointer) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 2, 0) IntegerRange(0, 2)
580 Warn for uses of pointers to auto variables whose lifetime has ended.
582 Wdangling-reference
583 C++ ObjC++ Var(warn_dangling_reference) Warning LangEnabledBy(C++ ObjC++, Wall)
584 Warn when a reference is bound to a temporary whose lifetime has ended.
586 Wdate-time
587 C ObjC C++ ObjC++ CPP(warn_date_time) CppReason(CPP_W_DATE_TIME) Var(cpp_warn_date_time) Init(0) Warning
588 Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage.
590 Wdeclaration-after-statement
591 C ObjC Var(warn_declaration_after_statement) Init(-1) Warning
592 Warn when a declaration is found after a statement.
594 Wdelete-incomplete
595 C++ ObjC++ Var(warn_delete_incomplete) Init(1) Warning
596 Warn when deleting a pointer to incomplete type.
598 Wdelete-non-virtual-dtor
599 C++ ObjC++ Var(warn_delnonvdtor) Warning LangEnabledBy(C++ ObjC++,Wall || Weffc++)
600 Warn about deleting polymorphic objects with non-virtual destructors.
602 Wdeprecated
603 C C++ ObjC ObjC++ CPP(cpp_warn_deprecated) CppReason(CPP_W_DEPRECATED)
604 ; Documented in common.opt
606 Wdeprecated-copy
607 C++ ObjC++ Var(warn_deprecated_copy) Warning LangEnabledBy(C++ ObjC++, Wextra)
608 Mark implicitly-declared copy operations as deprecated if the class has a
609 user-provided copy operation.
611 Wdeprecated-copy-dtor
612 C++ ObjC++ Var(warn_deprecated_copy, 2) Warning
613 Mark implicitly-declared copy operations as deprecated if the class has a
614 user-provided copy operation or destructor.
616 Wdeprecated-enum-enum-conversion
617 C++ ObjC++ Var(warn_deprecated_enum_enum_conv) Warning
618 Warn about deprecated arithmetic conversions on operands of enumeration types.
620 Wdeprecated-enum-float-conversion
621 C++ ObjC++ Var(warn_deprecated_enum_float_conv) Warning
622 Warn about deprecated arithmetic conversions on operands where one is of enumeration
623 type and the other is of a floating-point type.
625 Wdesignated-init
626 C ObjC Var(warn_designated_init) Init(1) Warning
627 Warn about positional initialization of structs requiring designated initializers.
629 Wdiscarded-array-qualifiers
630 C ObjC Var(warn_discarded_array_qualifiers) Init(1) Warning
631 Warn if qualifiers on arrays which are pointer targets are discarded.
633 Wdiscarded-qualifiers
634 C ObjC Var(warn_discarded_qualifiers) Init(1) Warning
635 Warn if type qualifiers on pointers are discarded.
637 Wdiv-by-zero
638 C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
639 Warn about compile-time integer division by zero.
641 Wduplicated-branches
642 C ObjC C++ ObjC++ Var(warn_duplicated_branches) Init(0) Warning
643 Warn about duplicated branches in if-else statements.
645 Wduplicated-cond
646 C ObjC C++ ObjC++ Var(warn_duplicated_cond) Init(0) Warning
647 Warn about duplicated conditions in an if-else-if chain.
649 Weffc++
650 C++ ObjC++ Var(warn_ecpp) Warning
651 Warn about violations of Effective C++ style rules.
653 Wempty-body
654 C ObjC C++ ObjC++ Var(warn_empty_body) Warning EnabledBy(Wextra)
655 Warn about an empty body in an if or else statement.
657 Wendif-labels
658 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)
659 Warn about stray tokens after #else and #endif.
661 Wenum-compare
662 C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat)
663 Warn about comparison of different enum types.
665 Wenum-conversion
666 C ObjC C++ ObjC++ Var(warn_enum_conversion) Init(0) Warning LangEnabledBy(C ObjC,Wextra)
667 Warn about implicit conversion of enum types.
669 Wenum-int-mismatch
670 C ObjC Var(warn_enum_int_mismatch) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat)
671 Warn about enum/integer type mismatches.
673 Werror
674 C ObjC C++ ObjC++
675 ; Documented in common.opt
677 Werror-implicit-function-declaration
678 C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
679 This switch is deprecated; use -Werror=implicit-function-declaration instead.
681 Wexceptions
682 C++ ObjC++ Var(warn_exceptions) Init(1) Warning
683 Warn when an exception handler is shadowed by another handler.
685 Wextra
686 C ObjC C++ ObjC++ Warning
687 ; in common.opt
689 Wextra-semi
690 C++ ObjC++ Var(warn_extra_semi) Warning
691 Warn about semicolon after in-class function definition.
693 Wfloat-conversion
694 C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion)
695 Warn for implicit type conversions that cause loss of floating point precision.
697 Wfloat-equal
698 C ObjC C++ ObjC++ Var(warn_float_equal) Warning
699 Warn if testing floating point numbers for equality.
701 Wformat
702 C ObjC C++ ObjC++ Warning Alias(Wformat=, 1, 0)
703 Warn about printf/scanf/strftime/strfmon format string anomalies.
705 Wformat-contains-nul
706 C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
707 Warn about format strings that contain NUL bytes.
709 Wformat-diag
710 C ObjC C++ ObjC++ Var(warn_format_diag) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
711 Warn about GCC format strings with strings unsuitable for diagnostics.
713 Wformat-extra-args
714 C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
715 Warn if passing too many arguments to a function for its format string.
717 Wformat-nonliteral
718 C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
719 Warn about format strings that are not literals.
721 Wformat-overflow
722 C ObjC C++ LTO ObjC++ Warning Alias(Wformat-overflow=, 1, 0) IntegerRange(0, 2)
723 Warn about function calls with format strings that write past the end
724 of the destination region.  Same as -Wformat-overflow=1.
726 Wformat-security
727 C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
728 Warn about possible security problems with format functions.
730 Wformat-signedness
731 C ObjC C++ ObjC++ Var(warn_format_signedness) Warning
732 Warn about sign differences with format functions.
734 Wformat-truncation
735 C ObjC C++ LTO ObjC++ Warning Alias(Wformat-truncation=, 1, 0)
736 Warn about calls to snprintf and similar functions that truncate output.
737 Same as -Wformat-truncation=1.
739 Wformat-y2k
740 C ObjC C++ ObjC++ Var(warn_format_y2k) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 2, 0)
741 Warn about strftime formats yielding 2-digit years.
743 Wformat-zero-length
744 C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 1, 0)
745 Warn about zero-length formats.
747 Wformat=
748 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
749 Warn about printf/scanf/strftime/strfmon format string anomalies.
751 Wformat-overflow=
752 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)
753 Warn about function calls with format strings that write past the end
754 of the destination region.
756 Wformat-truncation=
757 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)
758 Warn about calls to snprintf and similar functions that truncate output.
760 Wflex-array-member-not-at-end
761 C C++ Var(warn_flex_array_member_not_at_end) Warning
762 Warn when a structure containing a C99 flexible array member as the last
763 field is not at the end of another structure.
765 Wif-not-aligned
766 C ObjC C++ ObjC++ Var(warn_if_not_aligned) Init(1) Warning
767 Warn when the field in a struct is not aligned.
769 Wignored-qualifiers
770 C C++ Var(warn_ignored_qualifiers) Warning EnabledBy(Wextra)
771 Warn whenever type qualifiers are ignored.
773 Wignored-attributes
774 C C++ Var(warn_ignored_attributes) Init(1) Warning
775 Warn whenever attributes are ignored.
777 Winaccessible-base
778 C++ ObjC++ Var(warn_inaccessible_base) Init(1) Warning
779 Warn when a base is inaccessible in derived due to ambiguity.
781 Wincompatible-pointer-types
782 C ObjC Var(warn_incompatible_pointer_types) Init(1) Warning
783 Warn when there is a conversion between pointers that have incompatible types.
785 Winfinite-recursion
786 C ObjC C++ LTO ObjC++ Var(warn_infinite_recursion) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
787 Warn for infinitely recursive calls.
789 Waddress-of-packed-member
790 C ObjC C++ ObjC++ Var(warn_address_of_packed_member) Init(1) Warning
791 Warn when the address of packed member of struct or union is taken.
793 Winit-self
794 C ObjC C++ ObjC++ Var(warn_init_self) Warning LangEnabledBy(C++ ObjC++,Wall)
795 Warn about variables which are initialized to themselves.
797 Winit-list-lifetime
798 C++ ObjC++ Var(warn_init_list) Warning Init(1)
799 Warn about uses of std::initializer_list that can result in dangling pointers.
801 Winterference-size
802 C++ ObjC++ Var(warn_interference_size) Warning Init(1)
803 Warn about nonsensical values of --param destructive-interference-size or
804 constructive-interference-size.
806 Wimplicit
807 C ObjC Var(warn_implicit) Warning LangEnabledBy(C ObjC,Wall)
808 Warn about implicit declarations.
810 Wimplicit-fallthrough=
811 LangEnabledBy(C ObjC C++ ObjC++,Wextra,3,0)
812 ; in common.opt
814 Wdouble-promotion
815 C ObjC C++ ObjC++ Var(warn_double_promotion) Warning
816 Warn about implicit conversions from \"float\" to \"double\".
818 Wexpansion-to-defined
819 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)
820 Warn if \"defined\" is used outside #if.
822 Wimplicit-function-declaration
823 C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
824 Warn about implicit function declarations.
826 Wimplicit-int
827 C ObjC Var(warn_implicit_int) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
828 Warn when a declaration does not specify a type.
830 Wimport
831 C ObjC C++ ObjC++ Undocumented Ignore
833 Winherited-variadic-ctor
834 C++ ObjC++ Var(warn_inh_var_ctor) Init(1) Warning
835 Warn about C++11 inheriting constructors when the base has a variadic constructor.
837 Wint-conversion
838 C ObjC Var(warn_int_conversion) Init(1) Warning
839 Warn about incompatible integer to pointer and pointer to integer conversions.
841 Wint-in-bool-context
842 C ObjC C++ ObjC++ Var(warn_int_in_bool_context) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
843 Warn for suspicious integer expressions in boolean context.
845 Wint-to-pointer-cast
846 C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning
847 Warn when there is a cast to a pointer from an integer of a different size.
849 Winvalid-constexpr
850 C++ ObjC++ Var(warn_invalid_constexpr) Init(-1) Warning
851 Warn when a function never produces a constant expression.
853 Winvalid-offsetof
854 C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning
855 Warn about invalid uses of the \"offsetof\" macro.
857 Winvalid-pch
858 C ObjC C++ ObjC++ CPP(warn_invalid_pch) CppReason(CPP_W_INVALID_PCH) Var(cpp_warn_invalid_pch) Init(0) Warning
859 Warn about PCH files that are found but not used.
861 Winvalid-utf8
862 C ObjC C++ ObjC++ CPP(cpp_warn_invalid_utf8) CppReason(CPP_W_INVALID_UTF8) Var(warn_invalid_utf8) Init(0) Warning
863 Warn about invalid UTF-8 characters.
865 Wjump-misses-init
866 C ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C ObjC,Wc++-compat)
867 Warn when a jump misses a variable initialization.
869 Wliteral-suffix
870 C++ ObjC++ CPP(warn_literal_suffix) CppReason(CPP_W_LITERAL_SUFFIX) Var(cpp_warn_literal_suffix) Init(1) Warning
871 Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.
873 Wlogical-op
874 C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning
875 Warn when a logical operator is suspiciously always evaluating to true or false.
877 Wlogical-not-parentheses
878 C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
879 Warn when logical not is used on the left hand side operand of a comparison.
881 Wlong-long
882 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)
883 Do not warn about using \"long long\" when -pedantic.
885 Wmain
886 C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning LangEnabledBy(C ObjC,Wall, 2, 0)
887 Warn about suspicious declarations of \"main\".
889 Wmain
890 LangEnabledBy(C ObjC C++ ObjC++,Wpedantic, 2, 0)
893 Wmemset-transposed-args
894 C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
895 Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not.
897 Wmemset-elt-size
898 C ObjC C++ ObjC++ Var(warn_memset_elt_size) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
899 Warn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size.
901 Wmisleading-indentation
902 C C++ Common Var(warn_misleading_indentation) Warning LangEnabledBy(C C++,Wall)
903 Warn when the indentation of the code does not reflect the block structure.
905 Wmismatched-dealloc
906 C ObjC C++ ObjC++ Var(warn_mismatched_alloc) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
907 Warn for deallocation calls with arguments returned from mismatched allocation
908 functions.
910 Wmismatched-new-delete
911 C++ ObjC++ Var(warn_mismatched_new_delete) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
912 Warn for mismatches between calls to operator new or delete and the corresponding
913 call to the allocation or deallocation function.
915 Wmismatched-tags
916 C++ ObjC++ Var(warn_mismatched_tags) Warning
917 Warn when a class is redeclared or referenced using a mismatched class-key.
919 Wmissing-braces
920 C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
921 Warn about possibly missing braces around initializers.
923 Wmissing-declarations
924 C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
925 Warn about global functions without previous declarations.
927 Wmissing-field-initializers
928 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra)
929 Warn about missing fields in struct initializers.
931 Wmissing-requires
932 C++ ObjC++ Var(warn_missing_requires) Init(1) Warning
933 Warn about likely missing requires keyword.
935 Wmissing-template-keyword
936 C++ ObjC++ Var(warn_missing_template_keyword) Init(1) Warning
937 Warn when the template keyword is missing after a member access token in a dependent member access expression if that member is a template.
939 Wmultistatement-macros
940 C ObjC C++ ObjC++ Var(warn_multistatement_macros) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
941 Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for.
943 Wmultiple-inheritance
944 C++ ObjC++ Var(warn_multiple_inheritance) Warning
945 Warn on direct multiple inheritance.
947 Wnamespaces
948 C++ ObjC++ Var(warn_namespaces) Warning
949 Warn on namespace definition.
951 Wnrvo
952 C++ ObjC++ Var(warn_nrvo)
953 Warn if the named return value optimization is not performed although it is allowed.
955 Wpacked-not-aligned
956 C ObjC C++ ObjC++ Var(warn_packed_not_aligned) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
957 Warn when fields in a struct with the packed attribute are misaligned.
959 Wrange-loop-construct
960 C++ ObjC++ Var(warn_range_loop_construct) Warning LangEnabledBy(C++ ObjC++,Wall)
961 Warn when a range-based for-loop is creating unnecessary copies.
963 Wredundant-tags
964 C++ ObjC++ Var(warn_redundant_tags) Warning
965 Warn when a class or enumerated type is referenced using a redundant class-key.
967 Wsized-deallocation
968 C++ ObjC++ Var(warn_sized_deallocation) Warning EnabledBy(Wextra)
969 Warn about missing sized deallocation functions.
971 Wsizeof-pointer-div
972 C ObjC C++ ObjC++ Var(warn_sizeof_pointer_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
973 Warn about suspicious divisions of two sizeof expressions that don't work correctly with pointers.
975 Wsizeof-array-div
976 C ObjC C++ ObjC++ Var(warn_sizeof_array_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
977 Warn about divisions of two sizeof operators when the first one is applied
978 to an array and the divisor does not equal the size of the array element.
980 Wsizeof-pointer-memaccess
981 C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
982 Warn about suspicious length parameters to certain string functions if the argument uses sizeof.
984 Wsizeof-array-argument
985 C ObjC C++ ObjC++ Var(warn_sizeof_array_argument) Warning Init(1)
986 Warn when sizeof is applied on a parameter declared as an array.
988 Wstring-compare
989 C ObjC C++ LTO ObjC++ Warning Var(warn_string_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wextra)
990 Warn about calls to strcmp and strncmp used in equality expressions that
991 are necessarily true or false due to the length of one and size of the other
992 argument.
994 Wstringop-overflow
995 C ObjC C++ LTO ObjC++ Warning Alias(Wstringop-overflow=, 2, 0)
996 Warn about buffer overflow in string manipulation functions like memcpy
997 and strcpy.
999 Wstringop-overflow=
1000 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)
1001 Under the control of Object Size type, warn about buffer overflow in string
1002 manipulation functions like memcpy and strcpy.
1004 Wstringop-overread
1005 C ObjC C++ LTO ObjC++ Var(warn_stringop_overread) Init(1) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
1006 Warn about reading past the end of a source array in string manipulation functions like memchr and memcpy.
1008 Wstringop-truncation
1009 C ObjC C++ LTO ObjC++ Var(warn_stringop_truncation) Warning Init (1) LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
1010 Warn about truncation in string manipulation functions like strncat and strncpy.
1012 Wstrict-flex-arrays
1013 C C++ Var(warn_strict_flex_arrays) Warning
1014 Warn about inproper usages of flexible array members
1015 according to the level of -fstrict-flex-arrays.
1017 Wsuggest-attribute=format
1018 C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning
1019 Warn about functions which might be candidates for format attributes.
1021 Wsuggest-override
1022 C++ ObjC++ Var(warn_override) Warning
1023 Suggest that the override keyword be used when the declaration of a virtual
1024 function overrides another.
1026 Wswitch
1027 C ObjC C++ ObjC++ Var(warn_switch) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1028 Warn about enumerated switches, with no default, missing a case.
1030 Wswitch-default
1031 C ObjC C++ ObjC++ Var(warn_switch_default) Warning
1032 Warn about enumerated switches missing a \"default:\" statement.
1034 Wswitch-enum
1035 C ObjC C++ ObjC++ Var(warn_switch_enum) Warning
1036 Warn about all enumerated switches missing a specific case.
1038 Wswitch-bool
1039 C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1)
1040 Warn about switches with boolean controlling expression.
1042 Wswitch-outside-range
1043 C ObjC C++ ObjC++ Var(warn_switch_outside_range) Warning Init(1)
1044 Warn about switch values that are outside of the switch's type range.
1046 Wtemplates
1047 C++ ObjC++ Var(warn_templates) Warning
1048 Warn on primary template declaration.
1050 Wmissing-attributes
1051 C ObjC C++ ObjC++ Var(warn_missing_attributes) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1052 Warn about declarations of entities that may be missing attributes
1053 that related entities have been declared with.
1055 Wmissing-format-attribute
1056 C ObjC C++ ObjC++ Warning Alias(Wsuggest-attribute=format)
1059 Wmissing-include-dirs
1060 C ObjC C++ ObjC++ CPP(warn_missing_include_dirs) CppReason(CPP_W_MISSING_INCLUDE_DIRS) Var(cpp_warn_missing_include_dirs) Init(0) Warning
1061 Warn about user-specified include directories that do not exist.
1063 Wmissing-parameter-type
1064 C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra)
1065 Warn about function parameters declared without a type specifier in K&R-style functions.
1067 Wmissing-prototypes
1068 C ObjC Var(warn_missing_prototypes) Warning
1069 Warn about global functions without prototypes.
1071 Wmissing-variable-declarations
1072 C ObjC Var(warn_missing_variable_declarations) Warning
1073 Warn about global variables without previous declarations.
1075 Wmudflap
1076 C ObjC C++ ObjC++ WarnRemoved
1078 Wmultichar
1079 C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning
1080 Warn about use of multi-character character constants.
1082 Wnarrowing
1083 C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++11-compat)
1084 Warn about narrowing conversions within { } that are ill-formed in C++11.
1086 Wnested-externs
1087 C ObjC Var(warn_nested_externs) Warning
1088 Warn about \"extern\" declarations not at file scope.
1090 Wnoexcept
1091 C++ ObjC++ Var(warn_noexcept) Warning
1092 Warn when a noexcept expression evaluates to false even though the expression can't actually throw.
1094 Wnoexcept-type
1095 C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++17-compat)
1096 Warn if C++17 noexcept function type will change the mangled name of a symbol.
1098 Wnon-template-friend
1099 C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
1100 Warn when non-templatized friend functions are declared within a template.
1102 Wclass-conversion
1103 C++ ObjC++ Var(warn_class_conversion) Init(1) Warning
1104 Warn when a conversion function will never be called due to the type it converts to.
1106 Wclass-memaccess
1107 C++ ObjC++ Var(warn_class_memaccess) Warning LangEnabledBy(C++ ObjC++, Wall)
1108 Warn for unsafe raw memory writes to objects of class types.
1110 Wnon-virtual-dtor
1111 C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
1112 Warn about non-virtual destructors.
1114 Wnonnull
1115 C ObjC C++ LTO ObjC++ Var(warn_nonnull) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=,warn_format >= 1,0)
1116 Warn about NULL being passed to argument slots marked as requiring non-NULL.
1118 Wnonnull
1119 C ObjC C++ LTO ObjC++ LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
1122 Wnonnull-compare
1123 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1126 Wnormalized
1127 C ObjC C++ ObjC++ Warning Alias(Wnormalized=,nfc,none)
1130 Wnormalized=
1131 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)
1132 -Wnormalized=[none|id|nfc|nfkc] Warn about non-normalized Unicode strings.
1134 ; Required for these enum values.
1135 SourceInclude
1136 cpplib.h
1138 Enum
1139 Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
1141 EnumValue
1142 Enum(cpp_normalize_level) String(none) Value(normalized_none)
1144 EnumValue
1145 Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC)
1147 EnumValue
1148 Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C)
1150 EnumValue
1151 Enum(cpp_normalize_level) String(nfc) Value(normalized_C)
1153 Wobjc-root-class
1154 ObjC ObjC++ Var(warn_objc_root_class) Warning Init(1)
1155 Warn if a class interface has no superclass.  Root classes may use an attribute
1156 to suppress this warning.
1158 Wold-style-cast
1159 C++ ObjC++ Var(warn_old_style_cast) Warning
1160 Warn if a C-style cast is used in a program.
1162 Wold-style-declaration
1163 C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra)
1164 Warn for obsolescent usage in a declaration.
1166 Wold-style-definition
1167 C ObjC Var(warn_old_style_definition) Init(-1) Warning
1168 Warn if an old-style parameter definition is used.
1170 Wopenacc-parallelism
1171 C C++ Var(warn_openacc_parallelism) Warning
1172 Warn about potentially suboptimal choices related to OpenACC parallelism.
1174 Wopenmp-simd
1175 C C++ Var(warn_openmp_simd) Warning LangEnabledBy(C C++,Wall)
1176 Warn if a simd directive is overridden by the vectorizer cost model.
1178 Woverlength-strings
1179 C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
1180 Warn if a string is longer than the maximum portable length specified by the standard.
1182 Woverloaded-virtual
1183 C++ ObjC++ Warning Alias(Woverloaded-virtual=,2,0)
1184 Warn about overloaded virtual function names.
1186 Woverloaded-virtual=
1187 C++ ObjC++ Joined UInteger IntegerRange(0,2) Var(warn_overloaded_virtual) Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
1188 Warn about overloaded virtual function names.
1190 Woverride-init
1191 C ObjC Var(warn_override_init) Warning EnabledBy(Wextra)
1192 Warn about overriding initializers without side effects.
1194 Woverride-init-side-effects
1195 C ObjC Var(warn_override_init_side_effects) Init(1) Warning
1196 Warn about overriding initializers with side effects.
1198 Wpacked-bitfield-compat
1199 C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
1200 Warn about packed bit-fields whose offset changed in GCC 4.4.
1202 Wparentheses
1203 C ObjC C++ ObjC++ Var(warn_parentheses) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1204 Warn about possibly missing parentheses.
1206 Wpedantic
1207 C ObjC C++ ObjC++ CPP(cpp_pedantic) CppReason(CPP_W_PEDANTIC) Warning
1208 ; Documented in common.opt
1210 Wpessimizing-move
1211 C++ ObjC++ Var(warn_pessimizing_move) Warning LangEnabledBy(C++ ObjC++, Wall)
1212 Warn about calling std::move on a local object in a return statement preventing copy elision.
1214 Wpmf-conversions
1215 C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
1216 Warn when converting the type of pointers to member functions.
1218 Wpointer-arith
1219 C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
1220 Warn about function pointer arithmetic.
1222 Wpointer-sign
1223 C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic)
1224 Warn when a pointer differs in signedness in an assignment.
1226 Wpointer-compare
1227 C ObjC C++ ObjC++ Var(warn_pointer_compare) Init(1) Warning
1228 Warn when a pointer is compared with a zero character constant.
1230 Wpointer-to-int-cast
1231 C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
1232 Warn when a pointer is cast to an integer of a different size.
1234 Wpragmas
1235 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
1236 Warn about misuses of pragmas.
1238 Wprio-ctor-dtor
1239 C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
1240 Warn if constructor or destructors with priorities from 0 to 100 are used.
1242 Wproperty-assign-default
1243 ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning
1244 Warn if a property for an Objective-C object has no assign semantics specified.
1246 Wprotocol
1247 ObjC ObjC++ Var(warn_protocol) Init(1) Warning
1248 Warn if inherited methods are unimplemented.
1250 Wplacement-new
1251 C++ Warning Alias(Wplacement-new=, 1, 0)
1252 Warn for placement new expressions with undefined behavior.
1254 Wplacement-new=
1255 C++ Joined RejectNegative UInteger Var(warn_placement_new) Init(-1) Warning IntegerRange(0, 2)
1256 Warn for placement new expressions with undefined behavior.
1258 Wredundant-decls
1259 C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
1260 Warn about multiple declarations of the same object.
1262 Wredundant-move
1263 C++ ObjC++ Var(warn_redundant_move) Warning LangEnabledBy(C++ ObjC++,Wextra)
1264 Warn about redundant calls to std::move.
1266 Wregister
1267 C++ ObjC++ Var(warn_register) Warning
1268 Warn about uses of register storage specifier.
1270 Wreorder
1271 C++ ObjC++ Var(warn_reorder) Warning LangEnabledBy(C++ ObjC++,Wall)
1272 Warn when the compiler reorders code.
1274 Wreturn-mismatch
1275 C ObjC Var(warn_return_mismatch) Warning Init(1)
1276 Warn whenever void-returning functions return a non-void expressions, or a return expression is missing in a function not returning void.
1278 Wreturn-type
1279 C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) Init(-1)
1280 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++).
1282 Wscalar-storage-order
1283 C ObjC C++ ObjC++ Var(warn_scalar_storage_order) Init(1) Warning
1284 Warn on suspicious constructs involving reverse scalar storage order.
1286 Wselector
1287 ObjC ObjC++ Var(warn_selector) Warning
1288 Warn if a selector has multiple methods.
1290 Wself-move
1291 C++ ObjC++ Var(warn_self_move) Warning LangEnabledBy(C++ ObjC++, Wall)
1292 Warn when a value is moved to itself with std::move.
1294 Wsequence-point
1295 C ObjC C++ ObjC++ Var(warn_sequence_point) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1296 Warn about possible violations of sequence point rules.
1298 Wshadow-ivar
1299 ObjC ObjC++ Var(warn_shadow_ivar) EnabledBy(Wshadow) Init(1) Warning
1300 Warn if a local declaration hides an instance variable.
1302 Wshift-overflow
1303 C ObjC C++ ObjC++ Warning Alias(Wshift-overflow=, 1, 0)
1304 Warn if left shift of a signed value overflows.
1306 Wshift-overflow=
1307 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_shift_overflow) Init(-1) Warning IntegerRange(0, 2)
1308 Warn if left shift of a signed value overflows.
1310 Wshift-count-negative
1311 C ObjC C++ ObjC++ Var(warn_shift_count_negative) Init(1) Warning
1312 Warn if shift count is negative.
1314 Wshift-count-overflow
1315 C ObjC C++ ObjC++ Var(warn_shift_count_overflow) Init(1) Warning
1316 Warn if shift count >= width of type.
1318 Wshift-negative-value
1319 C ObjC C++ ObjC++ Var(warn_shift_negative_value) Init(-1) Warning
1320 Warn if left shifting a negative value.
1322 Warith-conversion
1323 C ObjC C++ ObjC++ Var(warn_arith_conv) Warning
1324 Warn if conversion of the result of arithmetic might change the value even though converting the operands cannot.
1326 Wsign-compare
1327 C ObjC C++ ObjC++ Var(warn_sign_compare) Warning LangEnabledBy(C++ ObjC++,Wall)
1328 Warn about signed-unsigned comparisons.
1330 Wsign-compare
1331 C ObjC C++ ObjC++ EnabledBy(Wextra)
1334 Wsign-conversion
1335 C ObjC C++ ObjC++ Var(warn_sign_conversion) Warning LangEnabledBy(C ObjC,Wconversion)
1336 Warn for implicit type conversions between signed and unsigned integers.
1338 Wsign-promo
1339 C++ ObjC++ Var(warn_sign_promo) Warning
1340 Warn when overload promotes from unsigned to signed.
1342 Wstrict-null-sentinel
1343 C++ ObjC++ Warning Var(warn_strict_null_sentinel)
1344 Warn about uncasted NULL used as sentinel.
1346 Wstrict-prototypes
1347 C ObjC Var(warn_strict_prototypes) Warning
1348 Warn about unprototyped function declarations.
1350 Wstrict-aliasing=
1351 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0) IntegerRange(0, 3)
1354 Wstrict-overflow=
1355 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 5)
1358 Wstrict-selector-match
1359 ObjC ObjC++ Var(warn_strict_selector_match) Warning
1360 Warn if type signatures of candidate methods do not match exactly.
1362 Wsync-nand
1363 C C++ Var(warn_sync_nand) Init(1) Warning
1364 Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used.
1366 Wsynth
1367 C++ ObjC++ Var(warn_synth) Warning
1368 Deprecated.  This switch has no effect.
1370 Wsystem-headers
1371 C ObjC C++ ObjC++ Warning
1372 ; Documented in common.opt
1374 Wtautological-compare
1375 C ObjC C++ ObjC++ Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1376 Warn if a comparison always evaluates to true or false.
1378 Wterminate
1379 C++ ObjC++ Warning Var(warn_terminate) Init(1)
1380 Warn if a throw expression will always result in a call to terminate().
1382 Wtraditional
1383 C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning
1384 Warn about features not present in traditional C.
1386 Wtraditional-conversion
1387 C ObjC Var(warn_traditional_conversion) Warning
1388 Warn of prototypes causing type conversions different from what would happen in the absence of prototype.
1390 Wtrigraphs
1391 C ObjC C++ ObjC++ CPP(warn_trigraphs) CppReason(CPP_W_TRIGRAPHS) Var(cpp_warn_trigraphs) Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1392 Warn if trigraphs are encountered that might affect the meaning of the program.
1394 Wundeclared-selector
1395 ObjC ObjC++ Var(warn_undeclared_selector) Warning
1396 Warn about @selector()s without previously declared methods.
1398 Wundef
1399 C ObjC C++ ObjC++ CPP(warn_undef) CppReason(CPP_W_UNDEF) Var(cpp_warn_undef) Init(0) Warning
1400 Warn if an undefined macro is used in an #if directive.
1402 Wunicode
1403 C ObjC C++ ObjC++ CPP(cpp_warn_unicode) CppReason(CPP_W_UNICODE) Var(warn_unicode) Init(1) Warning
1404 Warn about invalid forms of delimited or named escape sequences.
1406 Wuninitialized
1407 C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
1410 Wmaybe-uninitialized
1411 C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
1414 Wunknown-pragmas
1415 C ObjC C++ ObjC++ Warning Var(warn_unknown_pragmas) LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0)
1416 Warn about unrecognized pragmas.
1418 Wunsuffixed-float-constants
1419 C ObjC Var(warn_unsuffixed_float_constants) Warning
1420 Warn about unsuffixed float constants.
1422 Wunused
1423 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1424 ; documented in common.opt
1426 Wunused-local-typedefs
1427 C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
1428 Warn when typedefs locally defined in a function are not used.
1430 Wunused-macros
1431 C ObjC C++ ObjC++ CppReason(CPP_W_UNUSED_MACROS) Var(cpp_warn_unused_macros) Warning
1432 Warn about macros defined in the main file that are not used.
1434 Wunused-result
1435 C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning
1436 Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.
1438 Wunused-variable
1439 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wunused)
1440 ; documented in common.opt
1442 Wunused-const-variable
1443 C ObjC C++ ObjC++ Warning Alias(Wunused-const-variable=, 2, 0)
1444 Warn when a const variable is unused.
1446 Wunused-const-variable=
1447 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(C ObjC,Wunused-variable, 1, 0) IntegerRange(0, 2)
1448 Warn when a const variable is unused.
1450 ; Defining this option here in addition to common.opt is necessary
1451 ; in order for the default -Wall setting of -Wuse-after-free=2 to take
1452 ; effect.
1454 Wuse-after-free=
1455 LangEnabledBy(C ObjC C++ LTO ObjC++, Wall,2,0)
1456 ; in common.opt
1458 Wvariadic-macros
1459 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)
1460 Warn about using variadic macros.
1462 Wvarargs
1463 C ObjC C++ ObjC++ Warning Var(warn_varargs) Init(1)
1464 Warn about questionable usage of the macros used to retrieve variable arguments.
1466 Wvexing-parse
1467 C++ ObjC++ Warning Var(warn_vexing_parse) Init(1)
1468 Warn about the most vexing parse syntactic ambiguity.
1470 Wvla
1471 C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
1472 Warn if a variable length array is used.
1474 Wvla-larger-than=
1475 C ObjC C++ LTO ObjC++ Var(warn_vla_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
1476 -Wvla-larger-than=<number>      Warn on unbounded uses of variable-length
1477 arrays, and on bounded uses of variable-length arrays whose bound can be
1478 larger than <number> bytes.
1480 Wno-vla-larger-than
1481 C ObjC C++ LTO ObjC++ Alias(Wvla-larger-than=,18446744073709551615EiB,none) Warning
1482 Disable Wvla-larger-than= warning.  Equivalent to Wvla-larger-than=<SIZE_MAX> or larger.
1484 Wvla-parameter
1485 C ObjC C++ ObjC++ Var(warn_vla_parameter) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1486 Warn about mismatched declarations of VLA parameters.
1488 Wvolatile
1489 C++ ObjC++ Var(warn_volatile) Warning
1490 Warn about deprecated uses of volatile qualifier.
1492 Wvolatile-register-var
1493 C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1494 Warn when a register variable is declared volatile.
1496 Wvirtual-inheritance
1497 C++ ObjC++ Var(warn_virtual_inheritance) Warning
1498 Warn on direct virtual inheritance.
1500 Wvirtual-move-assign
1501 C++ ObjC++ Var(warn_virtual_move_assign) Warning Init(1)
1502 Warn if a virtual base has a non-trivial move assignment operator.
1504 Wwrite-strings
1505 C ObjC C++ ObjC++ Var(warn_write_strings) Warning
1506 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.
1508 Wxor-used-as-pow
1509 C ObjC C++ ObjC++ Var(warn_xor_used_as_pow) Warning Init(1)
1510 Warn about xor operators where it appears the user meant exponentiation.
1512 Wzero-as-null-pointer-constant
1513 C++ ObjC++ Var(warn_zero_as_null_pointer_constant) Warning
1514 Warn when a literal '0' is used as null pointer.
1516 Wuseless-cast
1517 C ObjC C++ ObjC++ Var(warn_useless_cast) Warning
1518 Warn about useless casts.
1520 Wsubobject-linkage
1521 C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1)
1522 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.
1524 Welaborated-enum-base
1525 C++ ObjC++ Var(warn_elaborated_enum_base) Warning Init(1)
1526 Warn if an additional enum-base is used in an elaborated-type-specifier.
1528 Wduplicate-decl-specifier
1529 C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall)
1530 Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier.
1532 Wrestrict
1533 C ObjC C++ ObjC++ Var(warn_restrict) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
1534 Warn when an argument passed to a restrict-qualified parameter aliases with
1535 another argument.
1537 ansi
1538 C ObjC C++ ObjC++
1539 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
1542 C ObjC C++ ObjC++ Joined
1543 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
1545 fabi-compat-version=
1546 C++ ObjC++ Joined RejectNegative UInteger Var(flag_abi_compat_version) Init(-1)
1547 The version of the C++ ABI used for -Wabi warnings and link compatibility aliases.
1549 faccess-control
1550 C++ ObjC++ Var(flag_access_control) Init(1)
1551 Enforce class member access control semantics.
1553 fada-spec-parent=
1554 C ObjC C++ ObjC++ RejectNegative Joined Var(ada_specs_parent)
1555 -fada-spec-parent=unit  Dump Ada specs as child units of given parent.
1557 faligned-new
1558 C++ ObjC++ Alias(faligned-new=,1,0)
1559 Support C++17 allocation of over-aligned types.
1561 faligned-new=
1562 C++ ObjC++ Joined RejectNegative Var(aligned_new_threshold) UInteger Init(-1)
1563 -faligned-new=<N>       Use C++17 over-aligned type allocation for alignments greater than N.
1565 fall-virtual
1566 C++ ObjC++ WarnRemoved
1568 fallow-parameterless-variadic-functions
1569 C ObjC Ignore
1570 Does nothing. Preserved for backward compatibility.
1572 falt-external-templates
1573 C++ ObjC++ WarnRemoved
1574 No longer supported.
1576 fasm
1577 C ObjC C++ ObjC++ Var(flag_no_asm, 0)
1578 Recognize the \"asm\" keyword.
1580 ; Define extra predefined macros for use in libgcc.
1581 fbuilding-libgcc
1582 C ObjC C++ ObjC++ Undocumented Var(flag_building_libgcc)
1584 fbuiltin
1585 C ObjC C++ ObjC++ Var(flag_no_builtin, 0)
1586 Recognize built-in functions.
1588 fbuiltin-
1589 C ObjC C++ ObjC++ Joined
1591 fcanonical-system-headers
1592 C ObjC C++ ObjC++
1593 Where shorter, use canonicalized paths to systems headers.
1595 fchar8_t
1596 C++ ObjC++ Var(flag_char8_t) Init(-1)
1597 Enable the char8_t fundamental type and use it as the type for UTF-8 string
1598 and character literals.
1600 fcheck-pointer-bounds
1601 C ObjC C++ ObjC++ LTO WarnRemoved
1602 Removed in GCC 9.  This switch has no effect.
1604 fchkp-check-incomplete-type
1605 C ObjC C++ ObjC++ LTO WarnRemoved
1606 Removed in GCC 9.  This switch has no effect.
1608 fchkp-zero-input-bounds-for-main
1609 C ObjC C++ ObjC++ LTO WarnRemoved
1610 Removed in GCC 9.  This switch has no effect.
1612 fchkp-first-field-has-own-bounds
1613 C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
1614 Removed in GCC 9.  This switch has no effect.
1616 fchkp-narrow-bounds
1617 C ObjC C++ ObjC++ LTO WarnRemoved
1618 Removed in GCC 9.  This switch has no effect.
1620 fchkp-narrow-to-innermost-array
1621 C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
1622 Removed in GCC 9.  This switch has no effect.
1624 fchkp-flexible-struct-trailing-arrays
1625 C ObjC C++ ObjC++ LTO WarnRemoved
1626 Removed in GCC 9.  This switch has no effect.
1628 fchkp-optimize
1629 C ObjC C++ ObjC++ LTO WarnRemoved
1631 fchkp-use-fast-string-functions
1632 C ObjC C++ ObjC++ LTO WarnRemoved
1633 Removed in GCC 9.  This switch has no effect.
1635 fchkp-use-nochk-string-functions
1636 C ObjC C++ ObjC++ LTO WarnRemoved
1637 Removed in GCC 9.  This switch has no effect.
1639 fchkp-use-static-bounds
1640 C ObjC C++ ObjC++ LTO WarnRemoved
1641 Removed in GCC 9.  This switch has no effect.
1643 fchkp-use-static-const-bounds
1644 C ObjC C++ ObjC++ LTO WarnRemoved
1645 Removed in GCC 9.  This switch has no effect.
1647 fchkp-treat-zero-dynamic-size-as-infinite
1648 C ObjC C++ ObjC++ LTO WarnRemoved
1649 Removed in GCC 9.  This switch has no effect.
1651 fchkp-check-read
1652 C ObjC C++ ObjC++ LTO WarnRemoved
1653 Removed in GCC 9.  This switch has no effect.
1655 fchkp-check-write
1656 C ObjC C++ ObjC++ LTO WarnRemoved
1657 Removed in GCC 9.  This switch has no effect.
1659 fchkp-store-bounds
1660 C ObjC C++ ObjC++ LTO WarnRemoved
1661 Removed in GCC 9.  This switch has no effect.
1663 fchkp-instrument-calls
1664 C ObjC C++ ObjC++ LTO WarnRemoved
1665 Removed in GCC 9.  This switch has no effect.
1667 fchkp-instrument-marked-only
1668 C ObjC C++ ObjC++ LTO WarnRemoved
1669 Removed in GCC 9.  This switch has no effect.
1671 fchkp-use-wrappers
1672 C ObjC C++ ObjC++ LTO WarnRemoved
1673 Removed in GCC 9.  This switch has no effect.
1675 static-libmpx
1676 Driver WarnRemoved
1677 Removed in GCC 9.  This switch has no effect.
1679 static-libmpxwrappers
1680 Driver WarnRemoved
1681 Removed in GCC 9.  This switch has no effect.
1683 fcilkplus
1684 C ObjC C++ ObjC++ LTO Undocumented Ignore
1685 Removed in GCC 8.  This switch has no effect.
1687 fconcepts
1688 C++ ObjC++ Var(flag_concepts)
1689 Enable support for C++ concepts.
1691 fconcepts-ts
1692 C++ ObjC++ Var(flag_concepts_ts) Init(0)
1693 Enable certain features present in the Concepts TS.
1695 fconcepts-diagnostics-depth=
1696 C++ ObjC++ Joined RejectNegative UInteger Var(concepts_diagnostics_max_depth) Init(1)
1697 Specify maximum error replay depth during recursive diagnosis of a constraint satisfaction failure.
1699 fcond-mismatch
1700 C ObjC C++ ObjC++
1701 Allow the arguments of the '?' operator to have different types.
1703 fconserve-space
1704 C++ ObjC++ Ignore
1705 Does nothing.  Preserved for backward compatibility.
1707 fconstant-string-class=
1708 ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
1709 -fconst-string-class=<name>     Use class <name> for constant strings.
1711 fconstexpr-depth=
1712 C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512)
1713 -fconstexpr-depth=<number>      Specify maximum constexpr recursion depth.
1715 fconstexpr-cache-depth=
1716 C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_cache_depth) Init(8)
1717 -fconstexpr-cache-depth=<number>        Specify maximum constexpr recursion cache depth.
1719 fconstexpr-fp-except
1720 C++ ObjC++ Var(flag_constexpr_fp_except) Init(0)
1721 Allow IEC559 floating point exceptions in constant expressions.
1723 fconstexpr-loop-limit=
1724 C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_loop_limit) Init(262144)
1725 -fconstexpr-loop-limit=<number> Specify maximum constexpr loop iteration count.
1727 fconstexpr-ops-limit=
1728 C++ ObjC++ Joined RejectNegative Host_Wide_Int Var(constexpr_ops_limit) Init(33554432)
1729 -fconstexpr-ops-limit=<number>  Specify maximum number of constexpr operations during a single constexpr evaluation.
1731 fcontracts
1732 C++ ObjC++ Var(flag_contracts) Init(0)
1733 Enable certain features present in drafts of C++ Contracts.
1735 Enum
1736 Name(on_off) Type(int) UnknownError(argument %qs must be either %<on%> or %<off%>)
1738 EnumValue
1739 Enum(on_off) String(off) Value(0)
1741 EnumValue
1742 Enum(on_off) String(on) Value(1)
1744 fcontract-assumption-mode=
1745 C++ Joined RejectNegative
1746 -fcontract-assumption-mode=[on|off]     Enable or disable treating axiom level contracts as assumptions (default on).
1748 fcontract-build-level=
1749 C++ Joined RejectNegative
1750 -fcontract-build-level=[off|default|audit]      Specify max contract level to generate runtime checks for.
1752 fcontract-strict-declarations=
1753 C++ Var(flag_contract_strict_declarations) Enum(on_off) Joined Init(0) RejectNegative
1754 -fcontract-strict-declarations=[on|off] Enable or disable warnings on generalized redeclaration of functions with contracts (default off).
1756 fcontract-mode=
1757 C++ Var(flag_contract_mode) Enum(on_off) Joined Init(1) RejectNegative
1758 -fcontract-mode=[on|off]        Enable or disable all contract facilities (default on).
1760 fcontract-continuation-mode=
1761 C++ Joined RejectNegative
1762 -fcontract-continuation-mode=[on|off]   Enable or disable contract continuation mode (default off).
1764 fcontract-role=
1765 C++ Joined RejectNegative
1766 -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).
1768 fcontract-semantic=
1769 C++ Joined RejectNegative
1770 -fcontract-semantic=<level>:<semantic>  Specify the concrete semantics for level.
1772 fcoroutines
1773 C++ LTO Var(flag_coroutines)
1774 Enable C++ coroutines (experimental).
1776 fdebug-cpp
1777 C ObjC C++ ObjC++
1778 Emit debug annotations during preprocessing.
1780 fdeduce-init-list
1781 C++ ObjC++ Ignore
1782 Does nothing.  Preserved for backward compatibility.
1784 fdeclone-ctor-dtor
1785 C++ ObjC++ Var(flag_declone_ctor_dtor) Init(-1)
1786 Factor complex constructors and destructors to favor space over speed.
1788 fdefault-inline
1789 C++ ObjC++ Ignore
1790 Does nothing.  Preserved for backward compatibility.
1792 fdiagnostics-show-template-tree
1793 C++ ObjC++ Var(flag_diagnostics_show_template_tree) Init(0)
1794 Print hierarchical comparisons when template types are mismatched.
1796 fdirectives-only
1797 C ObjC C++ ObjC++
1798 Preprocess directives only.
1800 fdollars-in-identifiers
1801 C ObjC C++ ObjC++
1802 Permit '$' as an identifier character.
1804 fmacro-prefix-map=
1805 C ObjC C++ ObjC++ Joined RejectNegative
1806 -fmacro-prefix-map=<old>=<new>  Map one directory name to another in __FILE__, __BASE_FILE__, and __builtin_FILE().
1808 fdump-ada-spec
1809 C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec)
1810 Write all declarations as Ada code transitively.
1812 fdump-ada-spec-slim
1813 C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec_slim)
1814 Write all declarations as Ada code for the given file only.
1816 felide-constructors
1817 C++ ObjC++ Var(flag_elide_constructors) Init(1)
1819 felide-type
1820 C++ ObjC++ Var(flag_elide_type) Init(1)
1821 Do not elide common elements in template comparisons.
1823 fenforce-eh-specs
1824 C++ ObjC++ Var(flag_enforce_eh_specs) Init(1)
1825 Generate code to check exception specifications.
1827 fenum-int-equiv
1828 C++ ObjC++ WarnRemoved
1830 fexec-charset=
1831 C ObjC C++ ObjC++ Joined RejectNegative
1832 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>.
1834 fextended-identifiers
1835 C ObjC C++ ObjC++
1836 Permit universal character names (\\u and \\U) in identifiers.
1838 finput-charset=
1839 C ObjC C++ ObjC++ Joined RejectNegative
1840 -finput-charset=<cset>  Specify the default character set for source files.
1842 fextern-tls-init
1843 C++ ObjC++ Var(flag_extern_tls_init) Init(-1)
1844 Support dynamic initialization of thread-local variables in a different translation unit.
1846 fexternal-templates
1847 C++ ObjC++ WarnRemoved
1849 ffold-simple-inlines
1850 C++ ObjC++ Optimization Var(flag_fold_simple_inlines)
1851 Fold calls to simple inline functions.
1853 ffor-scope
1854 C++ ObjC++ WarnRemoved
1856 ffreestanding
1857 C ObjC C++ ObjC++
1858 Do not assume that standard C libraries and \"main\" exist.
1860 fgnu-keywords
1861 C++ ObjC++ Var(flag_no_gnu_keywords, 0)
1862 Recognize GNU-defined keywords.
1864 fgnu-runtime
1865 ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime,0) Init(NEXT_OBJC_RUNTIME)
1866 Generate code for GNU runtime environment.
1868 fgnu89-inline
1869 C ObjC Var(flag_gnu89_inline) Init(-1)
1870 Use traditional GNU semantics for inline functions.
1872 fguiding-decls
1873 C++ ObjC++ WarnRemoved
1875 fhandle-exceptions
1876 C++ ObjC++ Optimization Alias(fexceptions) Warn({%<-fhandle-exceptions%> has been renamed %<-fexceptions%> (and is now on by default)})
1878 fhonor-std
1879 C++ ObjC++ WarnRemoved
1881 fhosted
1882 C ObjC
1883 Assume normal C execution environment.
1885 fhuge-objects
1886 C++ ObjC++ WarnRemoved
1887 No longer supported.
1889 fimplement-inlines
1890 C++ ObjC++ Var(flag_implement_inlines) Init(1)
1891 Export functions even if they can be inlined.
1893 fimplicit-constexpr
1894 C++ ObjC++ Var(flag_implicit_constexpr)
1895 Make inline functions constexpr by default.
1897 fimplicit-inline-templates
1898 C++ ObjC++ Var(flag_implicit_inline_templates) Init(1)
1899 Emit implicit instantiations of inline templates.
1901 fimplicit-templates
1902 C++ ObjC++ Var(flag_implicit_templates) Init(1)
1903 Emit implicit instantiations of templates.
1905 fnew-inheriting-ctors
1906 C++ ObjC++ Var(flag_new_inheriting_ctors) Init(1)
1907 Implement C++17 inheriting constructor semantics.
1909 ffriend-injection
1910 C++ ObjC++ WarnRemoved
1912 fkeep-inline-dllexport
1913 C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES)
1914 Don't emit dllexported inline functions unless needed.
1916 flabels-ok
1917 C++ ObjC++ WarnRemoved
1919 flax-vector-conversions
1920 C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
1921 Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
1923 fmodules-ts
1924 C++ ObjC++ Var(flag_modules) Integer Init(0)
1925 Enable C++ modules-ts (experimental).
1927 fno-modules
1928 C++ ObjC++ Undocumented RejectNegative Var(flag_modules,0) Integer
1929 ;; undocumented
1931 fmodule-header
1932 C++ ObjC RejectNegative Var(flag_header_unit,0) Integer
1933 Enable C++ header module (experimental).
1935 fmodule-header=
1936 C++ ObjC++ Joined RejectNegative Undocumented
1938 fmodule-implicit-inline
1939 C++ ObjC++ Var(flag_module_implicit_inline,0) Integer
1940 Member functions defined within their class are inline in module purview.
1942 fmodule-only
1943 C++ ObjC RejectNegative Var(flag_module_only) Integer
1944 Only emit Compiled Module Interface.
1946 fmodule-mapper=
1947 C++ ObjC++ Joined RejectNegative MissingArgError(missing mapper)
1948 Mapper for module to CMI files.
1950 fmodule-lazy
1951 C++ ObjC++ Var(flag_module_lazy) Init(1)
1952 Enable lazy module importing.
1954 fmodule-version-ignore
1955 C++ ObjC Var(flag_module_version_ignore) Integer
1956 ; undocumented, Very dangerous, but occasionally useful
1958 Winvalid-imported-macros
1959 C++ ObjC++ Var(warn_imported_macros) Warning
1960 Warn about macros that have conflicting header units definitions.
1962 Wcompare-distinct-pointer-types
1963 C ObjC Var(warn_compare_distinct_pointer_types) Warning Init(1)
1964 Warn if pointers of distinct types are compared without a cast.
1966 flang-info-include-translate
1967 C++ Var(note_include_translate_yes)
1968 Note #include directives translated to import declarations.
1970 flang-info-include-translate-not
1971 C++ Var(note_include_translate_no)
1972 Note #include directives not translated to import declarations, and not known to be textual.
1974 flang-info-include-translate=
1975 C++ Joined RejectNegative MissingArgError(missing header name)
1976 Note a #include translation of a specific header.
1978 flang-info-module-cmi
1979 C++ Var(note_module_cmi_yes)
1980 Note Compiled Module Interface pathnames.
1982 flang-info-module-cmi=
1983 C++ Joined RejectNegative MissingArgError(missing module name)
1984 Note Compiled Module Interface pathname of a specific module or header-unit.
1986 fmax-include-depth=
1987 C ObjC C++ ObjC++ Joined RejectNegative UInteger
1988 fmax-include-depth=<number> Set the maximum depth of the nested #include.
1990 fms-extensions
1991 C ObjC C++ ObjC++ Var(flag_ms_extensions)
1992 Don't warn about uses of Microsoft extensions.
1994 fmudflap
1995 C ObjC C++ ObjC++ WarnRemoved
1997 fmudflapth
1998 C ObjC C++ ObjC++ WarnRemoved
2000 fmudflapir
2001 C ObjC C++ ObjC++ WarnRemoved
2003 fname-mangling-version-
2004 C++ ObjC++ Joined WarnRemoved
2006 fnew-abi
2007 C++ ObjC++ WarnRemoved
2009 fnew-ttp-matching
2010 C++ ObjC++ Var(flag_new_ttp)
2011 Implement resolution of DR 150 for matching of template template arguments.
2013 fnext-runtime
2014 ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime)
2015 Generate code for NeXT (Apple macOS) runtime environment.
2017 fnil-receivers
2018 ObjC ObjC++ Var(flag_nil_receivers) Init(1)
2019 Assume that receivers of Objective-C messages may be nil.
2021 flocal-ivars
2022 ObjC ObjC++ Var(flag_local_ivars) Init(1)
2023 Allow access to instance variables as if they were local declarations within instance method implementations.
2025 fivar-visibility=
2026 ObjC ObjC++ Joined RejectNegative Enum(ivar_visibility) Var(default_ivar_visibility) Init(IVAR_VISIBILITY_PROTECTED)
2027 -fvisibility=[private|protected|public|package] Set the default symbol visibility.
2029 Enum
2030 Name(ivar_visibility) Type(enum ivar_visibility) UnknownError(unrecognized ivar visibility value %qs)
2032 EnumValue
2033 Enum(ivar_visibility) String(private) Value(IVAR_VISIBILITY_PRIVATE)
2035 EnumValue
2036 Enum(ivar_visibility) String(protected) Value(IVAR_VISIBILITY_PROTECTED)
2038 EnumValue
2039 Enum(ivar_visibility) String(public) Value(IVAR_VISIBILITY_PUBLIC)
2041 EnumValue
2042 Enum(ivar_visibility) String(package) Value(IVAR_VISIBILITY_PACKAGE)
2044 fnonansi-builtins
2045 C++ ObjC++ Var(flag_no_nonansi_builtin, 0)
2047 fnonnull-objects
2048 C++ ObjC++ WarnRemoved
2050 fnothrow-opt
2051 C++ ObjC++ Optimization Var(flag_nothrow_opt)
2052 Treat a throw() exception specification as noexcept to improve code size.
2054 fobjc-abi-version=
2055 ObjC ObjC++ LTO Joined RejectNegative UInteger Var(flag_objc_abi)
2056 Specify which ABI to use for Objective-C family code and meta-data generation.
2058 ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
2059 ; to initialize any non-POD ivars in Objective-C++ classes.
2060 fobjc-call-cxx-cdtors
2061 ObjC++ Var(flag_objc_call_cxx_cdtors)
2062 Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed.
2064 fobjc-direct-dispatch
2065 ObjC ObjC++ Var(flag_objc_direct_dispatch)
2066 Allow fast jumps to the message dispatcher.
2068 ; Nonzero means that we will allow new ObjC exception syntax (@throw,
2069 ; @try, etc.) in source code.
2070 fobjc-exceptions
2071 ObjC ObjC++ Var(flag_objc_exceptions)
2072 Enable Objective-C exception and synchronization syntax.
2074 fobjc-gc
2075 ObjC ObjC++ LTO Var(flag_objc_gc)
2076 Enable garbage collection (GC) in Objective-C/Objective-C++ programs.
2078 fobjc-nilcheck
2079 ObjC ObjC++ Var(flag_objc_nilcheck,1)
2080 Enable inline checks for nil receivers with the NeXT runtime and ABI version 2.
2082 ; Nonzero means that we generate NeXT setjmp based exceptions.
2083 fobjc-sjlj-exceptions
2084 ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
2085 Enable Objective-C setjmp exception handling runtime.
2087 fobjc-std=objc1
2088 ObjC ObjC++ Var(flag_objc1_only)
2089 Conform to the Objective-C 1.0 language as implemented in GCC 4.0.
2091 fopenacc
2092 C ObjC C++ ObjC++ LTO Var(flag_openacc)
2093 Enable OpenACC.
2095 fopenacc-dim=
2096 C ObjC C++ ObjC++ LTO Joined Var(flag_openacc_dims)
2097 Specify default OpenACC compute dimensions.
2099 fopenmp
2100 C ObjC C++ ObjC++ LTO Var(flag_openmp)
2101 Enable OpenMP (implies -frecursive in Fortran).
2103 fopenmp-simd
2104 C ObjC C++ ObjC++ Var(flag_openmp_simd)
2105 Enable OpenMP's SIMD directives.
2107 foperator-names
2108 C++ ObjC++
2109 Recognize C++ keywords like \"compl\" and \"xor\".
2111 foptional-diags
2112 C++ ObjC++ Ignore
2113 Does nothing.  Preserved for backward compatibility.
2115 fpch-deps
2116 C ObjC C++ ObjC++
2118 fpch-preprocess
2119 C ObjC C++ ObjC++
2120 Look for and use PCH files even when preprocessing.
2122 fpermissive
2123 C ObjC C++ ObjC++ Var(flag_permissive)
2124 Downgrade conformance errors to warnings.
2126 fplan9-extensions
2127 C ObjC Var(flag_plan9_extensions)
2128 Enable Plan 9 language extensions.
2130 fpreprocessed
2131 C ObjC C++ ObjC++
2132 Treat the input file as already preprocessed.
2134 ftrack-macro-expansion
2135 C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
2136 ; converted into ftrack-macro-expansion=
2138 ftrack-macro-expansion=
2139 C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
2140 -ftrack-macro-expansion=<0|1|2> Track locations of tokens coming from macro expansion and display them in error messages.
2142 fpretty-templates
2143 C++ ObjC++ Var(flag_pretty_templates) Init(1)
2144 Do not pretty-print template specializations as the template signature followed by the arguments.
2146 fprintf-return-value
2147 C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(1)
2148 Treat known sprintf return values as constants.
2150 freplace-objc-classes
2151 ObjC ObjC++ LTO Var(flag_replace_objc_classes)
2152 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
2154 frepo
2155 C++ ObjC++ WarnRemoved
2156 Removed in GCC 10.  This switch has no effect.
2158 frtti
2159 C++ ObjC++ Optimization Var(flag_rtti) Init(1)
2160 Generate run time type descriptor information.
2162 fshort-enums
2163 C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums)
2164 Use the narrowest integer type possible for enumeration types.
2166 fshort-wchar
2167 C ObjC C++ ObjC++ LTO Optimization Var(flag_short_wchar)
2168 Force the underlying type for \"wchar_t\" to be \"unsigned short\".
2170 fsigned-bitfields
2171 C ObjC C++ ObjC++ Var(flag_signed_bitfields) Init(1)
2172 When \"signed\" or \"unsigned\" is not given make the bitfield signed.
2174 fsigned-char
2175 C ObjC C++ ObjC++ LTO Var(flag_signed_char)
2176 Make \"char\" signed by default.
2178 fsized-deallocation
2179 C++ ObjC++ Var(flag_sized_deallocation) Init(-1)
2180 Enable C++14 sized deallocation support.
2182 fstrict-flex-arrays
2183 C C++ Common Alias(fstrict-flex-arrays=,3,0)
2185 fstrict-flex-arrays=
2186 C C++ Common Joined RejectNegative UInteger Var(flag_strict_flex_arrays) Init(0) IntegerRange(0,3)
2187 -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.
2189 fsquangle
2190 C++ ObjC++ WarnRemoved
2192 fsso-struct=
2193 C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE)
2194 -fsso-struct=[big-endian|little-endian|native]  Set the default scalar storage order.
2196 Enum
2197 Name(sso_struct) Type(enum scalar_storage_order_kind) UnknownError(unrecognized scalar storage order value %qs)
2199 EnumValue
2200 Enum(sso_struct) String(big-endian) Value(SSO_BIG_ENDIAN)
2202 EnumValue
2203 Enum(sso_struct) String(little-endian) Value(SSO_LITTLE_ENDIAN)
2205 EnumValue
2206 Enum(sso_struct) String(native) Value(SSO_NATIVE)
2208 fstats
2209 C++ ObjC++ Var(flag_detailed_statistics)
2210 Display statistics accumulated during compilation.
2212 fstrict-enums
2213 C++ ObjC++ Optimization Var(flag_strict_enums)
2214 Assume that values of enumeration type are always within the minimum range of that type.
2216 fstrict-prototype
2217 C++ ObjC++ WarnRemoved
2219 fstrong-eval-order
2220 C++ ObjC++ Common Alias(fstrong-eval-order=, all, none)
2221 Follow the C++17 evaluation order requirements for assignment expressions,
2222 shift, member function calls, etc.
2224 fstrong-eval-order=
2225 C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1)
2226 Follow the C++17 evaluation order requirements for assignment expressions,
2227 shift, member function calls, etc.
2229 Enum
2230 Name(strong_eval_order) Type(int)
2232 EnumValue
2233 Enum(strong_eval_order) String(none) Value(0)
2235 EnumValue
2236 Enum(strong_eval_order) String(some) Value(1)
2238 EnumValue
2239 Enum(strong_eval_order) String(all) Value(2)
2241 ftemplate-backtrace-limit=
2242 C++ ObjC++ Joined RejectNegative UInteger Var(template_backtrace_limit) Init(10)
2243 Set the maximum number of template instantiation notes for a single warning or error.
2245 ftemplate-depth-
2246 C++ ObjC++ Joined RejectNegative Undocumented Alias(ftemplate-depth=)
2248 ftemplate-depth=
2249 C++ ObjC++ Joined RejectNegative UInteger
2250 -ftemplate-depth=<number>       Specify maximum template instantiation depth.
2252 fthis-is-variable
2253 C++ ObjC++ WarnRemoved
2255 fthreadsafe-statics
2256 C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
2257 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
2259 funsigned-bitfields
2260 C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)
2261 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned.
2263 funsigned-char
2264 C ObjC C++ ObjC++ LTO Var(flag_signed_char, 0)
2265 Make \"char\" unsigned by default.
2267 fuse-cxa-atexit
2268 C++ ObjC++ Var(flag_use_cxa_atexit) Init(DEFAULT_USE_CXA_ATEXIT)
2269 Use __cxa_atexit to register destructors.
2271 fuse-cxa-get-exception-ptr
2272 C++ ObjC++ Var(flag_use_cxa_get_exception_ptr) Init(2)
2273 Use __cxa_get_exception_ptr in exception handling.
2275 fvisibility-inlines-hidden
2276 C++ ObjC++
2277 Marks all inlined functions and methods as having hidden visibility.
2279 fvisibility-ms-compat
2280 C++ ObjC++ Var(flag_visibility_ms_compat)
2281 Changes visibility to match Microsoft Visual Studio by default.
2283 fvtable-gc
2284 C++ ObjC++ WarnRemoved
2285 No longer supported.
2287 fvtable-thunks
2288 C++ ObjC++ WarnRemoved 
2289 No longer supported.
2291 fweak
2292 C++ ObjC++ Var(flag_weak) Init(1)
2293 Emit common-like symbols as weak symbols.
2295 fwide-exec-charset=
2296 C ObjC C++ ObjC++ Joined RejectNegative
2297 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>.
2299 fworking-directory
2300 C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1)
2301 Generate a #line directive pointing at the current working directory.
2303 fxref
2304 C++ ObjC++ WarnRemoved
2305 No longer supported.
2307 fzero-link
2308 ObjC ObjC++ Var(flag_zero_link)
2309 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode.
2311 gen-decls
2312 ObjC ObjC++ Driver Var(flag_gen_declaration) RejectNegative
2313 Dump declarations to a .decl file.
2315 femit-struct-debug-baseonly
2316 C ObjC C++ ObjC++
2317 -femit-struct-debug-baseonly    Aggressive reduced debug info for structs.
2319 femit-struct-debug-reduced
2320 C ObjC C++ ObjC++
2321 -femit-struct-debug-reduced     Conservative reduced debug info for structs.
2323 femit-struct-debug-detailed=
2324 C ObjC C++ ObjC++ Joined
2325 -femit-struct-debug-detailed=<spec-list>        Detailed reduced debug info for structs.
2327 fext-numeric-literals
2328 C++ ObjC++ Var(flag_ext_numeric_literals) Init(1)
2329 Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding
2330 number literal rather than a user-defined number literal.
2332 idirafter
2333 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2334 -idirafter <dir>        Add <dir> to the end of the system include path.
2336 imacros
2337 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2338 -imacros <file> Accept definition of macros in <file>.
2340 imultilib
2341 C ObjC C++ ObjC++ Joined Separate
2342 -imultilib <dir>        Set <dir> to be the multilib include subdirectory.
2344 include
2345 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2346 -include <file> Include the contents of <file> before other files.
2348 iprefix
2349 C ObjC C++ ObjC++ Joined Separate
2350 -iprefix <path> Specify <path> as a prefix for next two options.
2352 isysroot
2353 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2354 -isysroot <dir> Set <dir> to be the system root directory.
2356 isystem
2357 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2358 -isystem <dir>  Add <dir> to the start of the system include path.
2360 iquote
2361 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2362 -iquote <dir>   Add <dir> to the end of the quote include path.
2364 iwithprefix
2365 C ObjC C++ ObjC++ Joined Separate
2366 -iwithprefix <dir>      Add <dir> to the end of the system include path.
2368 iwithprefixbefore
2369 C ObjC C++ ObjC++ Joined Separate
2370 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path.
2372 lang-asm
2373 C Undocumented RejectDriver
2375 no-integrated-cpp
2376 Driver
2378 nostdinc
2379 C ObjC C++ ObjC++
2380 Do not search standard system include directories (those specified with -isystem will still be used).
2382 nostdinc++
2383 C++ ObjC++
2384 Do not search standard system include directories for C++.
2387 C ObjC C++ ObjC++ Joined Separate
2388 ; Documented in common.opt
2390 pedantic
2391 C ObjC C++ ObjC++ Alias(Wpedantic)
2392 ; Documented in common.opt
2394 print-objc-runtime-info
2395 ObjC ObjC++
2396 Generate C header of platform-specific features.
2398 remap
2399 C ObjC C++ ObjC++
2400 Remap file names when including files.
2402 std=c++98
2403 C++ ObjC++
2404 Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2406 std=c++03
2407 C++ ObjC++ Alias(std=c++98)
2408 Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2410 std=c++11
2411 C++ ObjC++
2412 Conform to the ISO 2011 C++ standard.
2414 std=c++0x
2415 C++ ObjC++ Alias(std=c++11) Undocumented
2416 Deprecated in favor of -std=c++11.
2418 std=c++1y
2419 C++ ObjC++ Alias(std=c++14) Undocumented
2420 Deprecated in favor of -std=c++14.
2422 std=c++14
2423 C++ ObjC++
2424 Conform to the ISO 2014 C++ standard.
2426 std=c++1z
2427 C++ ObjC++ Alias(std=c++17) Undocumented
2428 Deprecated in favor of -std=c++17.
2430 std=c++17
2431 C++ ObjC++
2432 Conform to the ISO 2017 C++ standard.
2434 std=c++2a
2435 C++ ObjC++ Alias(std=c++20) Undocumented
2436 Conform to the ISO 2020 C++ standard (experimental and incomplete support).
2438 std=c++20
2439 C++ ObjC++
2440 Conform to the ISO 2020 C++ standard (experimental and incomplete support).
2442 std=c++2b
2443 C++ ObjC++ Alias(std=c++23) Undocumented
2444 Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
2446 std=c++23
2447 C++ ObjC++
2448 Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
2450 std=c++2c
2451 C++ ObjC++ Alias(std=c++26)
2452 Conform to the ISO 2026 C++ draft standard (experimental and incomplete support).
2454 std=c++26
2455 C++ ObjC++ Undocumented
2456 Conform to the ISO 2026 C++ draft standard (experimental and incomplete support).
2458 std=c11
2459 C ObjC
2460 Conform to the ISO 2011 C standard.
2462 std=c1x
2463 C ObjC Alias(std=c11)
2464 Deprecated in favor of -std=c11.
2466 std=c17
2467 C ObjC
2468 Conform to the ISO 2017 C standard (published in 2018).
2470 std=c18
2471 C ObjC Alias(std=c17)
2472 Conform to the ISO 2017 C standard (published in 2018).
2474 std=c23
2475 C ObjC
2476 Conform to the ISO 2023 C standard draft (expected to be published in 2024) (experimental and incomplete support).
2478 std=c2x
2479 C ObjC Alias(std=c23)
2480 Deprecated in favor of -std=c23.
2482 std=c89
2483 C ObjC Alias(std=c90)
2484 Conform to the ISO 1990 C standard.
2486 std=c90
2487 C ObjC
2488 Conform to the ISO 1990 C standard.
2490 std=c99
2491 C ObjC
2492 Conform to the ISO 1999 C standard.
2494 std=c9x
2495 C ObjC Alias(std=c99)
2496 Deprecated in favor of -std=c99.
2498 std=gnu++98
2499 C++ ObjC++
2500 Conform to the ISO 1998 C++ standard revised by the 2003 technical
2501 corrigendum with GNU extensions.
2503 std=gnu++03
2504 C++ ObjC++ Alias(std=gnu++98)
2505 Conform to the ISO 1998 C++ standard revised by the 2003 technical
2506 corrigendum with GNU extensions.
2508 std=gnu++11
2509 C++ ObjC++
2510 Conform to the ISO 2011 C++ standard with GNU extensions.
2512 std=gnu++0x
2513 C++ ObjC++ Alias(std=gnu++11) Undocumented
2514 Deprecated in favor of -std=gnu++11.
2516 std=gnu++1y
2517 C++ ObjC++ Alias(std=gnu++14) Undocumented
2518 Deprecated in favor of -std=gnu++14.
2520 std=gnu++14
2521 C++ ObjC++
2522 Conform to the ISO 2014 C++ standard with GNU extensions.
2524 std=gnu++1z
2525 C++ ObjC++ Alias(std=gnu++17) Undocumented
2526 Deprecated in favor of -std=gnu++17.
2528 std=gnu++17
2529 C++ ObjC++
2530 Conform to the ISO 2017 C++ standard with GNU extensions.
2532 std=gnu++2a
2533 C++ ObjC++ Alias(std=gnu++20) Undocumented
2534 Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
2536 std=gnu++20
2537 C++ ObjC++
2538 Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
2540 std=gnu++2b
2541 C++ ObjC++ Alias(std=gnu++23) Undocumented
2542 Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
2544 std=gnu++23
2545 C++ ObjC++
2546 Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
2548 std=gnu++2c
2549 C++ ObjC++ Alias(std=gnu++26)
2550 Conform to the ISO 2026 C++ draft standard with GNU extensions (experimental and incomplete support).
2552 std=gnu++26
2553 C++ ObjC++ Undocumented
2554 Conform to the ISO 2026 C++ draft standard with GNU extensions (experimental and incomplete support).
2556 std=gnu11
2557 C ObjC
2558 Conform to the ISO 2011 C standard with GNU extensions.
2560 std=gnu1x
2561 C ObjC Alias(std=gnu11)
2562 Deprecated in favor of -std=gnu11.
2564 std=gnu17
2565 C ObjC
2566 Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
2568 std=gnu18
2569 C ObjC Alias(std=gnu17)
2570 Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
2572 std=gnu23
2573 C ObjC
2574 Conform to the ISO 2023 C standard draft (expected to be published in 2024) with GNU extensions (experimental and incomplete support).
2576 std=gnu2x
2577 C ObjC Alias(std=gnu23)
2578 Deprecated in favor of -std=gnu23.
2580 std=gnu89
2581 C ObjC Alias(std=gnu90)
2582 Conform to the ISO 1990 C standard with GNU extensions.
2584 std=gnu90
2585 C ObjC
2586 Conform to the ISO 1990 C standard with GNU extensions.
2588 std=gnu99
2589 C ObjC
2590 Conform to the ISO 1999 C standard with GNU extensions.
2592 std=gnu9x
2593 C ObjC Alias(std=gnu99)
2594 Deprecated in favor of -std=gnu99.
2596 std=iso9899:1990
2597 C ObjC Alias(std=c90)
2598 Conform to the ISO 1990 C standard.
2600 std=iso9899:199409
2601 C ObjC
2602 Conform to the ISO 1990 C standard as amended in 1994.
2604 std=iso9899:1999
2605 C ObjC Alias(std=c99)
2606 Conform to the ISO 1999 C standard.
2608 std=iso9899:199x
2609 C ObjC Alias(std=c99)
2610 Deprecated in favor of -std=iso9899:1999.
2612 std=iso9899:2011
2613 C ObjC Alias(std=c11)
2614 Conform to the ISO 2011 C standard.
2616 std=iso9899:2017
2617 C ObjC Alias(std=c17)
2618 Conform to the ISO 2017 C standard (published in 2018).
2620 std=iso9899:2018
2621 C ObjC Alias(std=c17)
2622 Conform to the ISO 2017 C standard (published in 2018).
2624 std=iso9899:2024
2625 C ObjC Alias(std=c23)
2626 Conform to the ISO 2023 C standard draft (expected to be published in 2024) (experimental and incomplete support).
2628 stdlib=
2629 Driver C++ ObjC++ Common Condition(ENABLE_STDLIB_OPTION) Var(flag_stdlib_kind) Joined Enum(stdlib_kind) RejectNegative Init(1)
2630 -stdlib=[libstdc++|libc++]      The standard library to be used for C++ headers
2631 and runtime.
2633 Enum
2634 Name(stdlib_kind) Type(int)
2636 EnumValue
2637 Enum(stdlib_kind) String(libstdc++) Value(1)
2639 EnumValue
2640 Enum(stdlib_kind) String(libc++) Value(2)
2642 traditional
2643 Driver
2645 traditional-cpp
2646 C ObjC C++ ObjC++
2647 Enable traditional preprocessing.
2649 trigraphs
2650 C ObjC C++ ObjC++
2651 -trigraphs      Support ISO C trigraphs.
2653 undef
2654 C ObjC C++ ObjC++ Var(flag_undef)
2655 Do not predefine system-specific and GCC-specific macros.
2658 C ObjC C++ ObjC++
2659 ; Documented in common.opt
2662 C ObjC C++ ObjC++
2663 ; Documented in common.opt
2665 ; This comment is to ensure we retain the blank line above.