]>
Commit | Line | Data |
---|---|---|
fef3106c | 1 | ; Options for the C, ObjC, C++ and ObjC++ front ends. |
da1c7394 | 2 | ; Copyright (C) 2003, 2004, 2005, 2006, 2007 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 | ||
fef3106c NB |
36 | -output-pch= |
37 | C ObjC C++ ObjC++ Joined Separate | |
38 | ||
39 | A | |
40 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 41 | -A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question> |
fef3106c NB |
42 | |
43 | C | |
44 | C ObjC C++ ObjC++ | |
72de27ea | 45 | Do not discard comments |
fef3106c NB |
46 | |
47 | CC | |
48 | C ObjC C++ ObjC++ | |
72de27ea | 49 | Do not discard comments in macro expansions |
fef3106c NB |
50 | |
51 | D | |
52 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 53 | -D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1 |
fef3106c NB |
54 | |
55 | E | |
f2ac9964 | 56 | C ObjC C++ ObjC++ Undocumented |
fef3106c | 57 | |
94d1613b MS |
58 | F |
59 | C ObjC C++ ObjC++ Joined Separate | |
4e994432 | 60 | -F <dir> Add <dir> to the end of the main framework include path |
94d1613b | 61 | |
fef3106c NB |
62 | H |
63 | C ObjC C++ ObjC++ | |
72de27ea | 64 | Print the name of header files as they are used |
fef3106c NB |
65 | |
66 | I | |
67 | C ObjC C++ ObjC++ Joined Separate | |
4bed3787 | 68 | -I <dir> Add <dir> to the end of the main include path |
fef3106c NB |
69 | |
70 | M | |
71 | C ObjC C++ ObjC++ | |
72de27ea | 72 | Generate make dependencies |
fef3106c NB |
73 | |
74 | MD | |
75 | C ObjC C++ ObjC++ Separate | |
72de27ea | 76 | Generate make dependencies and compile |
fef3106c NB |
77 | |
78 | MF | |
79 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 80 | -MF <file> Write dependency output to the given file |
fef3106c NB |
81 | |
82 | MG | |
83 | C ObjC C++ ObjC++ | |
72de27ea | 84 | Treat missing header files as generated files |
fef3106c NB |
85 | |
86 | MM | |
87 | C ObjC C++ ObjC++ | |
72de27ea | 88 | Like -M but ignore system header files |
fef3106c NB |
89 | |
90 | MMD | |
91 | C ObjC C++ ObjC++ Separate | |
72de27ea | 92 | Like -MD but ignore system header files |
fef3106c NB |
93 | |
94 | MP | |
95 | C ObjC C++ ObjC++ | |
72de27ea | 96 | Generate phony targets for all headers |
fef3106c NB |
97 | |
98 | MQ | |
99 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 100 | -MQ <target> Add a MAKE-quoted target |
fef3106c NB |
101 | |
102 | MT | |
103 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 104 | -MT <target> Add an unquoted target |
fef3106c NB |
105 | |
106 | P | |
107 | C ObjC C++ ObjC++ | |
72de27ea | 108 | Do not generate #line directives |
fef3106c NB |
109 | |
110 | U | |
111 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 112 | -U<macro> Undefine <macro> |
fef3106c NB |
113 | |
114 | Wabi | |
c662432e | 115 | C++ ObjC++ Var(warn_abi) Warning |
7619c085 | 116 | Warn about things that will change when compiling with an ABI-compliant compiler |
fef3106c | 117 | |
c116cd05 MLI |
118 | Waddress |
119 | C ObjC C++ ObjC++ Var(warn_address) Warning | |
120 | Warn about suspicious uses of memory addresses | |
121 | ||
fef3106c | 122 | Wall |
c662432e | 123 | C ObjC C++ ObjC++ Warning |
5a170a05 | 124 | Enable most warning messages |
fef3106c | 125 | |
f6aa72dd MLI |
126 | Wtype-limits |
127 | C ObjC C++ ObjC++ Var(warn_type_limits) Init(-1) Warning | |
128 | Warn if a comparison is always true or always false due to the limited range of the data type | |
129 | ||
6e955430 | 130 | Wassign-intercept |
c662432e | 131 | ObjC ObjC++ Var(warn_assign_intercept) Warning |
6e955430 ZL |
132 | Warn whenever an Objective-C assignment is being intercepted by the garbage collector |
133 | ||
fef3106c | 134 | Wbad-function-cast |
c662432e | 135 | C ObjC Var(warn_bad_function_cast) Warning |
5a170a05 | 136 | Warn about casting functions to incompatible types |
fef3106c | 137 | |
b7e20b53 | 138 | Wc++-compat |
2cbac420 | 139 | C ObjC Var(warn_cxx_compat) Warning |
b7e20b53 GDR |
140 | Warn about C constructs that are not in the common subset of C and C++ |
141 | ||
e1f1ee86 | 142 | Wc++0x-compat |
21af5cdf | 143 | C++ ObjC++ Var(warn_cxx0x_compat) Warning |
e1f1ee86 | 144 | Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x |
b7e20b53 | 145 | |
fef3106c | 146 | Wcast-qual |
c662432e | 147 | C ObjC C++ ObjC++ Var(warn_cast_qual) Warning |
5a170a05 | 148 | Warn about casts which discard qualifiers |
fef3106c NB |
149 | |
150 | Wchar-subscripts | |
c662432e | 151 | C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning |
5a170a05 | 152 | Warn about subscripts whose type is \"char\" |
fef3106c | 153 | |
2b001724 | 154 | Wclobbered |
c662432e | 155 | C ObjC C++ ObjC++ Var(warn_clobbered) Init(-1) Warning |
2b001724 MLI |
156 | Warn about variables that might be changed by \"longjmp\" or \"vfork\" |
157 | ||
fef3106c | 158 | Wcomment |
c662432e | 159 | C ObjC C++ ObjC++ Warning |
72de27ea | 160 | Warn about possibly nested block comments, and C++ comments spanning more than one physical line |
fef3106c NB |
161 | |
162 | Wcomments | |
c662432e | 163 | C ObjC C++ ObjC++ Warning |
72de27ea | 164 | Synonym for -Wcomment |
fef3106c NB |
165 | |
166 | Wconversion | |
c662432e | 167 | C ObjC C++ ObjC++ Var(warn_conversion) Warning |
05170031 | 168 | Warn for implicit type conversions that may change a value |
fef3106c | 169 | |
7060db96 MLI |
170 | Wsign-conversion |
171 | C ObjC C++ ObjC++ Var(warn_sign_conversion) Init(-1) | |
172 | Warn for implicit type conversions between signed and unsigned integers | |
173 | ||
fef3106c | 174 | Wctor-dtor-privacy |
c662432e | 175 | C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning |
bae92bf3 | 176 | Warn when all constructors and destructors are private |
fef3106c | 177 | |
85617eba | 178 | Wdeclaration-after-statement |
c662432e | 179 | C ObjC Var(warn_declaration_after_statement) Warning |
85617eba HPN |
180 | Warn when a declaration is found after a statement |
181 | ||
fef3106c | 182 | Wdeprecated |
c662432e | 183 | C++ ObjC++ Var(warn_deprecated) Init(1) Warning |
bae92bf3 | 184 | Warn about deprecated compiler features |
fef3106c NB |
185 | |
186 | Wdiv-by-zero | |
2cbac420 | 187 | C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning |
5a170a05 | 188 | Warn about compile-time integer division by zero |
fef3106c NB |
189 | |
190 | Weffc++ | |
c662432e | 191 | C++ ObjC++ Var(warn_ecpp) Warning |
bae92bf3 | 192 | Warn about violations of Effective C++ style rules |
fef3106c | 193 | |
b3b433c5 | 194 | Wempty-body |
c662432e | 195 | C ObjC C++ ObjC++ Var(warn_empty_body) Init(-1) Warning |
b3b433c5 MLI |
196 | Warn about an empty body in an if or else statement |
197 | ||
fef3106c | 198 | Wendif-labels |
c662432e | 199 | C ObjC C++ ObjC++ Warning |
72de27ea | 200 | Warn about stray tokens after #elif and #endif |
fef3106c NB |
201 | |
202 | Werror | |
203 | C ObjC C++ ObjC++ | |
72de27ea | 204 | ; Documented in common.opt |
fef3106c NB |
205 | |
206 | Werror-implicit-function-declaration | |
c662432e | 207 | C ObjC RejectNegative Warning |
dc90f45b | 208 | This switch is deprecated; use -Werror=implicit-function-declaration instead |
fef3106c NB |
209 | |
210 | Wfloat-equal | |
c662432e | 211 | C ObjC C++ ObjC++ Var(warn_float_equal) Warning |
5a170a05 | 212 | Warn if testing floating point numbers for equality |
fef3106c NB |
213 | |
214 | Wformat | |
c662432e | 215 | C ObjC C++ ObjC++ Warning |
5a170a05 | 216 | Warn about printf/scanf/strftime/strfmon format string anomalies |
fef3106c NB |
217 | |
218 | Wformat-extra-args | |
c662432e | 219 | C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning |
5a170a05 | 220 | Warn if passing too many arguments to a function for its format string |
fef3106c NB |
221 | |
222 | Wformat-nonliteral | |
c662432e | 223 | C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning |
5a170a05 | 224 | Warn about format strings that are not literals |
fef3106c | 225 | |
ca178f85 | 226 | Wformat-contains-nul |
6d16b6e7 | 227 | C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning |
ca178f85 BK |
228 | Warn about format strings that contain NUL bytes |
229 | ||
fef3106c | 230 | Wformat-security |
c662432e | 231 | C ObjC C++ ObjC++ Var(warn_format_security) Warning |
5a170a05 | 232 | Warn about possible security problems with format functions |
fef3106c NB |
233 | |
234 | Wformat-y2k | |
c662432e | 235 | C ObjC C++ ObjC++ Var(warn_format_y2k) Warning |
5a170a05 | 236 | Warn about strftime formats yielding 2-digit years |
fef3106c NB |
237 | |
238 | Wformat-zero-length | |
c662432e | 239 | C ObjC Var(warn_format_zero_length) Warning |
7619c085 | 240 | Warn about zero-length formats |
fef3106c NB |
241 | |
242 | Wformat= | |
c662432e | 243 | C ObjC C++ ObjC++ Joined Warning |
fef3106c | 244 | |
3390f9c9 | 245 | Winit-self |
c662432e | 246 | C ObjC C++ ObjC++ Var(warn_init_self) Warning |
ab532386 | 247 | Warn about variables which are initialized to themselves |
3390f9c9 | 248 | |
fef3106c | 249 | Wimplicit |
c662432e | 250 | C ObjC C++ ObjC++ Warning |
fef3106c NB |
251 | |
252 | Wimplicit-function-declaration | |
dc90f45b | 253 | C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning |
5a170a05 | 254 | Warn about implicit function declarations |
fef3106c NB |
255 | |
256 | Wimplicit-int | |
c662432e | 257 | C ObjC Var(warn_implicit_int) Warning |
5a170a05 | 258 | Warn when a declaration does not specify a type |
fef3106c NB |
259 | |
260 | Wimport | |
261 | C ObjC C++ ObjC++ | |
ab532386 | 262 | Deprecated. This switch has no effect |
fef3106c | 263 | |
53a2494e | 264 | Wint-to-pointer-cast |
c662432e | 265 | C ObjC Var(warn_int_to_pointer_cast) Init(1) Warning |
53a2494e JM |
266 | Warn when there is a cast to a pointer from an integer of a different size |
267 | ||
fef3106c | 268 | Winvalid-offsetof |
c662432e | 269 | C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning |
bae92bf3 | 270 | Warn about invalid uses of the \"offsetof\" macro |
fef3106c NB |
271 | |
272 | Winvalid-pch | |
c662432e | 273 | C ObjC C++ ObjC++ Warning |
5a170a05 | 274 | Warn about PCH files that are found but not used |
fef3106c NB |
275 | |
276 | Wlong-long | |
c662432e | 277 | C ObjC C++ ObjC++ Var(warn_long_long) Init(1) Warning |
5a170a05 | 278 | Do not warn about using \"long long\" when -pedantic |
fef3106c NB |
279 | |
280 | Wmain | |
820b51ae | 281 | C ObjC C++ ObjC++ Warning |
5a170a05 | 282 | Warn about suspicious declarations of \"main\" |
fef3106c NB |
283 | |
284 | Wmissing-braces | |
c662432e | 285 | C ObjC C++ ObjC++ Var(warn_missing_braces) Warning |
5a170a05 | 286 | Warn about possibly missing braces around initializers |
fef3106c NB |
287 | |
288 | Wmissing-declarations | |
c662432e | 289 | C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning |
5a170a05 | 290 | Warn about global functions without previous declarations |
fef3106c | 291 | |
eaac4679 | 292 | Wmissing-field-initializers |
c662432e | 293 | C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1) Warning |
eaac4679 RS |
294 | Warn about missing fields in struct initializers |
295 | ||
fef3106c | 296 | Wmissing-format-attribute |
c662432e | 297 | C ObjC C++ ObjC++ Var(warn_missing_format_attribute) Warning |
5a170a05 | 298 | Warn about functions which might be candidates for format attributes |
fef3106c | 299 | |
b02398bd | 300 | Wmissing-include-dirs |
c662432e | 301 | C ObjC C++ ObjC++ Warning |
b02398bd BE |
302 | Warn about user-specified include directories that do not exist |
303 | ||
cb4af25a | 304 | Wmissing-parameter-type |
c662432e | 305 | C ObjC Var(warn_missing_parameter_type) Init(-1) Warning |
cb4af25a MLI |
306 | Warn about function parameters declared without a type specifier in K&R-style functions |
307 | ||
fef3106c | 308 | Wmissing-prototypes |
c662432e | 309 | C ObjC Var(warn_missing_prototypes) Warning |
5a170a05 | 310 | Warn about global functions without prototypes |
fef3106c NB |
311 | |
312 | Wmultichar | |
c662432e | 313 | C ObjC C++ ObjC++ Warning |
5a170a05 | 314 | Warn about use of multi-character character constants |
fef3106c NB |
315 | |
316 | Wnested-externs | |
c662432e | 317 | C ObjC Var(warn_nested_externs) Warning |
5a170a05 | 318 | Warn about \"extern\" declarations not at file scope |
fef3106c NB |
319 | |
320 | Wnon-template-friend | |
c662432e | 321 | C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning |
bae92bf3 | 322 | Warn when non-templatized friend functions are declared within a template |
fef3106c NB |
323 | |
324 | Wnon-virtual-dtor | |
c662432e | 325 | C++ ObjC++ Var(warn_nonvdtor) Warning |
bae92bf3 | 326 | Warn about non-virtual destructors |
fef3106c NB |
327 | |
328 | Wnonnull | |
c662432e | 329 | C ObjC Var(warn_nonnull) Warning |
7619c085 | 330 | Warn about NULL being passed to argument slots marked as requiring non-NULL |
fef3106c | 331 | |
50668cf6 | 332 | Wnormalized= |
c662432e | 333 | C ObjC C++ ObjC++ Joined Warning |
50668cf6 GK |
334 | -Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings |
335 | ||
fef3106c | 336 | Wold-style-cast |
c662432e | 337 | C++ ObjC++ Var(warn_old_style_cast) Warning |
bae92bf3 | 338 | Warn if a C-style cast is used in a program |
fef3106c | 339 | |
b1ed4cb4 | 340 | Wold-style-declaration |
c662432e | 341 | C ObjC Var(warn_old_style_declaration) Init(-1) Warning |
b1ed4cb4 MLI |
342 | Warn for obsolescent usage in a declaration |
343 | ||
c034f121 | 344 | Wold-style-definition |
c662432e | 345 | C ObjC Var(warn_old_style_definition) Warning |
c034f121 AJ |
346 | Warn if an old-style parameter definition is used |
347 | ||
89a42ac8 | 348 | Woverlength-strings |
c662432e | 349 | C ObjC C++ ObjC++ Var(warn_overlength_strings) Init(-1) Warning |
89a42ac8 ZW |
350 | Warn if a string is longer than the maximum portable length specified by the standard |
351 | ||
fef3106c | 352 | Woverloaded-virtual |
c662432e | 353 | C++ ObjC++ Var(warn_overloaded_virtual) Warning |
bae92bf3 | 354 | Warn about overloaded virtual function names |
fef3106c | 355 | |
7ed322d7 | 356 | Woverride-init |
c662432e | 357 | C ObjC Var(warn_override_init) Init(-1) Warning |
7ed322d7 JM |
358 | Warn about overriding initializers without side effects |
359 | ||
fef3106c | 360 | Wparentheses |
c662432e | 361 | C ObjC C++ ObjC++ Var(warn_parentheses) Warning |
5a170a05 | 362 | Warn about possibly missing parentheses |
fef3106c NB |
363 | |
364 | Wpmf-conversions | |
c662432e | 365 | C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning |
bae92bf3 | 366 | Warn when converting the type of pointers to member functions |
fef3106c NB |
367 | |
368 | Wpointer-arith | |
c662432e | 369 | C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning |
5a170a05 | 370 | Warn about function pointer arithmetic |
fef3106c | 371 | |
53a2494e | 372 | Wpointer-to-int-cast |
c662432e | 373 | C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning |
53a2494e JM |
374 | Warn when a pointer is cast to an integer of a different size |
375 | ||
b9b8dde3 | 376 | Wpragmas |
c662432e | 377 | C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning |
b9b8dde3 DD |
378 | Warn about misuses of pragmas |
379 | ||
fef3106c | 380 | Wprotocol |
c662432e | 381 | ObjC ObjC++ Var(warn_protocol) Init(1) Warning |
f2ac9964 | 382 | Warn if inherited methods are unimplemented |
fef3106c NB |
383 | |
384 | Wredundant-decls | |
c662432e | 385 | C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning |
5a170a05 | 386 | Warn about multiple declarations of the same object |
fef3106c NB |
387 | |
388 | Wreorder | |
c662432e | 389 | C++ ObjC++ Var(warn_reorder) Warning |
bae92bf3 | 390 | Warn when the compiler reorders code |
fef3106c NB |
391 | |
392 | Wreturn-type | |
c662432e | 393 | C ObjC C++ ObjC++ Var(warn_return_type) Warning |
bae92bf3 | 394 | Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++) |
fef3106c NB |
395 | |
396 | Wselector | |
c662432e | 397 | ObjC ObjC++ Var(warn_selector) Warning |
f2ac9964 | 398 | Warn if a selector has multiple methods |
fef3106c NB |
399 | |
400 | Wsequence-point | |
c662432e | 401 | C ObjC C++ ObjC++ Var(warn_sequence_point) Warning |
5a170a05 | 402 | Warn about possible violations of sequence point rules |
fef3106c NB |
403 | |
404 | Wsign-compare | |
c662432e | 405 | C ObjC C++ ObjC++ Var(warn_sign_compare) Init(-1) Warning |
5a170a05 | 406 | Warn about signed-unsigned comparisons |
fef3106c NB |
407 | |
408 | Wsign-promo | |
c662432e | 409 | C++ ObjC++ Var(warn_sign_promo) Warning |
bae92bf3 | 410 | Warn when overload promotes from unsigned to signed |
fef3106c | 411 | |
b2f97e4a | 412 | Wstrict-null-sentinel |
c662432e | 413 | C++ ObjC++ Warning |
b2f97e4a MM |
414 | Warn about uncasted NULL used as sentinel |
415 | ||
fef3106c | 416 | Wstrict-prototypes |
c662432e | 417 | C ObjC Var(warn_strict_prototypes) Warning |
5a170a05 | 418 | Warn about unprototyped function declarations |
fef3106c | 419 | |
6e955430 | 420 | Wstrict-selector-match |
c662432e | 421 | ObjC ObjC++ Var(warn_strict_selector_match) Warning |
6e955430 ZL |
422 | Warn if type signatures of candidate methods do not match exactly |
423 | ||
fef3106c | 424 | Wsynth |
c662432e | 425 | C++ ObjC++ Var(warn_synth) Warning |
bae92bf3 | 426 | Warn when synthesis behavior differs from Cfront |
fef3106c NB |
427 | |
428 | Wsystem-headers | |
c662432e | 429 | C ObjC C++ ObjC++ Warning |
72de27ea | 430 | Do not suppress warnings from system headers |
fef3106c NB |
431 | |
432 | Wtraditional | |
c662432e | 433 | C ObjC Var(warn_traditional) Warning |
72de27ea | 434 | Warn about features not present in traditional C |
fef3106c | 435 | |
05170031 | 436 | Wtraditional-conversion |
c662432e | 437 | C ObjC Var(warn_traditional_conversion) Warning |
05170031 MLI |
438 | Warn of prototypes causing type conversions different from what would happen in the absence of prototype |
439 | ||
fef3106c | 440 | Wtrigraphs |
c662432e | 441 | C ObjC C++ ObjC++ Warning |
72de27ea | 442 | Warn if trigraphs are encountered that might affect the meaning of the program |
fef3106c NB |
443 | |
444 | Wundeclared-selector | |
c662432e | 445 | ObjC ObjC++ Var(warn_undeclared_selector) Warning |
7619c085 | 446 | Warn about @selector()s without previously declared methods |
fef3106c NB |
447 | |
448 | Wundef | |
c662432e | 449 | C ObjC C++ ObjC++ Warning |
72de27ea | 450 | Warn if an undefined macro is used in an #if directive |
fef3106c NB |
451 | |
452 | Wunknown-pragmas | |
c662432e | 453 | C ObjC C++ ObjC++ Warning |
5a170a05 | 454 | Warn about unrecognized pragmas |
fef3106c NB |
455 | |
456 | Wunused-macros | |
c662432e | 457 | C ObjC C++ ObjC++ Warning |
72de27ea | 458 | Warn about macros defined in the main file that are not used |
fef3106c | 459 | |
e5b79219 | 460 | Wvariadic-macros |
c662432e | 461 | C ObjC C++ ObjC++ Warning |
e5b79219 RH |
462 | Do not warn about using variadic macros when -pedantic |
463 | ||
50d50fc7 SP |
464 | Wvla |
465 | C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning | |
466 | Warn if a variable length array is used | |
467 | ||
fef3106c | 468 | Wwrite-strings |
c662432e | 469 | C ObjC C++ ObjC++ Var(warn_write_strings) Warning |
d539b114 | 470 | 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 | 471 | |
f2fd3821 | 472 | Wpointer-sign |
c662432e | 473 | C ObjC Var(warn_pointer_sign) Init(-1) Warning |
c85ce869 | 474 | Warn when a pointer differs in signedness in an assignment |
f2fd3821 | 475 | |
fef3106c NB |
476 | ansi |
477 | C ObjC C++ ObjC++ | |
c85ce869 | 478 | A synonym for -std=c89 (for C) or -std=c++98 (for C++) |
fef3106c NB |
479 | |
480 | d | |
481 | C ObjC C++ ObjC++ Joined | |
72de27ea | 482 | ; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD? |
fef3106c | 483 | |
fef3106c NB |
484 | faccess-control |
485 | C++ ObjC++ | |
bae92bf3 | 486 | Enforce class member access control semantics |
fef3106c NB |
487 | |
488 | fall-virtual | |
489 | C++ ObjC++ | |
490 | ||
491 | falt-external-templates | |
492 | C++ ObjC++ | |
bae92bf3 | 493 | Change when template instances are emitted |
fef3106c NB |
494 | |
495 | fasm | |
496 | C ObjC C++ ObjC++ | |
5a170a05 | 497 | Recognize the \"asm\" keyword |
fef3106c NB |
498 | |
499 | fbuiltin | |
500 | C ObjC C++ ObjC++ | |
5a170a05 | 501 | Recognize built-in functions |
fef3106c NB |
502 | |
503 | fbuiltin- | |
504 | C ObjC C++ ObjC++ Joined | |
505 | ||
506 | fcheck-new | |
507 | C++ ObjC++ | |
bae92bf3 | 508 | Check the return value of new |
fef3106c NB |
509 | |
510 | fcond-mismatch | |
511 | C ObjC C++ ObjC++ | |
5a170a05 | 512 | Allow the arguments of the '?' operator to have different types |
fef3106c NB |
513 | |
514 | fconserve-space | |
515 | C++ ObjC++ | |
bae92bf3 | 516 | Reduce the size of object files |
fef3106c | 517 | |
fef3106c NB |
518 | fconstant-string-class= |
519 | ObjC ObjC++ Joined | |
f2ac9964 | 520 | -fconst-string-class=<name> Use class <name> for constant strings |
fef3106c NB |
521 | |
522 | fdefault-inline | |
523 | C++ ObjC++ | |
bae92bf3 | 524 | Inline member functions by default |
fef3106c NB |
525 | |
526 | fdollars-in-identifiers | |
527 | C ObjC C++ ObjC++ | |
72de27ea | 528 | Permit '$' as an identifier character |
fef3106c | 529 | |
fef3106c NB |
530 | felide-constructors |
531 | C++ ObjC++ | |
532 | ||
533 | fenforce-eh-specs | |
534 | C++ ObjC++ | |
bae92bf3 | 535 | Generate code to check exception specifications |
fef3106c NB |
536 | |
537 | fenum-int-equiv | |
538 | C++ ObjC++ | |
539 | ||
e6cc3a24 ZW |
540 | fexec-charset= |
541 | C ObjC C++ ObjC++ Joined RejectNegative | |
72de27ea | 542 | -fexec-charset=<cset> Convert all strings and character constants to character set <cset> |
e6cc3a24 | 543 | |
af15a2fe JM |
544 | fextended-identifiers |
545 | C ObjC C++ ObjC++ | |
546 | Permit universal character names (\\u and \\U) in identifiers | |
547 | ||
16dd5cfe EC |
548 | finput-charset= |
549 | C ObjC C++ ObjC++ Joined RejectNegative | |
c85ce869 | 550 | -finput-charset=<cset> Specify the default character set for source files |
16dd5cfe EC |
551 | |
552 | ||
fef3106c NB |
553 | fexternal-templates |
554 | C++ ObjC++ | |
555 | ||
fef3106c NB |
556 | ffor-scope |
557 | C++ ObjC++ | |
bae92bf3 | 558 | Scope of for-init-statement variables is local to the loop |
fef3106c NB |
559 | |
560 | ffreestanding | |
820b51ae | 561 | C ObjC C++ ObjC++ |
5a170a05 | 562 | Do not assume that standard C libraries and \"main\" exist |
fef3106c NB |
563 | |
564 | fgnu-keywords | |
565 | C++ ObjC++ | |
bae92bf3 | 566 | Recognize GNU-defined keywords |
fef3106c NB |
567 | |
568 | fgnu-runtime | |
569 | ObjC ObjC++ | |
f2ac9964 | 570 | Generate code for GNU runtime environment |
fef3106c | 571 | |
da1c7394 | 572 | fgnu89-inline |
2cbac420 | 573 | C ObjC Var(flag_gnu89_inline) Init(-1) |
da1c7394 ILT |
574 | Use traditional GNU semantics for inline functions |
575 | ||
fef3106c NB |
576 | fguiding-decls |
577 | C++ ObjC++ | |
578 | ||
579 | fhandle-exceptions | |
c662432e | 580 | C++ ObjC++ Optimization |
fef3106c NB |
581 | |
582 | fhonor-std | |
583 | C++ ObjC++ | |
584 | ||
585 | fhosted | |
586 | C ObjC | |
5a170a05 | 587 | Assume normal C execution environment |
fef3106c NB |
588 | |
589 | fhuge-objects | |
590 | C++ ObjC++ | |
bae92bf3 | 591 | Enable support for huge objects |
fef3106c NB |
592 | |
593 | fimplement-inlines | |
594 | C++ ObjC++ | |
bae92bf3 | 595 | Export functions even if they can be inlined |
fef3106c NB |
596 | |
597 | fimplicit-inline-templates | |
598 | C++ ObjC++ | |
bae92bf3 | 599 | Emit implicit instantiations of inline templates |
fef3106c NB |
600 | |
601 | fimplicit-templates | |
602 | C++ ObjC++ | |
bae92bf3 | 603 | Emit implicit instantiations of templates |
fef3106c | 604 | |
d63d5d0c | 605 | ffriend-injection |
2cbac420 | 606 | C++ ObjC++ Var(flag_friend_injection) |
d63d5d0c ILT |
607 | Inject friend functions into enclosing namespace |
608 | ||
fef3106c NB |
609 | flabels-ok |
610 | C++ ObjC++ | |
611 | ||
00c8e9f6 MS |
612 | flax-vector-conversions |
613 | C ObjC C++ ObjC++ | |
614 | Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types. | |
615 | ||
fef3106c NB |
616 | fms-extensions |
617 | C ObjC C++ ObjC++ | |
bae92bf3 | 618 | Don't warn about uses of Microsoft extensions |
fef3106c NB |
619 | |
620 | fname-mangling-version- | |
621 | C++ ObjC++ Joined | |
622 | ||
623 | fnew-abi | |
624 | C++ ObjC++ | |
625 | ||
626 | fnext-runtime | |
627 | ObjC ObjC++ | |
264fa2db ZL |
628 | Generate code for NeXT (Apple Mac OS X) runtime environment |
629 | ||
630 | fnil-receivers | |
631 | ObjC ObjC++ | |
632 | Assume that receivers of Objective-C messages may be nil | |
fef3106c NB |
633 | |
634 | fnonansi-builtins | |
635 | C++ ObjC++ | |
636 | ||
637 | fnonnull-objects | |
638 | C++ ObjC++ | |
639 | ||
6e955430 ZL |
640 | ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods |
641 | ; to initialize any non-POD ivars in Objective-C++ classes. | |
642 | fobjc-call-cxx-cdtors | |
643 | ObjC++ Var(flag_objc_call_cxx_cdtors) | |
644 | Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed | |
645 | ||
646 | fobjc-direct-dispatch | |
647 | ObjC ObjC++ Var(flag_objc_direct_dispatch) | |
648 | Allow fast jumps to the message dispatcher | |
649 | ||
650 | ; Nonzero means that we will allow new ObjC exception syntax (@throw, | |
651 | ; @try, etc.) in source code. | |
264fa2db | 652 | fobjc-exceptions |
6e955430 | 653 | ObjC ObjC++ Var(flag_objc_exceptions) |
264fa2db ZL |
654 | Enable Objective-C exception and synchronization syntax |
655 | ||
6e955430 ZL |
656 | fobjc-gc |
657 | ObjC ObjC++ Var(flag_objc_gc) | |
658 | Enable garbage collection (GC) in Objective-C/Objective-C++ programs | |
659 | ||
660 | ; Nonzero means that we generate NeXT setjmp based exceptions. | |
093c7153 | 661 | fobjc-sjlj-exceptions |
6e955430 | 662 | ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1) |
093c7153 RH |
663 | Enable Objective-C setjmp exception handling runtime |
664 | ||
953ff289 DN |
665 | fopenmp |
666 | C ObjC C++ ObjC++ Var(flag_openmp) | |
667 | Enable OpenMP | |
668 | ||
fef3106c NB |
669 | foperator-names |
670 | C++ ObjC++ | |
bae92bf3 | 671 | Recognize C++ kewords like \"compl\" and \"xor\" |
fef3106c NB |
672 | |
673 | foptional-diags | |
674 | C++ ObjC++ | |
bae92bf3 | 675 | Enable optional diagnostics |
fef3106c NB |
676 | |
677 | fpch-deps | |
678 | C ObjC C++ ObjC++ | |
679 | ||
c0d578e6 GK |
680 | fpch-preprocess |
681 | C ObjC C++ ObjC++ | |
682 | Look for and use PCH files even when preprocessing | |
683 | ||
fef3106c NB |
684 | fpermissive |
685 | C++ ObjC++ | |
bae92bf3 | 686 | Downgrade conformance errors to warnings |
fef3106c NB |
687 | |
688 | fpreprocessed | |
689 | C ObjC C++ ObjC++ | |
72de27ea | 690 | Treat the input file as already preprocessed |
fef3106c | 691 | |
264fa2db ZL |
692 | freplace-objc-classes |
693 | ObjC ObjC++ | |
694 | Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime | |
695 | ||
fef3106c NB |
696 | frepo |
697 | C++ ObjC++ | |
bae92bf3 | 698 | Enable automatic template instantiation |
fef3106c NB |
699 | |
700 | frtti | |
c662432e | 701 | C++ ObjC++ Optimization |
bae92bf3 | 702 | Generate run time type descriptor information |
fef3106c NB |
703 | |
704 | fshort-double | |
c662432e | 705 | C ObjC C++ ObjC++ Optimization |
5a170a05 | 706 | Use the same size for double as for float |
fef3106c NB |
707 | |
708 | fshort-enums | |
c662432e | 709 | C ObjC C++ ObjC++ Optimization |
5a170a05 | 710 | Use the narrowest integer type possible for enumeration types |
fef3106c NB |
711 | |
712 | fshort-wchar | |
c662432e | 713 | C ObjC C++ ObjC++ Optimization |
5a170a05 | 714 | Force the underlying type for \"wchar_t\" to be \"unsigned short\" |
fef3106c | 715 | |
fef3106c NB |
716 | fsigned-bitfields |
717 | C ObjC C++ ObjC++ | |
5a170a05 | 718 | When \"signed\" or \"unsigned\" is not given make the bitfield signed |
fef3106c NB |
719 | |
720 | fsigned-char | |
721 | C ObjC C++ ObjC++ | |
5a170a05 | 722 | Make \"char\" signed by default |
fef3106c NB |
723 | |
724 | fsquangle | |
725 | C++ ObjC++ | |
726 | ||
727 | fstats | |
728 | C++ ObjC++ | |
bae92bf3 | 729 | Display statistics accumulated during compilation |
fef3106c NB |
730 | |
731 | fstrict-prototype | |
732 | C++ ObjC++ | |
733 | ||
734 | ftabstop= | |
7b086b11 | 735 | C ObjC C++ ObjC++ Joined RejectNegative UInteger |
72de27ea | 736 | -ftabstop=<number> Distance between tab stops for column reporting |
fef3106c NB |
737 | |
738 | ftemplate-depth- | |
c22cacf3 | 739 | C++ ObjC++ Joined RejectNegative UInteger |
bae92bf3 | 740 | -ftemplate-depth-<number> Specify maximum template instantiation depth |
fef3106c NB |
741 | |
742 | fthis-is-variable | |
743 | C++ ObjC++ | |
744 | ||
40aac948 | 745 | fthreadsafe-statics |
c662432e | 746 | C++ ObjC++ Optimization |
c85ce869 | 747 | -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics |
40aac948 | 748 | |
fef3106c NB |
749 | funsigned-bitfields |
750 | C ObjC C++ ObjC++ | |
5a170a05 | 751 | When \"signed\" or \"unsigned\" is not given make the bitfield unsigned |
fef3106c NB |
752 | |
753 | funsigned-char | |
754 | C ObjC C++ ObjC++ | |
5a170a05 | 755 | Make \"char\" unsigned by default |
fef3106c NB |
756 | |
757 | fuse-cxa-atexit | |
758 | C++ ObjC++ | |
bae92bf3 | 759 | Use __cxa_atexit to register destructors |
fef3106c | 760 | |
c7b5e395 GK |
761 | fuse-cxa-get-exception-ptr |
762 | C++ ObjC++ | |
763 | Use __cxa_get_exception_ptr in exception handling | |
764 | ||
d7afec4b | 765 | fvisibility-inlines-hidden |
d0b07283 | 766 | C++ ObjC++ |
d7afec4b ND |
767 | Marks all inlined methods as having hidden visibility |
768 | ||
ddbfd28d GK |
769 | fvisibility-ms-compat |
770 | C++ ObjC++ Var(flag_visibility_ms_compat) | |
771 | Changes visibility to match Microsoft Visual Studio by default | |
772 | ||
fef3106c NB |
773 | fvtable-gc |
774 | C++ ObjC++ | |
bae92bf3 | 775 | Discard unused virtual functions |
fef3106c NB |
776 | |
777 | fvtable-thunks | |
778 | C++ ObjC++ | |
bae92bf3 | 779 | Implement vtables using thunks |
fef3106c NB |
780 | |
781 | fweak | |
782 | C++ ObjC++ | |
bae92bf3 | 783 | Emit common-like symbols as weak symbols |
fef3106c | 784 | |
e6cc3a24 ZW |
785 | fwide-exec-charset= |
786 | C ObjC C++ ObjC++ Joined RejectNegative | |
72de27ea | 787 | -fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset> |
e6cc3a24 | 788 | |
b20d9f0c AO |
789 | fworking-directory |
790 | C ObjC C++ ObjC++ | |
791 | Generate a #line directive pointing at the current working directory | |
792 | ||
fef3106c NB |
793 | fxref |
794 | C++ ObjC++ | |
bae92bf3 | 795 | Emit cross referencing information |
fef3106c | 796 | |
264fa2db ZL |
797 | fzero-link |
798 | ObjC ObjC++ | |
799 | Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode | |
800 | ||
fef3106c NB |
801 | gen-decls |
802 | ObjC ObjC++ | |
f2ac9964 | 803 | Dump declarations to a .decl file |
fef3106c | 804 | |
39ef6592 LC |
805 | femit-struct-debug-baseonly |
806 | C ObjC C++ ObjC++ | |
807 | -femit-struct-debug-baseonly Aggressive reduced debug info for structs | |
808 | ||
809 | femit-struct-debug-reduced | |
810 | C ObjC C++ ObjC++ | |
811 | -femit-struct-debug-reduced Conservative reduced debug info for structs | |
812 | ||
813 | femit-struct-debug-detailed= | |
814 | C ObjC C++ ObjC++ Joined | |
815 | -femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs | |
816 | ||
fef3106c NB |
817 | idirafter |
818 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 819 | -idirafter <dir> Add <dir> to the end of the system include path |
fef3106c NB |
820 | |
821 | imacros | |
822 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 823 | -imacros <file> Accept definition of macros in <file> |
fef3106c | 824 | |
2b6dd222 JM |
825 | imultilib |
826 | C ObjC C++ ObjC++ Joined Separate | |
827 | -imultilib <dir> Set <dir> to be the multilib include subdirectory | |
828 | ||
fef3106c NB |
829 | include |
830 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 831 | -include <file> Include the contents of <file> before other files |
fef3106c NB |
832 | |
833 | iprefix | |
834 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 835 | -iprefix <path> Specify <path> as a prefix for next two options |
fef3106c NB |
836 | |
837 | isysroot | |
838 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 839 | -isysroot <dir> Set <dir> to be the system root directory |
fef3106c NB |
840 | |
841 | isystem | |
842 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 843 | -isystem <dir> Add <dir> to the start of the system include path |
fef3106c | 844 | |
4bed3787 MS |
845 | iquote |
846 | C ObjC C++ ObjC++ Joined Separate | |
847 | -iquote <dir> Add <dir> to the end of the quote include path | |
848 | ||
fef3106c NB |
849 | iwithprefix |
850 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 851 | -iwithprefix <dir> Add <dir> to the end of the system include path |
fef3106c NB |
852 | |
853 | iwithprefixbefore | |
854 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 855 | -iwithprefixbefore <dir> Add <dir> to the end of the main include path |
fef3106c NB |
856 | |
857 | lang-asm | |
f2ac9964 | 858 | C Undocumented |
fef3106c | 859 | |
a67ec6ab FXC |
860 | lang-fortran |
861 | C Undocumented | |
862 | ||
fef3106c | 863 | lang-objc |
f2ac9964 | 864 | C ObjC C++ ObjC++ Undocumented |
fef3106c NB |
865 | |
866 | nostdinc | |
867 | C ObjC C++ ObjC++ | |
72de27ea | 868 | Do not search standard system include directories (those specified with -isystem will still be used) |
fef3106c NB |
869 | |
870 | nostdinc++ | |
72de27ea NB |
871 | C++ ObjC++ |
872 | Do not search standard system include directories for C++ | |
fef3106c NB |
873 | |
874 | o | |
875 | C ObjC C++ ObjC++ Joined Separate | |
72de27ea | 876 | ; Documented in common.opt |
fef3106c NB |
877 | |
878 | pedantic | |
879 | C ObjC C++ ObjC++ | |
72de27ea | 880 | ; Documented in common.opt |
fef3106c NB |
881 | |
882 | pedantic-errors | |
883 | C ObjC C++ ObjC++ | |
72de27ea | 884 | ; Documented in common.opt |
fef3106c NB |
885 | |
886 | print-objc-runtime-info | |
887 | ObjC ObjC++ | |
f2ac9964 | 888 | Generate C header of platform-specific features |
fef3106c | 889 | |
3fd30b88 GK |
890 | print-pch-checksum |
891 | C ObjC C++ ObjC++ | |
c85ce869 | 892 | Print a checksum of the executable for PCH validity checking, and stop |
3fd30b88 | 893 | |
fef3106c NB |
894 | remap |
895 | C ObjC C++ ObjC++ | |
72de27ea | 896 | Remap file names when including files |
fef3106c NB |
897 | |
898 | std=c++98 | |
899 | C++ ObjC++ | |
72de27ea | 900 | Conform to the ISO 1998 C++ standard |
fef3106c | 901 | |
966541e3 DG |
902 | std=c++0x |
903 | C++ ObjC++ | |
904 | Conform to the ISO 1998 C++ standard, with extensions that are likely to | |
905 | become a part of the upcoming ISO C++ standard, dubbed C++0x. Note that the | |
906 | extensions enabled by this mode are experimental and may be removed in | |
907 | future releases of GCC. | |
908 | ||
fef3106c NB |
909 | std=c89 |
910 | C ObjC | |
72de27ea | 911 | Conform to the ISO 1990 C standard |
fef3106c NB |
912 | |
913 | std=c99 | |
914 | C ObjC | |
72de27ea | 915 | Conform to the ISO 1999 C standard |
fef3106c NB |
916 | |
917 | std=c9x | |
918 | C ObjC | |
72de27ea | 919 | Deprecated in favor of -std=c99 |
fef3106c NB |
920 | |
921 | std=gnu++98 | |
922 | C++ ObjC++ | |
72de27ea | 923 | Conform to the ISO 1998 C++ standard with GNU extensions |
fef3106c | 924 | |
966541e3 DG |
925 | std=gnu++0x |
926 | C++ ObjC++ | |
927 | Conform to the ISO 1998 C++ standard, with GNU extensions and | |
928 | extensions that are likely to become a part of the upcoming ISO C++ | |
929 | standard, dubbed C++0x. Note that the extensions enabled by this mode | |
930 | are experimental and may be removed in future releases of GCC. | |
931 | ||
fef3106c NB |
932 | std=gnu89 |
933 | C ObjC | |
72de27ea | 934 | Conform to the ISO 1990 C standard with GNU extensions |
fef3106c NB |
935 | |
936 | std=gnu99 | |
937 | C ObjC | |
72de27ea | 938 | Conform to the ISO 1999 C standard with GNU extensions |
fef3106c NB |
939 | |
940 | std=gnu9x | |
941 | C ObjC | |
72de27ea | 942 | Deprecated in favor of -std=gnu99 |
fef3106c NB |
943 | |
944 | std=iso9899:1990 | |
945 | C ObjC | |
3a1e400e | 946 | Conform to the ISO 1990 C standard |
fef3106c NB |
947 | |
948 | std=iso9899:199409 | |
949 | C ObjC | |
72de27ea | 950 | Conform to the ISO 1990 C standard as amended in 1994 |
fef3106c NB |
951 | |
952 | std=iso9899:1999 | |
953 | C ObjC | |
3a1e400e | 954 | Conform to the ISO 1999 C standard |
fef3106c NB |
955 | |
956 | std=iso9899:199x | |
957 | C ObjC | |
3a1e400e | 958 | Deprecated in favor of -std=iso9899:1999 |
fef3106c NB |
959 | |
960 | traditional-cpp | |
961 | C ObjC C++ ObjC++ | |
72de27ea | 962 | Enable traditional preprocessing |
fef3106c NB |
963 | |
964 | trigraphs | |
965 | C ObjC C++ ObjC++ | |
72de27ea | 966 | -trigraphs Support ISO C trigraphs |
fef3106c NB |
967 | |
968 | undef | |
969 | C ObjC C++ ObjC++ | |
72de27ea | 970 | Do not predefine system-specific and GCC-specific macros |
fef3106c NB |
971 | |
972 | v | |
973 | C ObjC C++ ObjC++ | |
72de27ea | 974 | Enable verbose output |
fef3106c NB |
975 | |
976 | w | |
977 | C ObjC C++ ObjC++ | |
72de27ea | 978 | ; Documented in common.opt |
e11a4ae5 NB |
979 | |
980 | ; This comment is to ensure we retain the blank line above. |