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