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