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