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