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