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