c-family: Support format checking C2X %b, %B formats
[official-gcc.git] / gcc / c-family / c.opt
blob06457ac739e4ed7deeb49b2a208dc1c84cdae360
1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003-2021 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++ Joined Separate
141 -pedantic
142 C ObjC C++ ObjC++ Alias(pedantic)
144 -preprocess
145 C ObjC C++ ObjC++ Undocumented Alias(E)
147 -print-missing-file-dependencies
148 C ObjC C++ ObjC++ Alias(MG)
150 -trace-includes
151 C ObjC C++ ObjC++ Alias(H)
153 -traditional
154 Driver Alias(traditional)
156 -traditional-cpp
157 C ObjC C++ ObjC++ Alias(traditional-cpp)
159 -trigraphs
160 C ObjC C++ ObjC++ Alias(trigraphs)
162 -undefine-macro
163 C ObjC C++ ObjC++ Separate Alias(U) MissingArgError(macro name missing after %qs)
165 -undefine-macro=
166 C ObjC C++ ObjC++ Joined Alias(U) MissingArgError(macro name missing after %qs)
168 -user-dependencies
169 C ObjC C++ ObjC++ Alias(MM)
171 -verbose
172 Common C ObjC C++ ObjC++ Alias(v)
174 -write-dependencies
175 C ObjC C++ ObjC++ NoDriverArg Separate Alias(MD) MissingArgError(missing filename after %qs)
177 -write-user-dependencies
178 C ObjC C++ ObjC++ NoDriverArg Separate Alias(MMD) MissingArgError(missing filename after %qs)
181 C ObjC C++ ObjC++ Joined Separate MissingArgError(assertion missing after %qs)
182 -A<question>=<answer>   Assert the <answer> to <question>.  Putting '-' before <question> disables the <answer> to <question>.
185 C ObjC C++ ObjC++
186 Do not discard comments.
189 C ObjC C++ ObjC++
190 Do not discard comments in macro expansions.
193 C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
194 -D<macro>[=<val>]       Define a <macro> with <val> as its value.  If just <macro> is given, <val> is taken to be 1.
197 C ObjC C++ ObjC++ Undocumented Var(flag_preprocess_only)
200 Driver C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
201 -F <dir>        Add <dir> to the end of the main framework include path.
203 fgimple
204 C Var(flag_gimple) Init(0)
205 Enable parsing GIMPLE.
208 C ObjC C++ ObjC++
209 Print the name of header files as they are used.
212 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
213 -I <dir>        Add <dir> to the end of the main include path.
216 C ObjC C++ ObjC++
217 Generate make dependencies.
220 C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
221 Generate make dependencies and compile.
224 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
225 -MF <file>      Write dependency output to the given file.
228 C ObjC C++ ObjC++
229 Treat missing header files as generated files.
232 C ObjC C++ ObjC++
233 Like -M but ignore system header files.
236 C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs)
237 Like -MD but ignore system header files.
239 Mmodules
241 Generate C++ Module dependency information.
243 Mno-modules
245 ; undocumented
248 C ObjC C++ ObjC++
249 Generate phony targets for all headers.
252 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
253 -MQ <target>    Add a target that may require quoting.
256 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs)
257 -MT <target>    Add a target that does not require quoting.
260 C ObjC C++ ObjC++
261 Do not generate #line directives.
264 C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs)
265 -U<macro>       Undefine <macro>.
267 WNSObject-attribute
268 C ObjC C++ ObjC++ LTO Var(warn_nsobject_attribute) Warning Init(1)
269 Warn if the NSObject attribute is applied to a non-typedef.
271 Wabi
272 C ObjC C++ ObjC++ LTO Var(warn_abi) Warning
273 Warn about things that will change when compiling with an ABI-compliant compiler.
275 Wabi=
276 C ObjC C++ ObjC++ LTO Joined RejectNegative UInteger Warning
277 Warn about things that change between the current -fabi-version and the specified version.
279 Wabi-tag
280 C++ ObjC++ Var(warn_abi_tag) Warning
281 Warn if a subobject has an abi_tag attribute that the complete object type does not have.
283 Wpsabi
284 C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Warning Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi)
286 Wabsolute-value
287 C ObjC Var(warn_absolute_value) Warning EnabledBy(Wextra)
288 Warn on suspicious calls of standard functions computing absolute values.
290 Waddress
291 C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
292 Warn about suspicious uses of memory addresses.
294 Enum
295 Name(warn_aligned_new_level) Type(int) UnknownError(argument %qs to %<-Waligned-new%> not recognized)
297 EnumValue
298 Enum(warn_aligned_new_level) String(none) Value(0)
300 EnumValue
301 Enum(warn_aligned_new_level) String(global) Value(1)
303 EnumValue
304 Enum(warn_aligned_new_level) String(all) Value(2)
306 Waligned-new
307 C++ ObjC++ Alias(Waligned-new=,global,none)
308 Warn about 'new' of type with extended alignment without -faligned-new.
310 Waligned-new=
311 C++ ObjC++ Var(warn_aligned_new) Enum(warn_aligned_new_level) Joined RejectNegative Warning LangEnabledBy(C++ ObjC++,Wall,1,0)
312 -Waligned-new=[none|global|all] Warn even if 'new' uses a class member allocation function.
314 Wall
315 C ObjC C++ ObjC++ Warning
316 Enable most warning messages.
318 Walloca
319 C ObjC C++ ObjC++ Var(warn_alloca) Warning
320 Warn on any use of alloca.
322 Walloc-size-larger-than=
323 C ObjC C++ LTO ObjC++ Var(warn_alloc_size_limit) Joined Host_Wide_Int ByteSize Warning Init(HOST_WIDE_INT_MAX)
324 -Walloc-size-larger-than=<bytes>        Warn for calls to allocation functions that
325 attempt to allocate objects larger than the specified number of bytes.
327 Wno-alloc-size-larger-than
328 C ObjC C++ LTO ObjC++ Alias(Walloc-size-larger-than=,18446744073709551615EiB,none) Warning
329 Disable Walloc-size-larger-than= warning.  Equivalent to Walloc-size-larger-than=<SIZE_MAX> or larger.
331 Walloc-zero
332 C ObjC C++ ObjC++ Var(warn_alloc_zero) Warning
333 Warn for calls to allocation functions that specify zero bytes.
335 Walloca-larger-than=
336 C ObjC C++ LTO ObjC++ Var(warn_alloca_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
337 -Walloca-larger-than=<number>   Warn on unbounded uses of
338 alloca, and on bounded uses of alloca whose bound can be larger than
339 <number> bytes.
341 Wno-alloca-larger-than
342 C ObjC C++ LTO ObjC++ Alias(Walloca-larger-than=,18446744073709551615EiB,none) Warning
343 Disable Walloca-larger-than= warning.  Equivalent to Walloca-larger-than=<SIZE_MAX> or larger.
345 Warray-bounds
346 LangEnabledBy(C ObjC C++ LTO ObjC++)
347 ; in common.opt
349 Warray-bounds=
350 LangEnabledBy(C ObjC C++ LTO ObjC++,Wall,1,0)
351 ; in common.opt
353 Warray-compare
354 C ObjC C++ ObjC++ Var(warn_array_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
355 Warn about comparisons between two operands of array type.
357 Warray-parameter
358 C ObjC C++ ObjC++ Warning Alias(Warray-parameter=, 2, 0)
359 Warn about mismatched declarations of array parameters and unsafe accesses to them.
361 Warray-parameter=
362 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_array_parameter) IntegerRange(0, 2) LangEnabledBy(C ObjC C++ ObjC++,Wall, 2, 0) Warning
363 Warn about mismatched declarations of array parameters and unsafe accesses to them.
365 Wzero-length-bounds
366 C ObjC C++ ObjC++ Var(warn_zero_length_bounds) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
367 Warn about accesses to interior zero-length array members.
369 Wassign-intercept
370 ObjC ObjC++ Var(warn_assign_intercept) Warning
371 Warn whenever an Objective-C assignment is being intercepted by the garbage collector.
373 Wbad-function-cast
374 C ObjC Var(warn_bad_function_cast) Warning
375 Warn about casting functions to incompatible types.
377 Wbool-compare
378 C ObjC C++ ObjC++ Var(warn_bool_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
379 Warn about boolean expression compared with an integer value different from true/false.
381 Wbool-operation
382 C ObjC C++ ObjC++ Var(warn_bool_op) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
383 Warn about certain operations on boolean expressions.
385 Wframe-address
386 C ObjC C++ ObjC++ Var(warn_frame_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
387 Warn when __builtin_frame_address or __builtin_return_address is used unsafely.
389 Wbuiltin-declaration-mismatch
390 C ObjC C++ ObjC++ Var(warn_builtin_declaration_mismatch) Init(1) Warning
391 Warn when a built-in function is declared with the wrong signature.
393 Wbuiltin-macro-redefined
394 C ObjC C++ ObjC++ CPP(warn_builtin_macro_redefined) CppReason(CPP_W_BUILTIN_MACRO_REDEFINED) Var(cpp_warn_builtin_macro_redefined) Init(1) Warning
395 Warn when a built-in preprocessor macro is undefined or redefined.
397 Wc11-c2x-compat
398 C ObjC CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT) Var(warn_c11_c2x_compat) Init(-1) Warning
399 Warn about features not present in ISO C11, but present in ISO C2X.
401 Wc90-c99-compat
402 C ObjC CPP(cpp_warn_c90_c99_compat) CppReason(CPP_W_C90_C99_COMPAT) Var(warn_c90_c99_compat) Init(-1) Warning
403 Warn about features not present in ISO C90, but present in ISO C99.
405 Wc99-c11-compat
406 C ObjC Var(warn_c99_c11_compat) Init(-1) Warning
407 Warn about features not present in ISO C99, but present in ISO C11.
409 Wc++-compat
410 C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPERATOR_NAMES) Init(0) Warning
411 Warn about C constructs that are not in the common subset of C and C++.
413 Wc++0x-compat
414 C++ ObjC++ Warning Alias(Wc++11-compat) Undocumented
416 Wc++11-compat
417 C++ ObjC++ Var(warn_cxx11_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT)
418 Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011.
420 Wc++14-compat
421 C++ ObjC++ Var(warn_cxx14_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
422 Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014.
424 Wc++1z-compat
425 C++ ObjC++ Warning Alias(Wc++17-compat) Undocumented
427 Wc++17-compat
428 C++ ObjC++ Var(warn_cxx17_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
429 Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017.
431 Wc++2a-compat
432 C++ ObjC++ Warning Alias(Wc++20-compat) Undocumented
434 Wc++20-compat
435 C++ ObjC++ Var(warn_cxx20_compat) Warning LangEnabledBy(C++ ObjC++,Wall)
436 Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020.
438 Wc++11-extensions
439 C++ ObjC++ Var(warn_cxx11_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1)
440 Warn about C++11 constructs in code compiled with an older standard.
442 Wc++14-extensions
443 C++ ObjC++ Var(warn_cxx14_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1)
444 Warn about C++14 constructs in code compiled with an older standard.
446 Wc++17-extensions
447 C++ ObjC++ Var(warn_cxx17_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1)
448 Warn about C++17 constructs in code compiled with an older standard.
450 Wc++20-extensions
451 C++ ObjC++ Var(warn_cxx20_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1)
452 Warn about C++20 constructs in code compiled with an older standard.
454 Wc++23-extensions
455 C++ ObjC++ Var(warn_cxx23_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1)
456 Warn about C++23 constructs in code compiled with an older standard.
458 Wcast-function-type
459 C ObjC C++ ObjC++ Var(warn_cast_function_type) Warning EnabledBy(Wextra)
460 Warn about casts between incompatible function types.
462 Wcast-qual
463 C ObjC C++ ObjC++ Var(warn_cast_qual) Warning
464 Warn about casts which discard qualifiers.
466 Wcatch-value
467 C++ ObjC++ Warning Alias(Wcatch-value=, 1, 0)
468 Warn about catch handlers of non-reference type.
470 Wcatch-value=
471 C++ ObjC++ Var(warn_catch_value) Warning Joined RejectNegative UInteger LangEnabledBy(C++ ObjC++,Wall, 1, 0) IntegerRange(0, 3)
472 Warn about catch handlers of non-reference type.
474 Wchar-subscripts
475 C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
476 Warn about subscripts whose type is \"char\".
478 Wchkp
479 C ObjC C++ ObjC++ Warning WarnRemoved
480 Removed in GCC 9.  This switch has no effect.
482 Wclobbered
483 C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra)
484 Warn about variables that might be changed by \"longjmp\" or \"vfork\".
486 Wcomma-subscript
487 C++ ObjC++ Var(warn_comma_subscript) Warning
488 Warn about uses of a comma operator within a subscripting expression.
490 Wcomment
491 C ObjC C++ ObjC++ CPP(warn_comments) CppReason(CPP_W_COMMENTS) Var(cpp_warn_comment) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
492 Warn about possibly nested block comments, and C++ comments spanning more than one physical line.
494 Wcomments
495 C ObjC C++ ObjC++ Warning Alias(Wcomment)
496 Synonym for -Wcomment.
498 Wconditionally-supported
499 C++ ObjC++ Var(warn_conditionally_supported) Warning
500 Warn for conditionally-supported constructs.
502 Wconversion
503 C ObjC C++ ObjC++ Var(warn_conversion) Warning
504 Warn for implicit type conversions that may change a value.
506 Wconversion-null
507 C++ ObjC++ Var(warn_conversion_null) Init(1) Warning
508 Warn for converting NULL from/to a non-pointer type.
510 Wcpp
511 C ObjC C++ ObjC++ CppReason(CPP_W_WARNING_DIRECTIVE)
512 ; Documented in common.opt
514 Wctad-maybe-unsupported
515 C++ ObjC++ Var(warn_ctad_maybe_unsupported) Warning
516 Warn when performing class template argument deduction on a type with no
517 deduction guides.
519 Wctor-dtor-privacy
520 C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning
521 Warn when all constructors and destructors are private.
523 Wdangling-else
524 C ObjC C++ ObjC++ Var(warn_dangling_else) Warning LangEnabledBy(C ObjC C++ ObjC++,Wparentheses)
525 Warn about dangling else.
527 Wdate-time
528 C ObjC C++ ObjC++ CPP(warn_date_time) CppReason(CPP_W_DATE_TIME) Var(cpp_warn_date_time) Init(0) Warning
529 Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage.
531 Wdeclaration-after-statement
532 C ObjC Var(warn_declaration_after_statement) Init(-1) Warning
533 Warn when a declaration is found after a statement.
535 Wdelete-incomplete
536 C++ ObjC++ Var(warn_delete_incomplete) Init(1) Warning
537 Warn when deleting a pointer to incomplete type.
539 Wdelete-non-virtual-dtor
540 C++ ObjC++ Var(warn_delnonvdtor) Warning LangEnabledBy(C++ ObjC++,Wall || Weffc++)
541 Warn about deleting polymorphic objects with non-virtual destructors.
543 Wdeprecated
544 C C++ ObjC ObjC++ CPP(cpp_warn_deprecated) CppReason(CPP_W_DEPRECATED)
545 ; Documented in common.opt
547 Wdeprecated-copy
548 C++ ObjC++ Var(warn_deprecated_copy) Warning LangEnabledBy(C++ ObjC++, Wextra)
549 Mark implicitly-declared copy operations as deprecated if the class has a
550 user-provided copy operation.
552 Wdeprecated-copy-dtor
553 C++ ObjC++ Var(warn_deprecated_copy, 2) Warning
554 Mark implicitly-declared copy operations as deprecated if the class has a
555 user-provided copy operation or destructor.
557 Wdeprecated-enum-enum-conversion
558 C++ ObjC++ Var(warn_deprecated_enum_enum_conv) Warning
559 Warn about deprecated arithmetic conversions on operands of enumeration types.
561 Wdeprecated-enum-float-conversion
562 C++ ObjC++ Var(warn_deprecated_enum_float_conv) Warning
563 Warn about deprecated arithmetic conversions on operands where one is of enumeration
564 type and the other is of a floating-point type.
566 Wdesignated-init
567 C ObjC Var(warn_designated_init) Init(1) Warning
568 Warn about positional initialization of structs requiring designated initializers.
570 Wdiscarded-array-qualifiers
571 C ObjC Var(warn_discarded_array_qualifiers) Init(1) Warning
572 Warn if qualifiers on arrays which are pointer targets are discarded.
574 Wdiscarded-qualifiers
575 C ObjC Var(warn_discarded_qualifiers) Init(1) Warning
576 Warn if type qualifiers on pointers are discarded.
578 Wdiv-by-zero
579 C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
580 Warn about compile-time integer division by zero.
582 Wduplicated-branches
583 C ObjC C++ ObjC++ Var(warn_duplicated_branches) Init(0) Warning
584 Warn about duplicated branches in if-else statements.
586 Wduplicated-cond
587 C ObjC C++ ObjC++ Var(warn_duplicated_cond) Init(0) Warning
588 Warn about duplicated conditions in an if-else-if chain.
590 Weffc++
591 C++ ObjC++ Var(warn_ecpp) Warning
592 Warn about violations of Effective C++ style rules.
594 Wempty-body
595 C ObjC C++ ObjC++ Var(warn_empty_body) Warning EnabledBy(Wextra)
596 Warn about an empty body in an if or else statement.
598 Wendif-labels
599 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)
600 Warn about stray tokens after #else and #endif.
602 Wenum-compare
603 C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat)
604 Warn about comparison of different enum types.
606 Wenum-conversion
607 C ObjC C++ ObjC++ Var(warn_enum_conversion) Init(0) Warning LangEnabledBy(C ObjC,Wextra)
608 Warn about implicit conversion of enum types.
610 Werror
611 C ObjC C++ ObjC++
612 ; Documented in common.opt
614 Werror-implicit-function-declaration
615 C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration)
616 This switch is deprecated; use -Werror=implicit-function-declaration instead.
618 Wexceptions
619 C++ ObjC++ Var(warn_exceptions) Init(1) Warning
620 Warn when an exception handler is shadowed by another handler.
622 Wextra
623 C ObjC C++ ObjC++ Warning
624 ; in common.opt
626 Wextra-semi
627 C++ ObjC++ Var(warn_extra_semi) Warning
628 Warn about semicolon after in-class function definition.
630 Wfloat-conversion
631 C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion)
632 Warn for implicit type conversions that cause loss of floating point precision.
634 Wfloat-equal
635 C ObjC C++ ObjC++ Var(warn_float_equal) Warning
636 Warn if testing floating point numbers for equality.
638 Wformat
639 C ObjC C++ ObjC++ Warning Alias(Wformat=, 1, 0)
640 Warn about printf/scanf/strftime/strfmon format string anomalies.
642 Wformat-contains-nul
643 C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
644 Warn about format strings that contain NUL bytes.
646 Wformat-diag
647 C ObjC C++ ObjC++ Var(warn_format_diag) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
648 Warn about GCC format strings with strings unsuitable for diagnostics.
650 Wformat-extra-args
651 C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
652 Warn if passing too many arguments to a function for its format string.
654 Wformat-nonliteral
655 C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
656 Warn about format strings that are not literals.
658 Wformat-overflow
659 C ObjC C++ LTO ObjC++ Warning Alias(Wformat-overflow=, 1, 0) IntegerRange(0, 2)
660 Warn about function calls with format strings that write past the end
661 of the destination region.  Same as -Wformat-overflow=1.
663 Wformat-security
664 C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
665 Warn about possible security problems with format functions.
667 Wformat-signedness
668 C ObjC C++ ObjC++ Var(warn_format_signedness) Warning
669 Warn about sign differences with format functions.
671 Wformat-truncation
672 C ObjC C++ LTO ObjC++ Warning Alias(Wformat-truncation=, 1, 0)
673 Warn about calls to snprintf and similar functions that truncate output.
674 Same as -Wformat-truncation=1.
676 Wformat-y2k
677 C ObjC C++ ObjC++ Var(warn_format_y2k) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 2, 0)
678 Warn about strftime formats yielding 2-digit years.
680 Wformat-zero-length
681 C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 1, 0)
682 Warn about zero-length formats.
684 Wformat=
685 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
686 Warn about printf/scanf/strftime/strfmon format string anomalies.
688 Wformat-overflow=
689 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)
690 Warn about function calls with format strings that write past the end
691 of the destination region.
693 Wformat-truncation=
694 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)
695 Warn about calls to snprintf and similar functions that truncate output.
697 Wif-not-aligned
698 C ObjC C++ ObjC++ Var(warn_if_not_aligned) Init(1) Warning
699 Warn when the field in a struct is not aligned.
701 Wignored-qualifiers
702 C C++ Var(warn_ignored_qualifiers) Warning EnabledBy(Wextra)
703 Warn whenever type qualifiers are ignored.
705 Wignored-attributes
706 C C++ Var(warn_ignored_attributes) Init(1) Warning
707 Warn whenever attributes are ignored.
709 Winaccessible-base
710 C++ ObjC++ Var(warn_inaccessible_base) Init(1) Warning
711 Warn when a base is inaccessible in derived due to ambiguity.
713 Wincompatible-pointer-types
714 C ObjC Var(warn_incompatible_pointer_types) Init(1) Warning
715 Warn when there is a conversion between pointers that have incompatible types.
717 Waddress-of-packed-member
718 C ObjC C++ ObjC++ Var(warn_address_of_packed_member) Init(1) Warning
719 Warn when the address of packed member of struct or union is taken.
721 Winit-self
722 C ObjC C++ ObjC++ Var(warn_init_self) Warning LangEnabledBy(C++ ObjC++,Wall)
723 Warn about variables which are initialized to themselves.
725 Winit-list-lifetime
726 C++ ObjC++ Var(warn_init_list) Warning Init(1)
727 Warn about uses of std::initializer_list that can result in dangling pointers.
729 Winterference-size
730 C++ ObjC++ Var(warn_interference_size) Warning Init(1)
731 Warn about nonsensical values of --param destructive-interference-size or
732 constructive-interference-size.
734 Wimplicit
735 C ObjC Var(warn_implicit) Warning LangEnabledBy(C ObjC,Wall)
736 Warn about implicit declarations.
738 Wimplicit-fallthrough=
739 LangEnabledBy(C ObjC C++ ObjC++,Wextra,3,0)
740 ; in common.opt
742 Wdouble-promotion
743 C ObjC C++ ObjC++ Var(warn_double_promotion) Warning
744 Warn about implicit conversions from \"float\" to \"double\".
746 Wexpansion-to-defined
747 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)
748 Warn if \"defined\" is used outside #if.
750 Wimplicit-function-declaration
751 C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
752 Warn about implicit function declarations.
754 Wimplicit-int
755 C ObjC Var(warn_implicit_int) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit)
756 Warn when a declaration does not specify a type.
758 Wimport
759 C ObjC C++ ObjC++ Undocumented Ignore
761 Winherited-variadic-ctor
762 C++ ObjC++ Var(warn_inh_var_ctor) Init(1) Warning
763 Warn about C++11 inheriting constructors when the base has a variadic constructor.
765 Wint-conversion
766 C ObjC Var(warn_int_conversion) Init(1) Warning
767 Warn about incompatible integer to pointer and pointer to integer conversions.
769 Wint-in-bool-context
770 C ObjC C++ ObjC++ Var(warn_int_in_bool_context) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
771 Warn for suspicious integer expressions in boolean context.
773 Wint-to-pointer-cast
774 C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning
775 Warn when there is a cast to a pointer from an integer of a different size.
777 Winvalid-offsetof
778 C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning
779 Warn about invalid uses of the \"offsetof\" macro.
781 Winvalid-pch
782 C ObjC C++ ObjC++ CPP(warn_invalid_pch) CppReason(CPP_W_INVALID_PCH) Var(cpp_warn_invalid_pch) Init(0) Warning
783 Warn about PCH files that are found but not used.
785 Wjump-misses-init
786 C ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C ObjC,Wc++-compat)
787 Warn when a jump misses a variable initialization.
789 Wliteral-suffix
790 C++ ObjC++ CPP(warn_literal_suffix) CppReason(CPP_W_LITERAL_SUFFIX) Var(cpp_warn_literal_suffix) Init(1) Warning
791 Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.
793 Wlogical-op
794 C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning
795 Warn when a logical operator is suspiciously always evaluating to true or false.
797 Wlogical-not-parentheses
798 C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
799 Warn when logical not is used on the left hand side operand of a comparison.
801 Wlong-long
802 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)
803 Do not warn about using \"long long\" when -pedantic.
805 Wmain
806 C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning LangEnabledBy(C ObjC,Wall, 2, 0)
807 Warn about suspicious declarations of \"main\".
809 Wmain
810 LangEnabledBy(C ObjC C++ ObjC++,Wpedantic, 2, 0)
813 Wmemset-transposed-args
814 C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
815 Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not.
817 Wmemset-elt-size
818 C ObjC C++ ObjC++ Var(warn_memset_elt_size) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
819 Warn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size.
821 Wmisleading-indentation
822 C C++ Common Var(warn_misleading_indentation) Warning LangEnabledBy(C C++,Wall)
823 Warn when the indentation of the code does not reflect the block structure.
825 Wmismatched-dealloc
826 C ObjC C++ ObjC++ Var(warn_mismatched_alloc) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
827 Warn for deallocation calls with arguments returned from mismatched allocation
828 functions.
830 Wmismatched-new-delete
831 C++ ObjC++ Var(warn_mismatched_new_delete) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
832 Warn for mismatches between calls to operator new or delete and the corresponding
833 call to the allocation or deallocation function.
835 Wmismatched-tags
836 C++ ObjC++ Var(warn_mismatched_tags) Warning
837 Warn when a class is redeclared or referenced using a mismatched class-key.
839 Wmissing-braces
840 C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
841 Warn about possibly missing braces around initializers.
843 Wmissing-declarations
844 C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning
845 Warn about global functions without previous declarations.
847 Wmissing-field-initializers
848 C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra)
849 Warn about missing fields in struct initializers.
851 Wmissing-requires
852 C++ ObjC++ Var(warn_missing_requires) Init(1) Warning
853 Warn about likely missing requires keyword.
855 Wmultistatement-macros
856 C ObjC C++ ObjC++ Var(warn_multistatement_macros) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
857 Warn about unsafe macros expanding to multiple statements used as a body of a clause such as if, else, while, switch, or for.
859 Wmultiple-inheritance
860 C++ ObjC++ Var(warn_multiple_inheritance) Warning
861 Warn on direct multiple inheritance.
863 Wnamespaces
864 C++ ObjC++ Var(warn_namespaces) Warning
865 Warn on namespace definition.
867 Wpacked-not-aligned
868 C ObjC C++ ObjC++ Var(warn_packed_not_aligned) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
869 Warn when fields in a struct with the packed attribute are misaligned.
871 Wrange-loop-construct
872 C++ ObjC++ Var(warn_range_loop_construct) Warning LangEnabledBy(C++ ObjC++,Wall)
873 Warn when a range-based for-loop is creating unnecessary copies.
875 Wredundant-tags
876 C++ ObjC++ Var(warn_redundant_tags) Warning
877 Warn when a class or enumerated type is referenced using a redundant class-key.
879 Wsized-deallocation
880 C++ ObjC++ Var(warn_sized_deallocation) Warning EnabledBy(Wextra)
881 Warn about missing sized deallocation functions.
883 Wsizeof-pointer-div
884 C ObjC C++ ObjC++ Var(warn_sizeof_pointer_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
885 Warn about suspicious divisions of two sizeof expressions that don't work correctly with pointers.
887 Wsizeof-array-div
888 C ObjC C++ ObjC++ Var(warn_sizeof_array_div) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
889 Warn about divisions of two sizeof operators when the first one is applied
890 to an array and the divisor does not equal the size of the array element.
892 Wsizeof-pointer-memaccess
893 C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
894 Warn about suspicious length parameters to certain string functions if the argument uses sizeof.
896 Wsizeof-array-argument
897 C ObjC C++ ObjC++ Var(warn_sizeof_array_argument) Warning Init(1)
898 Warn when sizeof is applied on a parameter declared as an array.
900 Wstring-compare
901 C ObjC C++ LTO ObjC++ Warning Var(warn_string_compare) Warning LangEnabledBy(C ObjC C++ ObjC++, Wextra)
902 Warn about calls to strcmp and strncmp used in equality expressions that
903 are necessarily true or false due to the length of one and size of the other
904 argument.
906 Wstringop-overflow
907 C ObjC C++ LTO ObjC++ Warning Alias(Wstringop-overflow=, 2, 0)
908 Warn about buffer overflow in string manipulation functions like memcpy
909 and strcpy.
911 Wstringop-overflow=
912 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)
913 Under the control of Object Size type, warn about buffer overflow in string
914 manipulation functions like memcpy and strcpy.
916 Wstringop-overread
917 C ObjC C++ LTO ObjC++ Var(warn_stringop_overread) Init(1) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
918 Warn about reading past the end of a source array in string manipulation functions like memchr and memcpy.
920 Wstringop-truncation
921 C ObjC C++ LTO ObjC++ Var(warn_stringop_truncation) Warning Init (1) LangEnabledBy(C ObjC C++ LTO ObjC++, Wall)
922 Warn about truncation in string manipulation functions like strncat and strncpy.
924 Wsuggest-attribute=format
925 C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning
926 Warn about functions which might be candidates for format attributes.
928 Wsuggest-override
929 C++ ObjC++ Var(warn_override) Warning
930 Suggest that the override keyword be used when the declaration of a virtual
931 function overrides another.
933 Wswitch
934 C ObjC C++ ObjC++ Var(warn_switch) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
935 Warn about enumerated switches, with no default, missing a case.
937 Wswitch-default
938 C ObjC C++ ObjC++ Var(warn_switch_default) Warning
939 Warn about enumerated switches missing a \"default:\" statement.
941 Wswitch-enum
942 C ObjC C++ ObjC++ Var(warn_switch_enum) Warning
943 Warn about all enumerated switches missing a specific case.
945 Wswitch-bool
946 C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1)
947 Warn about switches with boolean controlling expression.
949 Wswitch-outside-range
950 C ObjC C++ ObjC++ Var(warn_switch_outside_range) Warning Init(1)
951 Warn about switch values that are outside of the switch's type range.
953 Wtemplates
954 C++ ObjC++ Var(warn_templates) Warning
955 Warn on primary template declaration.
957 Wmissing-attributes
958 C ObjC C++ ObjC++ Var(warn_missing_attributes) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
959 Warn about declarations of entities that may be missing attributes
960 that related entities have been declared with.
962 Wmissing-format-attribute
963 C ObjC C++ ObjC++ Warning Alias(Wsuggest-attribute=format)
966 Wmissing-include-dirs
967 C ObjC C++ ObjC++ CPP(warn_missing_include_dirs) CppReason(CPP_W_MISSING_INCLUDE_DIRS) Var(cpp_warn_missing_include_dirs) Init(0) Warning
968 Warn about user-specified include directories that do not exist.
970 Wmissing-parameter-type
971 C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra)
972 Warn about function parameters declared without a type specifier in K&R-style functions.
974 Wmissing-prototypes
975 C ObjC Var(warn_missing_prototypes) Warning
976 Warn about global functions without prototypes.
978 Wmudflap
979 C ObjC C++ ObjC++ WarnRemoved
981 Wmultichar
982 C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning
983 Warn about use of multi-character character constants.
985 Wnarrowing
986 C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++11-compat)
987 Warn about narrowing conversions within { } that are ill-formed in C++11.
989 Wnested-externs
990 C ObjC Var(warn_nested_externs) Warning
991 Warn about \"extern\" declarations not at file scope.
993 Wnoexcept
994 C++ ObjC++ Var(warn_noexcept) Warning
995 Warn when a noexcept expression evaluates to false even though the expression can't actually throw.
997 Wnoexcept-type
998 C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++17-compat)
999 Warn if C++17 noexcept function type will change the mangled name of a symbol.
1001 Wnon-template-friend
1002 C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
1003 Warn when non-templatized friend functions are declared within a template.
1005 Wclass-conversion
1006 C++ ObjC++ Var(warn_class_conversion) Init(1) Warning
1007 Warn when a conversion function will never be called due to the type it converts to.
1009 Wclass-memaccess
1010 C++ ObjC++ Var(warn_class_memaccess) Warning LangEnabledBy(C++ ObjC++, Wall)
1011 Warn for unsafe raw memory writes to objects of class types.
1013 Wnon-virtual-dtor
1014 C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
1015 Warn about non-virtual destructors.
1017 Wnonnull
1018 C ObjC C++ LTO ObjC++ Var(warn_nonnull) Warning LangEnabledBy(C ObjC C++ LTO ObjC++,Wformat=,warn_format >= 1,0)
1019 Warn about NULL being passed to argument slots marked as requiring non-NULL.
1021 Wnonnull
1022 C ObjC C++ LTO ObjC++ LangEnabledBy(C ObjC C++ LTO ObjC++,Wall)
1025 Wnonnull-compare
1026 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1029 Wnormalized
1030 C ObjC C++ ObjC++ Warning Alias(Wnormalized=,nfc,none)
1033 Wnormalized=
1034 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)
1035 -Wnormalized=[none|id|nfc|nfkc] Warn about non-normalized Unicode strings.
1037 ; Required for these enum values.
1038 SourceInclude
1039 cpplib.h
1041 Enum
1042 Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
1044 EnumValue
1045 Enum(cpp_normalize_level) String(none) Value(normalized_none)
1047 EnumValue
1048 Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC)
1050 EnumValue
1051 Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C)
1053 EnumValue
1054 Enum(cpp_normalize_level) String(nfc) Value(normalized_C)
1056 Wobjc-root-class
1057 ObjC ObjC++ Var(warn_objc_root_class) Warning Init(1)
1058 Warn if a class interface has no superclass.  Root classes may use an attribute
1059 to suppress this warning.
1061 Wold-style-cast
1062 C++ ObjC++ Var(warn_old_style_cast) Warning
1063 Warn if a C-style cast is used in a program.
1065 Wold-style-declaration
1066 C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra)
1067 Warn for obsolescent usage in a declaration.
1069 Wold-style-definition
1070 C ObjC Var(warn_old_style_definition) Init(-1) Warning
1071 Warn if an old-style parameter definition is used.
1073 Wopenacc-parallelism
1074 C C++ Var(warn_openacc_parallelism) Warning
1075 Warn about potentially suboptimal choices related to OpenACC parallelism.
1077 Wopenmp-simd
1078 C C++ Var(warn_openmp_simd) Warning LangEnabledBy(C C++,Wall)
1079 Warn if a simd directive is overridden by the vectorizer cost model.
1081 Woverlength-strings
1082 C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
1083 Warn if a string is longer than the maximum portable length specified by the standard.
1085 Woverloaded-virtual
1086 C++ ObjC++ Var(warn_overloaded_virtual) Warning
1087 Warn about overloaded virtual function names.
1089 Woverride-init
1090 C ObjC Var(warn_override_init) Warning EnabledBy(Wextra)
1091 Warn about overriding initializers without side effects.
1093 Woverride-init-side-effects
1094 C ObjC Var(warn_override_init_side_effects) Init(1) Warning
1095 Warn about overriding initializers with side effects.
1097 Wpacked-bitfield-compat
1098 C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
1099 Warn about packed bit-fields whose offset changed in GCC 4.4.
1101 Wparentheses
1102 C ObjC C++ ObjC++ Var(warn_parentheses) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1103 Warn about possibly missing parentheses.
1105 Wpedantic
1106 C ObjC C++ ObjC++ CPP(cpp_pedantic) CppReason(CPP_W_PEDANTIC) Warning
1107 ; Documented in common.opt
1109 Wpessimizing-move
1110 C++ ObjC++ Var(warn_pessimizing_move) Warning LangEnabledBy(C++ ObjC++, Wall)
1111 Warn about calling std::move on a local object in a return statement preventing copy elision.
1113 Wpmf-conversions
1114 C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning
1115 Warn when converting the type of pointers to member functions.
1117 Wpointer-arith
1118 C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic)
1119 Warn about function pointer arithmetic.
1121 Wpointer-sign
1122 C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic)
1123 Warn when a pointer differs in signedness in an assignment.
1125 Wpointer-compare
1126 C ObjC C++ ObjC++ Var(warn_pointer_compare) Init(1) Warning
1127 Warn when a pointer is compared with a zero character constant.
1129 Wpointer-to-int-cast
1130 C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
1131 Warn when a pointer is cast to an integer of a different size.
1133 Wpragmas
1134 C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
1135 Warn about misuses of pragmas.
1137 Wprio-ctor-dtor
1138 C ObjC C++ ObjC++ Var(warn_prio_ctor_dtor) Init(1) Warning
1139 Warn if constructor or destructors with priorities from 0 to 100 are used.
1141 Wproperty-assign-default
1142 ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning
1143 Warn if a property for an Objective-C object has no assign semantics specified.
1145 Wprotocol
1146 ObjC ObjC++ Var(warn_protocol) Init(1) Warning
1147 Warn if inherited methods are unimplemented.
1149 Wplacement-new
1150 C++ Warning Alias(Wplacement-new=, 1, 0)
1151 Warn for placement new expressions with undefined behavior.
1153 Wplacement-new=
1154 C++ Joined RejectNegative UInteger Var(warn_placement_new) Init(-1) Warning IntegerRange(0, 2)
1155 Warn for placement new expressions with undefined behavior.
1157 Wredundant-decls
1158 C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
1159 Warn about multiple declarations of the same object.
1161 Wredundant-move
1162 C++ ObjC++ Var(warn_redundant_move) Warning LangEnabledBy(C++ ObjC++,Wextra)
1163 Warn about redundant calls to std::move.
1165 Wregister
1166 C++ ObjC++ Var(warn_register) Warning
1167 Warn about uses of register storage specifier.
1169 Wreorder
1170 C++ ObjC++ Var(warn_reorder) Warning LangEnabledBy(C++ ObjC++,Wall)
1171 Warn when the compiler reorders code.
1173 Wreturn-type
1174 C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) Init(-1)
1175 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++).
1177 Wscalar-storage-order
1178 C ObjC C++ ObjC++ Var(warn_scalar_storage_order) Init(1) Warning
1179 Warn on suspicious constructs involving reverse scalar storage order.
1181 Wselector
1182 ObjC ObjC++ Var(warn_selector) Warning
1183 Warn if a selector has multiple methods.
1185 Wsequence-point
1186 C ObjC C++ ObjC++ Var(warn_sequence_point) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1187 Warn about possible violations of sequence point rules.
1189 Wshadow-ivar
1190 ObjC ObjC++ Var(warn_shadow_ivar) EnabledBy(Wshadow) Init(1) Warning
1191 Warn if a local declaration hides an instance variable.
1193 Wshift-overflow
1194 C ObjC C++ ObjC++ Warning Alias(Wshift-overflow=, 1, 0)
1195 Warn if left shift of a signed value overflows.
1197 Wshift-overflow=
1198 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_shift_overflow) Init(-1) Warning IntegerRange(0, 2)
1199 Warn if left shift of a signed value overflows.
1201 Wshift-count-negative
1202 C ObjC C++ ObjC++ Var(warn_shift_count_negative) Init(1) Warning
1203 Warn if shift count is negative.
1205 Wshift-count-overflow
1206 C ObjC C++ ObjC++ Var(warn_shift_count_overflow) Init(1) Warning
1207 Warn if shift count >= width of type.
1209 Wshift-negative-value
1210 C ObjC C++ ObjC++ Var(warn_shift_negative_value) Init(-1) Warning
1211 Warn if left shifting a negative value.
1213 Warith-conversion
1214 C ObjC C++ ObjC++ Var(warn_arith_conv) Warning
1215 Warn if conversion of the result of arithmetic might change the value even though converting the operands cannot.
1217 Wsign-compare
1218 C ObjC C++ ObjC++ Var(warn_sign_compare) Warning LangEnabledBy(C++ ObjC++,Wall)
1219 Warn about signed-unsigned comparisons.
1221 Wsign-compare
1222 C ObjC C++ ObjC++ EnabledBy(Wextra)
1225 Wsign-conversion
1226 C ObjC C++ ObjC++ Var(warn_sign_conversion) Warning LangEnabledBy(C ObjC,Wconversion)
1227 Warn for implicit type conversions between signed and unsigned integers.
1229 Wsign-promo
1230 C++ ObjC++ Var(warn_sign_promo) Warning
1231 Warn when overload promotes from unsigned to signed.
1233 Wstrict-null-sentinel
1234 C++ ObjC++ Warning Var(warn_strict_null_sentinel)
1235 Warn about uncasted NULL used as sentinel.
1237 Wstrict-prototypes
1238 C ObjC Var(warn_strict_prototypes) Warning
1239 Warn about unprototyped function declarations.
1241 Wstrict-aliasing=
1242 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0) IntegerRange(0, 3)
1245 Wstrict-overflow=
1246 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 5)
1249 Wstrict-selector-match
1250 ObjC ObjC++ Var(warn_strict_selector_match) Warning
1251 Warn if type signatures of candidate methods do not match exactly.
1253 Wsync-nand
1254 C C++ Var(warn_sync_nand) Init(1) Warning
1255 Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used.
1257 Wsynth
1258 C++ ObjC++ Var(warn_synth) Warning
1259 Deprecated.  This switch has no effect.
1261 Wsystem-headers
1262 C ObjC C++ ObjC++ Warning
1263 ; Documented in common.opt
1265 Wtautological-compare
1266 C ObjC C++ ObjC++ Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1267 Warn if a comparison always evaluates to true or false.
1269 Wterminate
1270 C++ ObjC++ Warning Var(warn_terminate) Init(1)
1271 Warn if a throw expression will always result in a call to terminate().
1273 Wtraditional
1274 C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning
1275 Warn about features not present in traditional C.
1277 Wtraditional-conversion
1278 C ObjC Var(warn_traditional_conversion) Warning
1279 Warn of prototypes causing type conversions different from what would happen in the absence of prototype.
1281 Wtrigraphs
1282 C ObjC C++ ObjC++ CPP(warn_trigraphs) CppReason(CPP_W_TRIGRAPHS) Var(cpp_warn_trigraphs) Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1283 Warn if trigraphs are encountered that might affect the meaning of the program.
1285 Wundeclared-selector
1286 ObjC ObjC++ Var(warn_undeclared_selector) Warning
1287 Warn about @selector()s without previously declared methods.
1289 Wundef
1290 C ObjC C++ ObjC++ CPP(warn_undef) CppReason(CPP_W_UNDEF) Var(cpp_warn_undef) Init(0) Warning
1291 Warn if an undefined macro is used in an #if directive.
1293 Wuninitialized
1294 C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
1297 Wmaybe-uninitialized
1298 C ObjC C++ ObjC++ LTO LangEnabledBy(C ObjC C++ ObjC++ LTO,Wall)
1301 Wunknown-pragmas
1302 C ObjC C++ ObjC++ Warning Var(warn_unknown_pragmas) LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0)
1303 Warn about unrecognized pragmas.
1305 Wunsuffixed-float-constants
1306 C ObjC Var(warn_unsuffixed_float_constants) Warning
1307 Warn about unsuffixed float constants.
1309 Wunused
1310 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall)
1311 ; documented in common.opt
1313 Wunused-local-typedefs
1314 C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
1315 Warn when typedefs locally defined in a function are not used.
1317 Wunused-macros
1318 C ObjC C++ ObjC++ CppReason(CPP_W_UNUSED_MACROS) Var(cpp_warn_unused_macros) Warning
1319 Warn about macros defined in the main file that are not used.
1321 Wunused-result
1322 C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning
1323 Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.
1325 Wunused-variable
1326 C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wunused)
1327 ; documented in common.opt
1329 Wunused-const-variable
1330 C ObjC C++ ObjC++ Warning Alias(Wunused-const-variable=, 2, 0)
1331 Warn when a const variable is unused.
1333 Wunused-const-variable=
1334 C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(C ObjC,Wunused-variable, 1, 0) IntegerRange(0, 2)
1335 Warn when a const variable is unused.
1337 Wvariadic-macros
1338 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)
1339 Warn about using variadic macros.
1341 Wvarargs
1342 C ObjC C++ ObjC++ Warning Var(warn_varargs) Init(1)
1343 Warn about questionable usage of the macros used to retrieve variable arguments.
1345 Wvexing-parse
1346 C++ ObjC++ Warning Var(warn_vexing_parse) Init(1)
1347 Warn about the most vexing parse syntactic ambiguity.
1349 Wvla
1350 C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning
1351 Warn if a variable length array is used.
1353 Wvla-larger-than=
1354 C ObjC C++ LTO ObjC++ Var(warn_vla_limit) Warning Joined Host_Wide_Int ByteSize Init(HOST_WIDE_INT_MAX)
1355 -Wvla-larger-than=<number>      Warn on unbounded uses of variable-length
1356 arrays, and on bounded uses of variable-length arrays whose bound can be
1357 larger than <number> bytes.
1359 Wno-vla-larger-than
1360 C ObjC C++ LTO ObjC++ Alias(Wvla-larger-than=,18446744073709551615EiB,none) Warning
1361 Disable Wvla-larger-than= warning.  Equivalent to Wvla-larger-than=<SIZE_MAX> or larger.
1363 Wvla-parameter
1364 C ObjC C++ ObjC++ Var(warn_vla_parameter) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1365 Warn about mismatched declarations of VLA parameters.
1367 Wvolatile
1368 C++ ObjC++ Var(warn_volatile) Warning
1369 Warn about deprecated uses of volatile qualifier.
1371 Wvolatile-register-var
1372 C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
1373 Warn when a register variable is declared volatile.
1375 Wvirtual-inheritance
1376 C++ ObjC++ Var(warn_virtual_inheritance) Warning
1377 Warn on direct virtual inheritance.
1379 Wvirtual-move-assign
1380 C++ ObjC++ Var(warn_virtual_move_assign) Warning Init(1)
1381 Warn if a virtual base has a non-trivial move assignment operator.
1383 Wwrite-strings
1384 C ObjC C++ ObjC++ Var(warn_write_strings) Warning
1385 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.
1387 Wzero-as-null-pointer-constant
1388 C++ ObjC++ Var(warn_zero_as_null_pointer_constant) Warning
1389 Warn when a literal '0' is used as null pointer.
1391 Wuseless-cast
1392 C++ ObjC++ Var(warn_useless_cast) Warning
1393 Warn about useless casts.
1395 Wsubobject-linkage
1396 C++ ObjC++ Var(warn_subobject_linkage) Warning Init(1)
1397 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.
1399 Wduplicate-decl-specifier
1400 C ObjC Var(warn_duplicate_decl_specifier) Warning LangEnabledBy(C ObjC,Wall)
1401 Warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier.
1403 Wrestrict
1404 C ObjC C++ ObjC++ Var(warn_restrict) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall)
1405 Warn when an argument passed to a restrict-qualified parameter aliases with
1406 another argument.
1408 ansi
1409 C ObjC C++ ObjC++
1410 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
1413 C ObjC C++ ObjC++ Joined
1414 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
1416 fabi-compat-version=
1417 C++ ObjC++ Joined RejectNegative UInteger Var(flag_abi_compat_version) Init(-1)
1418 The version of the C++ ABI used for -Wabi warnings and link compatibility aliases.
1420 faccess-control
1421 C++ ObjC++ Var(flag_access_control) Init(1)
1422 Enforce class member access control semantics.
1424 fada-spec-parent=
1425 C ObjC C++ ObjC++ RejectNegative Joined Var(ada_specs_parent)
1426 -fada-spec-parent=unit  Dump Ada specs as child units of given parent.
1428 faligned-new
1429 C++ ObjC++ Alias(faligned-new=,1,0)
1430 Support C++17 allocation of over-aligned types.
1432 faligned-new=
1433 C++ ObjC++ Joined RejectNegative Var(aligned_new_threshold) UInteger Init(-1)
1434 -faligned-new=<N>       Use C++17 over-aligned type allocation for alignments greater than N.
1436 fall-virtual
1437 C++ ObjC++ WarnRemoved
1439 fallow-parameterless-variadic-functions
1440 C ObjC Var(flag_allow_parameterless_variadic_functions)
1441 Allow variadic functions without named parameter.
1443 falt-external-templates
1444 C++ ObjC++ WarnRemoved
1445 No longer supported.
1447 fasm
1448 C ObjC C++ ObjC++ Var(flag_no_asm, 0)
1449 Recognize the \"asm\" keyword.
1451 ; Define extra predefined macros for use in libgcc.
1452 fbuilding-libgcc
1453 C ObjC C++ ObjC++ Undocumented Var(flag_building_libgcc)
1455 fbuiltin
1456 C ObjC C++ ObjC++ Var(flag_no_builtin, 0)
1457 Recognize built-in functions.
1459 fbuiltin-
1460 C ObjC C++ ObjC++ Joined
1462 fcanonical-system-headers
1463 C ObjC C++ ObjC++
1464 Where shorter, use canonicalized paths to systems headers.
1466 fchar8_t
1467 C++ ObjC++ Var(flag_char8_t) Init(-1)
1468 Enable the char8_t fundamental type and use it as the type for UTF-8 string
1469 and character literals.
1471 fcheck-pointer-bounds
1472 C ObjC C++ ObjC++ LTO WarnRemoved
1473 Removed in GCC 9.  This switch has no effect.
1475 fchkp-check-incomplete-type
1476 C ObjC C++ ObjC++ LTO WarnRemoved
1477 Removed in GCC 9.  This switch has no effect.
1479 fchkp-zero-input-bounds-for-main
1480 C ObjC C++ ObjC++ LTO WarnRemoved
1481 Removed in GCC 9.  This switch has no effect.
1483 fchkp-first-field-has-own-bounds
1484 C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
1485 Removed in GCC 9.  This switch has no effect.
1487 fchkp-narrow-bounds
1488 C ObjC C++ ObjC++ LTO WarnRemoved
1489 Removed in GCC 9.  This switch has no effect.
1491 fchkp-narrow-to-innermost-array
1492 C ObjC C++ ObjC++ LTO WarnRemoved RejectNegative
1493 Removed in GCC 9.  This switch has no effect.
1495 fchkp-flexible-struct-trailing-arrays
1496 C ObjC C++ ObjC++ LTO WarnRemoved
1497 Removed in GCC 9.  This switch has no effect.
1499 fchkp-optimize
1500 C ObjC C++ ObjC++ LTO WarnRemoved
1502 fchkp-use-fast-string-functions
1503 C ObjC C++ ObjC++ LTO WarnRemoved
1504 Removed in GCC 9.  This switch has no effect.
1506 fchkp-use-nochk-string-functions
1507 C ObjC C++ ObjC++ LTO WarnRemoved
1508 Removed in GCC 9.  This switch has no effect.
1510 fchkp-use-static-bounds
1511 C ObjC C++ ObjC++ LTO WarnRemoved
1512 Removed in GCC 9.  This switch has no effect.
1514 fchkp-use-static-const-bounds
1515 C ObjC C++ ObjC++ LTO WarnRemoved
1516 Removed in GCC 9.  This switch has no effect.
1518 fchkp-treat-zero-dynamic-size-as-infinite
1519 C ObjC C++ ObjC++ LTO WarnRemoved
1520 Removed in GCC 9.  This switch has no effect.
1522 fchkp-check-read
1523 C ObjC C++ ObjC++ LTO WarnRemoved
1524 Removed in GCC 9.  This switch has no effect.
1526 fchkp-check-write
1527 C ObjC C++ ObjC++ LTO WarnRemoved
1528 Removed in GCC 9.  This switch has no effect.
1530 fchkp-store-bounds
1531 C ObjC C++ ObjC++ LTO WarnRemoved
1532 Removed in GCC 9.  This switch has no effect.
1534 fchkp-instrument-calls
1535 C ObjC C++ ObjC++ LTO WarnRemoved
1536 Removed in GCC 9.  This switch has no effect.
1538 fchkp-instrument-marked-only
1539 C ObjC C++ ObjC++ LTO WarnRemoved
1540 Removed in GCC 9.  This switch has no effect.
1542 fchkp-use-wrappers
1543 C ObjC C++ ObjC++ LTO WarnRemoved
1544 Removed in GCC 9.  This switch has no effect.
1546 static-libmpx
1547 Driver WarnRemoved
1548 Removed in GCC 9.  This switch has no effect.
1550 static-libmpxwrappers
1551 Driver WarnRemoved
1552 Removed in GCC 9.  This switch has no effect.
1554 fcilkplus
1555 C ObjC C++ ObjC++ LTO Undocumented Ignore
1556 Removed in GCC 8.  This switch has no effect.
1558 fconcepts
1559 C++ ObjC++ Var(flag_concepts)
1560 Enable support for C++ concepts.
1562 fconcepts-ts
1563 C++ ObjC++ Var(flag_concepts_ts) Init(0)
1564 Enable certain features present in the Concepts TS.
1566 fconcepts-diagnostics-depth=
1567 C++ ObjC++ Joined RejectNegative UInteger Var(concepts_diagnostics_max_depth) Init(1)
1568 Specify maximum error replay depth during recursive diagnosis of a constraint satisfaction failure.
1570 fcond-mismatch
1571 C ObjC C++ ObjC++
1572 Allow the arguments of the '?' operator to have different types.
1574 fconserve-space
1575 C++ ObjC++ Ignore
1576 Does nothing.  Preserved for backward compatibility.
1578 fconstant-string-class=
1579 ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
1580 -fconst-string-class=<name>     Use class <name> for constant strings.
1582 fconstexpr-depth=
1583 C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512)
1584 -fconstexpr-depth=<number>      Specify maximum constexpr recursion depth.
1586 fconstexpr-cache-depth=
1587 C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_cache_depth) Init(8)
1588 -fconstexpr-cache-depth=<number>        Specify maximum constexpr recursion cache depth.
1590 fconstexpr-loop-limit=
1591 C++ ObjC++ Joined RejectNegative UInteger Var(constexpr_loop_limit) Init(262144)
1592 -fconstexpr-loop-limit=<number> Specify maximum constexpr loop iteration count.
1594 fconstexpr-ops-limit=
1595 C++ ObjC++ Joined RejectNegative Host_Wide_Int Var(constexpr_ops_limit) Init(33554432)
1596 -fconstexpr-ops-limit=<number>  Specify maximum number of constexpr operations during a single constexpr evaluation.
1598 fcoroutines
1599 C++ LTO Var(flag_coroutines)
1600 Enable C++ coroutines (experimental).
1602 fdebug-cpp
1603 C ObjC C++ ObjC++
1604 Emit debug annotations during preprocessing.
1606 fdeduce-init-list
1607 C++ ObjC++ Ignore
1608 Does nothing.  Preserved for backward compatibility.
1610 fdeclone-ctor-dtor
1611 C++ ObjC++ Var(flag_declone_ctor_dtor) Init(-1)
1612 Factor complex constructors and destructors to favor space over speed.
1614 fdefault-inline
1615 C++ ObjC++ Ignore
1616 Does nothing.  Preserved for backward compatibility.
1618 fdiagnostics-show-template-tree
1619 C++ ObjC++ Var(flag_diagnostics_show_template_tree) Init(0)
1620 Print hierarchical comparisons when template types are mismatched.
1622 fdirectives-only
1623 C ObjC C++ ObjC++
1624 Preprocess directives only.
1626 fdollars-in-identifiers
1627 C ObjC C++ ObjC++
1628 Permit '$' as an identifier character.
1630 fmacro-prefix-map=
1631 C ObjC C++ ObjC++ Joined RejectNegative
1632 -fmacro-prefix-map=<old>=<new>  Map one directory name to another in __FILE__, __BASE_FILE__, and __builtin_FILE().
1634 fdump-ada-spec
1635 C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec)
1636 Write all declarations as Ada code transitively.
1638 fdump-ada-spec-slim
1639 C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec_slim)
1640 Write all declarations as Ada code for the given file only.
1642 felide-constructors
1643 C++ ObjC++ Var(flag_elide_constructors) Init(1)
1645 felide-type
1646 C++ ObjC++ Var(flag_elide_type) Init(1)
1647 Do not elide common elements in template comparisons.
1649 fenforce-eh-specs
1650 C++ ObjC++ Var(flag_enforce_eh_specs) Init(1)
1651 Generate code to check exception specifications.
1653 fenum-int-equiv
1654 C++ ObjC++ WarnRemoved
1656 fexec-charset=
1657 C ObjC C++ ObjC++ Joined RejectNegative
1658 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>.
1660 fextended-identifiers
1661 C ObjC C++ ObjC++
1662 Permit universal character names (\\u and \\U) in identifiers.
1664 finput-charset=
1665 C ObjC C++ ObjC++ Joined RejectNegative
1666 -finput-charset=<cset>  Specify the default character set for source files.
1668 fextern-tls-init
1669 C++ ObjC++ Var(flag_extern_tls_init) Init(-1)
1670 Support dynamic initialization of thread-local variables in a different translation unit.
1672 fexternal-templates
1673 C++ ObjC++ WarnRemoved
1675 ffor-scope
1676 C++ ObjC++ WarnRemoved
1678 ffreestanding
1679 C ObjC C++ ObjC++
1680 Do not assume that standard C libraries and \"main\" exist.
1682 fgnu-keywords
1683 C++ ObjC++ Var(flag_no_gnu_keywords, 0)
1684 Recognize GNU-defined keywords.
1686 fgnu-runtime
1687 ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime,0) Init(NEXT_OBJC_RUNTIME)
1688 Generate code for GNU runtime environment.
1690 fgnu89-inline
1691 C ObjC Var(flag_gnu89_inline) Init(-1)
1692 Use traditional GNU semantics for inline functions.
1694 fguiding-decls
1695 C++ ObjC++ WarnRemoved
1697 fhandle-exceptions
1698 C++ ObjC++ Optimization Alias(fexceptions) Warn({%<-fhandle-exceptions%> has been renamed %<-fexceptions%> (and is now on by default)})
1700 fhonor-std
1701 C++ ObjC++ WarnRemoved
1703 fhosted
1704 C ObjC
1705 Assume normal C execution environment.
1707 fhuge-objects
1708 C++ ObjC++ WarnRemoved
1709 No longer supported.
1711 fimplement-inlines
1712 C++ ObjC++ Var(flag_implement_inlines) Init(1)
1713 Export functions even if they can be inlined.
1715 fimplicit-inline-templates
1716 C++ ObjC++ Var(flag_implicit_inline_templates) Init(1)
1717 Emit implicit instantiations of inline templates.
1719 fimplicit-templates
1720 C++ ObjC++ Var(flag_implicit_templates) Init(1)
1721 Emit implicit instantiations of templates.
1723 fnew-inheriting-ctors
1724 C++ ObjC++ Var(flag_new_inheriting_ctors) Init(1)
1725 Implement C++17 inheriting constructor semantics.
1727 ffriend-injection
1728 C++ ObjC++ WarnRemoved
1730 fkeep-inline-dllexport
1731 C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES)
1732 Don't emit dllexported inline functions unless needed.
1734 flabels-ok
1735 C++ ObjC++ WarnRemoved
1737 flax-vector-conversions
1738 C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
1739 Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
1741 fmodules-ts
1742 C++ ObjC++ Var(flag_modules) Integer Init(0)
1743 Enable C++ modules-ts (experimental).
1745 fno-modules
1746 C++ ObjC++ Undocumented RejectNegative Var(flag_modules,0) Integer
1747 ;; undocumented
1749 fmodule-header
1750 C++ ObjC RejectNegative Var(flag_header_unit,0) Integer
1751 Enable C++ header module (experimental).
1753 fmodule-header=
1754 C++ ObjC++ Joined RejectNegative Undocumented
1756 fmodule-implicit-inline
1757 C++ ObjC++ Var(flag_module_implicit_inline,0) Integer
1758 Member functions defined within their class are inline in module purview.
1760 fmodule-only
1761 C++ ObjC RejectNegative Var(flag_module_only) Integer
1762 Only emit Compiled Module Interface.
1764 fmodule-mapper=
1765 C++ ObjC++ Joined RejectNegative MissingArgError(missing mapper)
1766 Mapper for module to CMI files.
1768 fmodule-lazy
1769 C++ ObjC++ Var(flag_module_lazy) Init(1)
1770 Enable lazy module importing.
1772 fmodule-version-ignore
1773 C++ ObjC Var(flag_module_version_ignore) Integer
1774 ; undocumented, Very dangerous, but occasionally useful
1776 Winvalid-imported-macros
1777 C++ ObjC++ Var(warn_imported_macros) Warning
1778 Warn about macros that have conflicting header units definitions.
1780 flang-info-include-translate
1781 C++ Var(note_include_translate_yes)
1782 Note #include directives translated to import declarations.
1784 flang-info-include-translate-not
1785 C++ Var(note_include_translate_no)
1786 Note #include directives not translated to import declarations, and not known to be textual.
1788 flang-info-include-translate=
1789 C++ Joined RejectNegative MissingArgError(missing header name)
1790 Note a #include translation of a specific header.
1792 flang-info-module-cmi
1793 C++ Var(note_module_cmi_yes)
1794 Note Compiled Module Interface pathnames.
1796 flang-info-module-cmi=
1797 C++ Joined RejectNegative MissingArgError(missing module name)
1798 Note Compiled Module Interface pathname of a specific module or header-unit.
1800 fmax-include-depth=
1801 C ObjC C++ ObjC++ Joined RejectNegative UInteger
1802 fmax-include-depth=<number> Set the maximum depth of the nested #include.
1804 fms-extensions
1805 C ObjC C++ ObjC++ Var(flag_ms_extensions)
1806 Don't warn about uses of Microsoft extensions.
1808 fmudflap
1809 C ObjC C++ ObjC++ WarnRemoved
1811 fmudflapth
1812 C ObjC C++ ObjC++ WarnRemoved
1814 fmudflapir
1815 C ObjC C++ ObjC++ WarnRemoved
1817 fname-mangling-version-
1818 C++ ObjC++ Joined WarnRemoved
1820 fnew-abi
1821 C++ ObjC++ WarnRemoved
1823 fnew-ttp-matching
1824 C++ ObjC++ Var(flag_new_ttp)
1825 Implement resolution of DR 150 for matching of template template arguments.
1827 fnext-runtime
1828 ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime)
1829 Generate code for NeXT (Apple Mac OS X) runtime environment.
1831 fnil-receivers
1832 ObjC ObjC++ Var(flag_nil_receivers) Init(1)
1833 Assume that receivers of Objective-C messages may be nil.
1835 flocal-ivars
1836 ObjC ObjC++ Var(flag_local_ivars) Init(1)
1837 Allow access to instance variables as if they were local declarations within instance method implementations.
1839 fivar-visibility=
1840 ObjC ObjC++ Joined RejectNegative Enum(ivar_visibility) Var(default_ivar_visibility) Init(IVAR_VISIBILITY_PROTECTED)
1841 -fvisibility=[private|protected|public|package] Set the default symbol visibility.
1843 Enum
1844 Name(ivar_visibility) Type(enum ivar_visibility) UnknownError(unrecognized ivar visibility value %qs)
1846 EnumValue
1847 Enum(ivar_visibility) String(private) Value(IVAR_VISIBILITY_PRIVATE)
1849 EnumValue
1850 Enum(ivar_visibility) String(protected) Value(IVAR_VISIBILITY_PROTECTED)
1852 EnumValue
1853 Enum(ivar_visibility) String(public) Value(IVAR_VISIBILITY_PUBLIC)
1855 EnumValue
1856 Enum(ivar_visibility) String(package) Value(IVAR_VISIBILITY_PACKAGE)
1858 fnonansi-builtins
1859 C++ ObjC++ Var(flag_no_nonansi_builtin, 0)
1861 fnonnull-objects
1862 C++ ObjC++ WarnRemoved
1864 fnothrow-opt
1865 C++ ObjC++ Optimization Var(flag_nothrow_opt)
1866 Treat a throw() exception specification as noexcept to improve code size.
1868 fobjc-abi-version=
1869 ObjC ObjC++ LTO Joined RejectNegative UInteger Var(flag_objc_abi)
1870 Specify which ABI to use for Objective-C family code and meta-data generation.
1872 ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods
1873 ; to initialize any non-POD ivars in Objective-C++ classes.
1874 fobjc-call-cxx-cdtors
1875 ObjC++ Var(flag_objc_call_cxx_cdtors)
1876 Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed.
1878 fobjc-direct-dispatch
1879 ObjC ObjC++ Var(flag_objc_direct_dispatch)
1880 Allow fast jumps to the message dispatcher.
1882 ; Nonzero means that we will allow new ObjC exception syntax (@throw,
1883 ; @try, etc.) in source code.
1884 fobjc-exceptions
1885 ObjC ObjC++ Var(flag_objc_exceptions)
1886 Enable Objective-C exception and synchronization syntax.
1888 fobjc-gc
1889 ObjC ObjC++ LTO Var(flag_objc_gc)
1890 Enable garbage collection (GC) in Objective-C/Objective-C++ programs.
1892 fobjc-nilcheck
1893 ObjC ObjC++ Var(flag_objc_nilcheck,1)
1894 Enable inline checks for nil receivers with the NeXT runtime and ABI version 2.
1896 ; Nonzero means that we generate NeXT setjmp based exceptions.
1897 fobjc-sjlj-exceptions
1898 ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
1899 Enable Objective-C setjmp exception handling runtime.
1901 fobjc-std=objc1
1902 ObjC ObjC++ Var(flag_objc1_only)
1903 Conform to the Objective-C 1.0 language as implemented in GCC 4.0.
1905 fopenacc
1906 C ObjC C++ ObjC++ LTO Var(flag_openacc)
1907 Enable OpenACC.
1909 fopenacc-dim=
1910 C ObjC C++ ObjC++ LTO Joined Var(flag_openacc_dims)
1911 Specify default OpenACC compute dimensions.
1913 fopenmp
1914 C ObjC C++ ObjC++ LTO Var(flag_openmp)
1915 Enable OpenMP (implies -frecursive in Fortran).
1917 fopenmp-simd
1918 C ObjC C++ ObjC++ Var(flag_openmp_simd)
1919 Enable OpenMP's SIMD directives.
1921 foperator-names
1922 C++ ObjC++
1923 Recognize C++ keywords like \"compl\" and \"xor\".
1925 foptional-diags
1926 C++ ObjC++ Ignore
1927 Does nothing.  Preserved for backward compatibility.
1929 fpch-deps
1930 C ObjC C++ ObjC++
1932 fpch-preprocess
1933 C ObjC C++ ObjC++
1934 Look for and use PCH files even when preprocessing.
1936 fpermissive
1937 C++ ObjC++ Var(flag_permissive)
1938 Downgrade conformance errors to warnings.
1940 fplan9-extensions
1941 C ObjC Var(flag_plan9_extensions)
1942 Enable Plan 9 language extensions.
1944 fpreprocessed
1945 C ObjC C++ ObjC++
1946 Treat the input file as already preprocessed.
1948 ftrack-macro-expansion
1949 C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
1950 ; converted into ftrack-macro-expansion=
1952 ftrack-macro-expansion=
1953 C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger
1954 -ftrack-macro-expansion=<0|1|2> Track locations of tokens coming from macro expansion and display them in error messages.
1956 fpretty-templates
1957 C++ ObjC++ Var(flag_pretty_templates) Init(1)
1958 Do not pretty-print template specializations as the template signature followed by the arguments.
1960 fprintf-return-value
1961 C ObjC C++ ObjC++ LTO Optimization Var(flag_printf_return_value) Init(1)
1962 Treat known sprintf return values as constants.
1964 freplace-objc-classes
1965 ObjC ObjC++ LTO Var(flag_replace_objc_classes)
1966 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
1968 frepo
1969 C++ ObjC++ WarnRemoved
1970 Removed in GCC 10.  This switch has no effect.
1972 frtti
1973 C++ ObjC++ Optimization Var(flag_rtti) Init(1)
1974 Generate run time type descriptor information.
1976 fshort-enums
1977 C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums)
1978 Use the narrowest integer type possible for enumeration types.
1980 fshort-wchar
1981 C ObjC C++ ObjC++ LTO Optimization Var(flag_short_wchar)
1982 Force the underlying type for \"wchar_t\" to be \"unsigned short\".
1984 fsigned-bitfields
1985 C ObjC C++ ObjC++ Var(flag_signed_bitfields) Init(1)
1986 When \"signed\" or \"unsigned\" is not given make the bitfield signed.
1988 fsigned-char
1989 C ObjC C++ ObjC++ LTO Var(flag_signed_char)
1990 Make \"char\" signed by default.
1992 fsized-deallocation
1993 C++ ObjC++ Var(flag_sized_deallocation) Init(-1)
1994 Enable C++14 sized deallocation support.
1996 fsquangle
1997 C++ ObjC++ WarnRemoved
1999 fsso-struct=
2000 C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE)
2001 -fsso-struct=[big-endian|little-endian|native]  Set the default scalar storage order.
2003 Enum
2004 Name(sso_struct) Type(enum scalar_storage_order_kind) UnknownError(unrecognized scalar storage order value %qs)
2006 EnumValue
2007 Enum(sso_struct) String(big-endian) Value(SSO_BIG_ENDIAN)
2009 EnumValue
2010 Enum(sso_struct) String(little-endian) Value(SSO_LITTLE_ENDIAN)
2012 EnumValue
2013 Enum(sso_struct) String(native) Value(SSO_NATIVE)
2015 fstats
2016 C++ ObjC++ Var(flag_detailed_statistics)
2017 Display statistics accumulated during compilation.
2019 fstrict-enums
2020 C++ ObjC++ Optimization Var(flag_strict_enums)
2021 Assume that values of enumeration type are always within the minimum range of that type.
2023 fstrict-prototype
2024 C++ ObjC++ WarnRemoved
2026 fstrong-eval-order
2027 C++ ObjC++ Common Alias(fstrong-eval-order=, all, none)
2028 Follow the C++17 evaluation order requirements for assignment expressions,
2029 shift, member function calls, etc.
2031 fstrong-eval-order=
2032 C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1)
2033 Follow the C++17 evaluation order requirements for assignment expressions,
2034 shift, member function calls, etc.
2036 Enum
2037 Name(strong_eval_order) Type(int)
2039 EnumValue
2040 Enum(strong_eval_order) String(none) Value(0)
2042 EnumValue
2043 Enum(strong_eval_order) String(some) Value(1)
2045 EnumValue
2046 Enum(strong_eval_order) String(all) Value(2)
2048 ftemplate-backtrace-limit=
2049 C++ ObjC++ Joined RejectNegative UInteger Var(template_backtrace_limit) Init(10)
2050 Set the maximum number of template instantiation notes for a single warning or error.
2052 ftemplate-depth-
2053 C++ ObjC++ Joined RejectNegative Undocumented Alias(ftemplate-depth=)
2055 ftemplate-depth=
2056 C++ ObjC++ Joined RejectNegative UInteger
2057 -ftemplate-depth=<number>       Specify maximum template instantiation depth.
2059 fthis-is-variable
2060 C++ ObjC++ WarnRemoved
2062 fthreadsafe-statics
2063 C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
2064 -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
2066 funsigned-bitfields
2067 C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)
2068 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned.
2070 funsigned-char
2071 C ObjC C++ ObjC++ LTO Var(flag_signed_char, 0)
2072 Make \"char\" unsigned by default.
2074 fuse-cxa-atexit
2075 C++ ObjC++ Var(flag_use_cxa_atexit) Init(DEFAULT_USE_CXA_ATEXIT)
2076 Use __cxa_atexit to register destructors.
2078 fuse-cxa-get-exception-ptr
2079 C++ ObjC++ Var(flag_use_cxa_get_exception_ptr) Init(2)
2080 Use __cxa_get_exception_ptr in exception handling.
2082 fvisibility-inlines-hidden
2083 C++ ObjC++
2084 Marks all inlined functions and methods as having hidden visibility.
2086 fvisibility-ms-compat
2087 C++ ObjC++ Var(flag_visibility_ms_compat)
2088 Changes visibility to match Microsoft Visual Studio by default.
2090 fvtable-gc
2091 C++ ObjC++ WarnRemoved
2092 No longer supported.
2094 fvtable-thunks
2095 C++ ObjC++ WarnRemoved 
2096 No longer supported.
2098 fweak
2099 C++ ObjC++ Var(flag_weak) Init(1)
2100 Emit common-like symbols as weak symbols.
2102 fwide-exec-charset=
2103 C ObjC C++ ObjC++ Joined RejectNegative
2104 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>.
2106 fworking-directory
2107 C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1)
2108 Generate a #line directive pointing at the current working directory.
2110 fxref
2111 C++ ObjC++ WarnRemoved
2112 No longer supported.
2114 fzero-link
2115 ObjC ObjC++ Var(flag_zero_link)
2116 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode.
2118 gen-decls
2119 ObjC ObjC++ Driver Var(flag_gen_declaration) RejectNegative
2120 Dump declarations to a .decl file.
2122 femit-struct-debug-baseonly
2123 C ObjC C++ ObjC++
2124 -femit-struct-debug-baseonly    Aggressive reduced debug info for structs.
2126 femit-struct-debug-reduced
2127 C ObjC C++ ObjC++
2128 -femit-struct-debug-reduced     Conservative reduced debug info for structs.
2130 femit-struct-debug-detailed=
2131 C ObjC C++ ObjC++ Joined
2132 -femit-struct-debug-detailed=<spec-list>        Detailed reduced debug info for structs.
2134 fext-numeric-literals
2135 C++ ObjC++ Var(flag_ext_numeric_literals) Init(1)
2136 Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding
2137 number literal rather than a user-defined number literal.
2139 idirafter
2140 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2141 -idirafter <dir>        Add <dir> to the end of the system include path.
2143 imacros
2144 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2145 -imacros <file> Accept definition of macros in <file>.
2147 imultilib
2148 C ObjC C++ ObjC++ Joined Separate
2149 -imultilib <dir>        Set <dir> to be the multilib include subdirectory.
2151 include
2152 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs)
2153 -include <file> Include the contents of <file> before other files.
2155 iprefix
2156 C ObjC C++ ObjC++ Joined Separate
2157 -iprefix <path> Specify <path> as a prefix for next two options.
2159 isysroot
2160 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2161 -isysroot <dir> Set <dir> to be the system root directory.
2163 isystem
2164 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2165 -isystem <dir>  Add <dir> to the start of the system include path.
2167 iquote
2168 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
2169 -iquote <dir>   Add <dir> to the end of the quote include path.
2171 iwithprefix
2172 C ObjC C++ ObjC++ Joined Separate
2173 -iwithprefix <dir>      Add <dir> to the end of the system include path.
2175 iwithprefixbefore
2176 C ObjC C++ ObjC++ Joined Separate
2177 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path.
2179 lang-asm
2180 C Undocumented RejectDriver
2182 no-integrated-cpp
2183 Driver
2185 nostdinc
2186 C ObjC C++ ObjC++
2187 Do not search standard system include directories (those specified with -isystem will still be used).
2189 nostdinc++
2190 C++ ObjC++
2191 Do not search standard system include directories for C++.
2194 C ObjC C++ ObjC++ Joined Separate
2195 ; Documented in common.opt
2197 pedantic
2198 C ObjC C++ ObjC++ Alias(Wpedantic)
2199 ; Documented in common.opt
2201 print-objc-runtime-info
2202 ObjC ObjC++
2203 Generate C header of platform-specific features.
2205 remap
2206 C ObjC C++ ObjC++
2207 Remap file names when including files.
2209 std=c++98
2210 C++ ObjC++
2211 Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2213 std=c++03
2214 C++ ObjC++ Alias(std=c++98)
2215 Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
2217 std=c++11
2218 C++ ObjC++
2219 Conform to the ISO 2011 C++ standard.
2221 std=c++0x
2222 C++ ObjC++ Alias(std=c++11) Undocumented
2223 Deprecated in favor of -std=c++11.
2225 std=c++1y
2226 C++ ObjC++ Alias(std=c++14) Undocumented
2227 Deprecated in favor of -std=c++14.
2229 std=c++14
2230 C++ ObjC++
2231 Conform to the ISO 2014 C++ standard.
2233 std=c++1z
2234 C++ ObjC++ Alias(std=c++17) Undocumented
2235 Deprecated in favor of -std=c++17.
2237 std=c++17
2238 C++ ObjC++
2239 Conform to the ISO 2017 C++ standard.
2241 std=c++2a
2242 C++ ObjC++ Alias(std=c++20) Undocumented
2243 Conform to the ISO 2020 C++ standard (experimental and incomplete support).
2245 std=c++20
2246 C++ ObjC++
2247 Conform to the ISO 2020 C++ standard (experimental and incomplete support).
2249 std=c++2b
2250 C++ ObjC++ Alias(std=c++23)
2251 Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
2253 std=c++23
2254 C++ ObjC++ Undocumented
2255 Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
2257 std=c11
2258 C ObjC
2259 Conform to the ISO 2011 C standard.
2261 std=c1x
2262 C ObjC Alias(std=c11)
2263 Deprecated in favor of -std=c11.
2265 std=c17
2266 C ObjC
2267 Conform to the ISO 2017 C standard (published in 2018).
2269 std=c18
2270 C ObjC Alias(std=c17)
2271 Conform to the ISO 2017 C standard (published in 2018).
2273 std=c2x
2274 C ObjC
2275 Conform to the ISO 202X C standard draft (experimental and incomplete support).
2277 std=c89
2278 C ObjC Alias(std=c90)
2279 Conform to the ISO 1990 C standard.
2281 std=c90
2282 C ObjC
2283 Conform to the ISO 1990 C standard.
2285 std=c99
2286 C ObjC
2287 Conform to the ISO 1999 C standard.
2289 std=c9x
2290 C ObjC Alias(std=c99)
2291 Deprecated in favor of -std=c99.
2293 std=gnu++98
2294 C++ ObjC++
2295 Conform to the ISO 1998 C++ standard revised by the 2003 technical
2296 corrigendum with GNU extensions.
2298 std=gnu++03
2299 C++ ObjC++ Alias(std=gnu++98)
2300 Conform to the ISO 1998 C++ standard revised by the 2003 technical
2301 corrigendum with GNU extensions.
2303 std=gnu++11
2304 C++ ObjC++
2305 Conform to the ISO 2011 C++ standard with GNU extensions.
2307 std=gnu++0x
2308 C++ ObjC++ Alias(std=gnu++11) Undocumented
2309 Deprecated in favor of -std=gnu++11.
2311 std=gnu++1y
2312 C++ ObjC++ Alias(std=gnu++14) Undocumented
2313 Deprecated in favor of -std=gnu++14.
2315 std=gnu++14
2316 C++ ObjC++
2317 Conform to the ISO 2014 C++ standard with GNU extensions.
2319 std=gnu++1z
2320 C++ ObjC++ Alias(std=gnu++17) Undocumented
2321 Deprecated in favor of -std=gnu++17.
2323 std=gnu++17
2324 C++ ObjC++
2325 Conform to the ISO 2017 C++ standard with GNU extensions.
2327 std=gnu++2a
2328 C++ ObjC++ Alias(std=gnu++20) Undocumented
2329 Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
2331 std=gnu++20
2332 C++ ObjC++
2333 Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
2335 std=gnu++2b
2336 C++ ObjC++ Alias(std=gnu++23)
2337 Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
2339 std=gnu++23
2340 C++ ObjC++ Undocumented
2341 Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
2343 std=gnu11
2344 C ObjC
2345 Conform to the ISO 2011 C standard with GNU extensions.
2347 std=gnu1x
2348 C ObjC Alias(std=gnu11)
2349 Deprecated in favor of -std=gnu11.
2351 std=gnu17
2352 C ObjC
2353 Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
2355 std=gnu18
2356 C ObjC Alias(std=gnu17)
2357 Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
2359 std=gnu2x
2360 C ObjC
2361 Conform to the ISO 202X C standard draft with GNU extensions (experimental and incomplete support).
2363 std=gnu89
2364 C ObjC Alias(std=gnu90)
2365 Conform to the ISO 1990 C standard with GNU extensions.
2367 std=gnu90
2368 C ObjC
2369 Conform to the ISO 1990 C standard with GNU extensions.
2371 std=gnu99
2372 C ObjC
2373 Conform to the ISO 1999 C standard with GNU extensions.
2375 std=gnu9x
2376 C ObjC Alias(std=gnu99)
2377 Deprecated in favor of -std=gnu99.
2379 std=iso9899:1990
2380 C ObjC Alias(std=c90)
2381 Conform to the ISO 1990 C standard.
2383 std=iso9899:199409
2384 C ObjC
2385 Conform to the ISO 1990 C standard as amended in 1994.
2387 std=iso9899:1999
2388 C ObjC Alias(std=c99)
2389 Conform to the ISO 1999 C standard.
2391 std=iso9899:199x
2392 C ObjC Alias(std=c99)
2393 Deprecated in favor of -std=iso9899:1999.
2395 std=iso9899:2011
2396 C ObjC Alias(std=c11)
2397 Conform to the ISO 2011 C standard.
2399 std=iso9899:2017
2400 C ObjC Alias(std=c17)
2401 Conform to the ISO 2017 C standard (published in 2018).
2403 std=iso9899:2018
2404 C ObjC Alias(std=c17)
2405 Conform to the ISO 2017 C standard (published in 2018).
2407 stdlib=
2408 Driver C++ ObjC++ Common Condition(ENABLE_STDLIB_OPTION) Var(flag_stdlib_kind) Joined Enum(stdlib_kind) RejectNegative Init(1)
2409 -stdlib=[libstdc++|libc++]      The standard library to be used for C++ headers
2410 and runtime.
2412 Enum
2413 Name(stdlib_kind) Type(int)
2415 EnumValue
2416 Enum(stdlib_kind) String(libstdc++) Value(1)
2418 EnumValue
2419 Enum(stdlib_kind) String(libc++) Value(2)
2421 traditional
2422 Driver
2424 traditional-cpp
2425 C ObjC C++ ObjC++
2426 Enable traditional preprocessing.
2428 trigraphs
2429 C ObjC C++ ObjC++
2430 -trigraphs      Support ISO C trigraphs.
2432 undef
2433 C ObjC C++ ObjC++ Var(flag_undef)
2434 Do not predefine system-specific and GCC-specific macros.
2437 C ObjC C++ ObjC++
2438 ; Documented in common.opt
2441 C ObjC C++ ObjC++
2442 ; Documented in common.opt
2444 ; This comment is to ensure we retain the blank line above.