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