Debian Codegraph @

gcc/c-family/c.opt

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