c.opt revision 1.3
1; Options for the C, ObjC, C++ and ObjC++ front ends. 2; Copyright (C) 2003-2015 Free Software Foundation, Inc. 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 3, or (at your option) any later 9; version. 10; 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. 15; 16; You should have received a copy of the GNU General Public License 17; along with GCC; see the file COPYING3. If not see 18; <http://www.gnu.org/licenses/>. 19 20; See the GCC internals manual for a description of this file's format. 21 22; Please try to keep this file in ASCII collating order. 23 24Language 25C 26 27Language 28ObjC 29 30Language 31C++ 32 33Language 34ObjC++ 35 36-all-warnings 37C ObjC C++ ObjC++ Warning Alias(Wall) 38 39-ansi 40C ObjC C++ ObjC++ Alias(ansi) 41 42-assert 43C ObjC C++ ObjC++ Separate Alias(A) MissingArgError(assertion missing after %qs) 44 45-assert= 46C ObjC C++ ObjC++ Joined Alias(A) MissingArgError(assertion missing after %qs) 47 48-comments 49C ObjC C++ ObjC++ Alias(C) 50 51-comments-in-macros 52C ObjC C++ ObjC++ Alias(CC) 53 54-define-macro 55C ObjC C++ ObjC++ Separate Alias(D) MissingArgError(macro name missing after %qs) 56 57-define-macro= 58C ObjC C++ ObjC++ Joined Alias(D) MissingArgError(macro name missing after %qs) 59 60-dependencies 61C ObjC C++ ObjC++ Alias(M) 62 63-dump 64C ObjC C++ ObjC++ Separate Alias(d) 65 66-dump= 67C ObjC C++ ObjC++ Joined Alias(d) 68 69-imacros 70C ObjC C++ ObjC++ Separate Alias(imacros) MissingArgError(missing filename after %qs) 71 72-imacros= 73C ObjC C++ ObjC++ Joined Alias(imacros) MissingArgError(missing filename after %qs) 74 75-include 76C ObjC C++ ObjC++ Separate Alias(include) MissingArgError(missing filename after %qs) 77 78-include= 79C ObjC C++ ObjC++ Joined Alias(include) MissingArgError(missing filename after %qs) 80 81-include-barrier 82C ObjC C++ ObjC++ Alias(I, -) 83 84-include-directory 85C ObjC C++ ObjC++ Separate Alias(I) MissingArgError(missing path after %qs) 86 87-include-directory= 88C ObjC C++ ObjC++ Joined Alias(I) MissingArgError(missing path after %qs) 89 90-include-directory-after 91C ObjC C++ ObjC++ Separate Alias(idirafter) MissingArgError(missing path after %qs) 92 93-include-directory-after= 94C ObjC C++ ObjC++ Joined Alias(idirafter) MissingArgError(missing path after %qs) 95 96-include-prefix 97C ObjC C++ ObjC++ Separate Alias(iprefix) 98 99-include-prefix= 100C ObjC C++ ObjC++ JoinedOrMissing Alias(iprefix) 101 102-include-with-prefix 103C ObjC C++ ObjC++ Separate Alias(iwithprefix) 104 105-include-with-prefix= 106C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix) 107 108-include-with-prefix-after 109C ObjC C++ ObjC++ Separate Alias(iwithprefix) 110 111-include-with-prefix-after= 112C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefix) 113 114-include-with-prefix-before 115C ObjC C++ ObjC++ Separate Alias(iwithprefixbefore) 116 117-include-with-prefix-before= 118C ObjC C++ ObjC++ JoinedOrMissing Alias(iwithprefixbefore) 119 120-no-integrated-cpp 121Driver Alias(no-integrated-cpp) 122 123-no-line-commands 124C ObjC C++ ObjC++ Alias(P) 125 126-no-standard-includes 127C ObjC C++ ObjC++ Alias(nostdinc) 128 129-no-warnings 130C ObjC C++ ObjC++ Alias(w) 131 132-output 133C ObjC C++ ObjC++ Separate Alias(o) 134 135-output= 136C ObjC C++ ObjC++ Joined Alias(o) 137 138-output-pch= 139C ObjC C++ ObjC++ Joined Separate 140 141-pedantic 142C ObjC C++ ObjC++ Alias(pedantic) 143 144-preprocess 145C ObjC C++ ObjC++ Undocumented Alias(E) 146 147-print-missing-file-dependencies 148C ObjC C++ ObjC++ Alias(MG) 149 150-trace-includes 151C ObjC C++ ObjC++ Alias(H) 152 153-traditional 154Driver Alias(traditional) 155 156-traditional-cpp 157C ObjC C++ ObjC++ Alias(traditional-cpp) 158 159-trigraphs 160C ObjC C++ ObjC++ Alias(trigraphs) 161 162-undefine-macro 163C ObjC C++ ObjC++ Separate Alias(U) MissingArgError(macro name missing after %qs) 164 165-undefine-macro= 166C ObjC C++ ObjC++ Joined Alias(U) MissingArgError(macro name missing after %qs) 167 168-user-dependencies 169C ObjC C++ ObjC++ Alias(MM) 170 171-verbose 172Common C ObjC C++ ObjC++ Alias(v) 173 174-write-dependencies 175C ObjC C++ ObjC++ NoDriverArg Separate Alias(MD) MissingArgError(missing filename after %qs) 176 177-write-user-dependencies 178C ObjC C++ ObjC++ NoDriverArg Separate Alias(MMD) MissingArgError(missing filename after %qs) 179 180A 181C ObjC C++ ObjC++ Joined Separate MissingArgError(assertion missing after %qs) 182-A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question> 183 184C 185C ObjC C++ ObjC++ 186Do not discard comments 187 188CC 189C ObjC C++ ObjC++ 190Do not discard comments in macro expansions 191 192D 193C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs) 194-D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1 195 196E 197C ObjC C++ ObjC++ Undocumented Var(flag_preprocess_only) 198 199F 200Driver C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 201-F <dir> Add <dir> to the end of the main framework include path 202 203H 204C ObjC C++ ObjC++ 205Print the name of header files as they are used 206 207I 208C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 209-I <dir> Add <dir> to the end of the main include path 210 211M 212C ObjC C++ ObjC++ 213Generate make dependencies 214 215MD 216C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs) 217Generate make dependencies and compile 218 219MF 220C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs) 221-MF <file> Write dependency output to the given file 222 223MG 224C ObjC C++ ObjC++ 225Treat missing header files as generated files 226 227MM 228C ObjC C++ ObjC++ 229Like -M but ignore system header files 230 231MMD 232C ObjC C++ ObjC++ NoDriverArg Separate MissingArgError(missing filename after %qs) 233Like -MD but ignore system header files 234 235MP 236C ObjC C++ ObjC++ 237Generate phony targets for all headers 238 239MQ 240C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs) 241-MQ <target> Add a MAKE-quoted target 242 243MT 244C ObjC C++ ObjC++ Joined Separate MissingArgError(missing makefile target after %qs) 245-MT <target> Add an unquoted target 246 247P 248C ObjC C++ ObjC++ 249Do not generate #line directives 250 251U 252C ObjC C++ ObjC++ Joined Separate MissingArgError(macro name missing after %qs) 253-U<macro> Undefine <macro> 254 255Wabi 256C ObjC C++ ObjC++ LTO Var(warn_abi) Warning 257Warn about things that will change when compiling with an ABI-compliant compiler 258 259Wabi= 260C ObjC C++ ObjC++ LTO Joined RejectNegative UInteger Warning 261Warn about things that change between the current -fabi-version and the specified version 262 263Wabi-tag 264C++ ObjC++ Var(warn_abi_tag) Warning 265Warn if a subobject has an abi_tag attribute that the complete object type does not have 266 267Wpsabi 268C ObjC C++ ObjC++ LTO Var(warn_psabi) Init(1) Undocumented LangEnabledBy(C ObjC C++ ObjC++,Wabi) 269 270Waddress 271C ObjC C++ ObjC++ Var(warn_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 272Warn about suspicious uses of memory addresses 273 274Wall 275C ObjC C++ ObjC++ Warning 276Enable most warning messages 277 278Warray-bounds 279LangEnabledBy(C ObjC C++ ObjC++,Wall) 280; in common.opt 281 282Warray-bounds= 283LangEnabledBy(C ObjC C++ ObjC++,Wall,1,0) 284; in common.opt 285 286Wassign-intercept 287ObjC ObjC++ Var(warn_assign_intercept) Warning 288Warn whenever an Objective-C assignment is being intercepted by the garbage collector 289 290Wbad-function-cast 291C ObjC Var(warn_bad_function_cast) Warning 292Warn about casting functions to incompatible types 293 294Wbool-compare 295C ObjC C++ ObjC++ Var(warn_bool_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 296Warn about boolean expression compared with an integer value different from true/false 297 298Wbuiltin-macro-redefined 299C ObjC C++ ObjC++ CPP(warn_builtin_macro_redefined) CppReason(CPP_W_BUILTIN_MACRO_REDEFINED) Var(cpp_warn_builtin_macro_redefined) Init(1) Warning 300Warn when a built-in preprocessor macro is undefined or redefined 301 302Wc90-c99-compat 303C ObjC CPP(cpp_warn_c90_c99_compat) CppReason(CPP_W_C90_C99_COMPAT) Var(warn_c90_c99_compat) Init(-1) Warning 304Warn about features not present in ISO C90, but present in ISO C99 305 306Wc99-c11-compat 307C ObjC Var(warn_c99_c11_compat) Init(-1) Warning 308Warn about features not present in ISO C99, but present in ISO C11 309 310Wc++-compat 311C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPERATOR_NAMES) Init(0) Warning 312Warn about C constructs that are not in the common subset of C and C++ 313 314Wc++0x-compat 315C++ ObjC++ Var(warn_cxx0x_compat) Warning LangEnabledBy(C++ ObjC++,Wall) 316Deprecated in favor of -Wc++11-compat 317 318Wc++11-compat 319C++ ObjC++ Warning Alias(Wc++0x-compat) 320Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011 321 322Wc++14-compat 323C++ ObjC++ Var(warn_cxx14_compat) Warning LangEnabledBy(C++ ObjC++,Wall) 324Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014 325 326Wcast-qual 327C ObjC C++ ObjC++ Var(warn_cast_qual) Warning 328Warn about casts which discard qualifiers 329 330Wchar-subscripts 331C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 332Warn about subscripts whose type is \"char\" 333 334Wchkp 335C ObjC C++ ObjC++ Var(warn_chkp) Warning EnabledBy(Wall) 336Warn about memory access errors found by Pointer Bounds Checker 337 338Wclobbered 339C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra) 340Warn about variables that might be changed by \"longjmp\" or \"vfork\" 341 342Wcomment 343C ObjC C++ ObjC++ CPP(warn_comments) CppReason(CPP_W_COMMENTS) Var(cpp_warn_comment) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 344Warn about possibly nested block comments, and C++ comments spanning more than one physical line 345 346Wcomments 347C ObjC C++ ObjC++ Warning Alias(Wcomment) 348Synonym for -Wcomment 349 350Wconditionally-supported 351C++ ObjC++ Var(warn_conditionally_supported) Warning 352Warn for conditionally-supported constructs 353 354Wconversion 355C ObjC C++ ObjC++ Var(warn_conversion) Warning 356Warn for implicit type conversions that may change a value 357 358Wconversion-null 359C++ ObjC++ Var(warn_conversion_null) Init(1) Warning 360Warn for converting NULL from/to a non-pointer type 361 362Wcpp 363C ObjC C++ ObjC++ CppReason(CPP_W_WARNING_DIRECTIVE) 364; Documented in common.opt 365 366Wctor-dtor-privacy 367C++ ObjC++ Var(warn_ctor_dtor_privacy) Warning 368Warn when all constructors and destructors are private 369 370Wdate-time 371C ObjC C++ ObjC++ CPP(warn_date_time) CppReason(CPP_W_DATE_TIME) Var(cpp_warn_date_time) Init(0) Warning 372Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage 373 374Wdeclaration-after-statement 375C ObjC Var(warn_declaration_after_statement) Init(-1) Warning 376Warn when a declaration is found after a statement 377 378Wdelete-incomplete 379C++ ObjC++ Var(warn_delete_incomplete) Init(1) Warning 380Warn when deleting a pointer to incomplete type 381 382Wdelete-non-virtual-dtor 383C++ ObjC++ Var(warn_delnonvdtor) Warning LangEnabledBy(C++ ObjC++,Wall || Weffc++) 384Warn about deleting polymorphic objects with non-virtual destructors 385 386Wdeprecated 387C C++ ObjC ObjC++ CPP(cpp_warn_deprecated) CppReason(CPP_W_DEPRECATED) Var(warn_deprecated) Init(1) Warning 388Warn if a deprecated compiler feature, class, method, or field is used 389 390Wdesignated-init 391C ObjC Var(warn_designated_init) Init(1) Warning 392Warn about positional initialization of structs requiring designated initializers 393 394Wdiscarded-array-qualifiers 395C ObjC Var(warn_discarded_array_qualifiers) Init(1) Warning 396Warn if qualifiers on arrays which are pointer targets are discarded 397 398Wdiscarded-qualifiers 399C ObjC Var(warn_discarded_qualifiers) Init(1) Warning 400Warn if type qualifiers on pointers are discarded 401 402Wdiv-by-zero 403C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning 404Warn about compile-time integer division by zero 405 406Weffc++ 407C++ ObjC++ Var(warn_ecpp) Warning 408Warn about violations of Effective C++ style rules 409 410Wempty-body 411C ObjC C++ ObjC++ Var(warn_empty_body) Warning EnabledBy(Wextra) 412Warn about an empty body in an if or else statement 413 414Wendif-labels 415C ObjC C++ ObjC++ CPP(warn_endif_labels) CppReason(CPP_W_ENDIF_LABELS) Var(cpp_warn_endif_labels) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic) 416Warn about stray tokens after #elif and #endif 417 418Wenum-compare 419C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning LangEnabledBy(C ObjC,Wall || Wc++-compat) 420Warn about comparison of different enum types 421 422Werror 423C ObjC C++ ObjC++ 424; Documented in common.opt 425 426Werror-implicit-function-declaration 427C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration) 428This switch is deprecated; use -Werror=implicit-function-declaration instead 429 430Wfloat-conversion 431C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion) 432Warn for implicit type conversions that cause loss of floating point precision 433 434Wfloat-equal 435C ObjC C++ ObjC++ Var(warn_float_equal) Warning 436Warn if testing floating point numbers for equality 437 438Wformat 439C ObjC C++ ObjC++ Warning Alias(Wformat=, 1, 0) 440Warn about printf/scanf/strftime/strfmon format string anomalies 441 442Wformat-contains-nul 443C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0) 444Warn about format strings that contain NUL bytes 445 446Wformat-extra-args 447C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0) 448Warn if passing too many arguments to a function for its format string 449 450Wformat-nonliteral 451C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) 452Warn about format strings that are not literals 453 454Wformat-security 455C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) 456Warn about possible security problems with format functions 457 458Wformat-signedness 459C ObjC C++ ObjC++ Var(warn_format_signedness) Warning 460Warn about sign differences with format functions 461 462Wformat-y2k 463C ObjC C++ ObjC++ Var(warn_format_y2k) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 2, 0) 464Warn about strftime formats yielding 2-digit years 465 466Wformat-zero-length 467C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 1, 0) 468Warn about zero-length formats 469 470Wformat= 471C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) 472Warn about printf/scanf/strftime/strfmon format string anomalies 473 474Wignored-qualifiers 475C C++ Var(warn_ignored_qualifiers) Warning EnabledBy(Wextra) 476Warn whenever type qualifiers are ignored. 477 478Wincompatible-pointer-types 479C ObjC Var(warn_incompatible_pointer_types) Init(1) Warning 480Warn when there is a conversion between pointers that have incompatible types 481 482Winit-self 483C ObjC C++ ObjC++ Var(warn_init_self) Warning LangEnabledBy(C++ ObjC++,Wall) 484Warn about variables which are initialized to themselves 485 486Wimplicit 487C ObjC Var(warn_implicit) Warning LangEnabledBy(C ObjC,Wall) 488Warn about implicit declarations 489 490Wdouble-promotion 491C ObjC C++ ObjC++ Var(warn_double_promotion) Warning 492Warn about implicit conversions from \"float\" to \"double\" 493 494Wimplicit-function-declaration 495C ObjC Var(warn_implicit_function_declaration) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit) 496Warn about implicit function declarations 497 498Wimplicit-int 499C ObjC Var(warn_implicit_int) Init(-1) Warning LangEnabledBy(C ObjC,Wimplicit) 500Warn when a declaration does not specify a type 501 502Wimport 503C ObjC C++ ObjC++ Undocumented Ignore 504 505Winherited-variadic-ctor 506C++ ObjC++ Var(warn_inh_var_ctor) Init(1) Warning 507Warn about C++11 inheriting constructors when the base has a variadic constructor 508 509Wint-conversion 510C ObjC Var(warn_int_conversion) Init(1) Warning 511Warn about incompatible integer to pointer and pointer to integer conversions 512 513Wint-to-pointer-cast 514C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning 515Warn when there is a cast to a pointer from an integer of a different size 516 517Winvalid-offsetof 518C++ ObjC++ Var(warn_invalid_offsetof) Init(1) Warning 519Warn about invalid uses of the \"offsetof\" macro 520 521Winvalid-pch 522C ObjC C++ ObjC++ CPP(warn_invalid_pch) CppReason(CPP_W_INVALID_PCH) Var(cpp_warn_invalid_pch) Init(0) Warning 523Warn about PCH files that are found but not used 524 525Wjump-misses-init 526C ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C ObjC,Wc++-compat) 527Warn when a jump misses a variable initialization 528 529Wliteral-suffix 530C++ ObjC++ CPP(warn_literal_suffix) CppReason(CPP_W_LITERAL_SUFFIX) Var(cpp_warn_literal_suffix) Init(1) Warning 531Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore. 532 533Wlogical-op 534C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning 535Warn when a logical operator is suspiciously always evaluating to true or false 536 537Wlogical-not-parentheses 538C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 539Warn when logical not is used on the left hand side operand of a comparison 540 541Wlong-long 542C ObjC C++ ObjC++ CPP(cpp_warn_long_long) CppReason(CPP_W_LONG_LONG) Var(warn_long_long) Init(-1) Warning LangEnabledBy(C ObjC,Wc90-c99-compat) 543Do not warn about using \"long long\" when -pedantic 544 545Wmain 546C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning LangEnabledBy(C ObjC,Wall, 2, 0) 547Warn about suspicious declarations of \"main\" 548 549Wmain 550LangEnabledBy(C ObjC C++ ObjC++,Wpedantic, 2, 0) 551; 552 553Wmemset-transposed-args 554C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 555Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not 556 557Wmissing-braces 558C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall) 559Warn about possibly missing braces around initializers 560 561Wmissing-declarations 562C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning 563Warn about global functions without previous declarations 564 565Wmissing-field-initializers 566C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra) 567Warn about missing fields in struct initializers 568 569Wsized-deallocation 570C++ ObjC++ Var(warn_sized_deallocation) Warning EnabledBy(Wextra) 571Warn about missing sized deallocation functions 572 573Wsizeof-pointer-memaccess 574C ObjC C++ ObjC++ Var(warn_sizeof_pointer_memaccess) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 575Warn about suspicious length parameters to certain string functions if the argument uses sizeof 576 577Wsizeof-array-argument 578C ObjC C++ ObjC++ Var(warn_sizeof_array_argument) Warning Init(1) 579Warn when sizeof is applied on a parameter declared as an array 580 581Wsuggest-attribute=format 582C ObjC C++ ObjC++ Var(warn_suggest_attribute_format) Warning 583Warn about functions which might be candidates for format attributes 584 585Wsuggest-override 586C++ ObjC++ Var(warn_override) Warning 587Suggest that the override keyword be used when the declaration of a virtual 588function overrides another. 589 590Wswitch 591C ObjC C++ ObjC++ Var(warn_switch) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 592Warn about enumerated switches, with no default, missing a case 593 594Wswitch-default 595C ObjC C++ ObjC++ Var(warn_switch_default) Warning 596Warn about enumerated switches missing a \"default:\" statement 597 598Wswitch-enum 599C ObjC C++ ObjC++ Var(warn_switch_enum) Warning 600Warn about all enumerated switches missing a specific case 601 602Wswitch-bool 603C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1) 604Warn about switches with boolean controlling expression 605 606Wmissing-format-attribute 607C ObjC C++ ObjC++ Alias(Wsuggest-attribute=format) 608; 609 610Wmissing-include-dirs 611C ObjC C++ ObjC++ CPP(warn_missing_include_dirs) CppReason(CPP_W_MISSING_INCLUDE_DIRS) Var(cpp_warn_missing_include_dirs) Init(0) Warning 612Warn about user-specified include directories that do not exist 613 614Wmissing-parameter-type 615C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra) 616Warn about function parameters declared without a type specifier in K&R-style functions 617 618Wmissing-prototypes 619C ObjC Var(warn_missing_prototypes) Warning 620Warn about global functions without prototypes 621 622Wmudflap 623C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 624 625Wmultichar 626C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_multichar) Init(0) Warning 627Warn about use of multi-character character constants 628 629Wnarrowing 630C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++0x-compat) 631Warn about narrowing conversions within { } that are ill-formed in C++11 632 633Wnested-externs 634C ObjC Var(warn_nested_externs) Warning 635Warn about \"extern\" declarations not at file scope 636 637Wnoexcept 638C++ ObjC++ Var(warn_noexcept) Warning 639Warn when a noexcept expression evaluates to false even though the expression can't actually throw 640 641Wnon-template-friend 642C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning 643Warn when non-templatized friend functions are declared within a template 644 645Wnon-virtual-dtor 646C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++) 647Warn about non-virtual destructors 648 649Wnonnull 650C ObjC C++ ObjC++ Var(warn_nonnull) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=,warn_format >= 1,0) 651Warn about NULL being passed to argument slots marked as requiring non-NULL 652 653Wnonnull 654C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall) 655; 656 657Wnormalized 658C ObjC C++ ObjC++ Alias(Wnormalized=,nfc,none) 659; 660 661Wnormalized= 662C ObjC C++ ObjC++ RejectNegative Joined Warning CPP(warn_normalize) CppReason(CPP_W_NORMALIZE) Init(normalized_C) Var(cpp_warn_normalize) Enum(cpp_normalize_level) 663-Wnormalized=<none|id|nfc|nfkc> Warn about non-normalised Unicode strings 664 665; Required for these enum values. 666SourceInclude 667cpplib.h 668 669Enum 670Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized) 671 672EnumValue 673Enum(cpp_normalize_level) String(none) Value(normalized_none) 674 675EnumValue 676Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC) 677 678EnumValue 679Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C) 680 681EnumValue 682Enum(cpp_normalize_level) String(nfc) Value(normalized_C) 683 684Wold-style-cast 685C++ ObjC++ Var(warn_old_style_cast) Warning 686Warn if a C-style cast is used in a program 687 688Wold-style-declaration 689C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra) 690Warn for obsolescent usage in a declaration 691 692Wold-style-definition 693C ObjC Var(warn_old_style_definition) Warning 694Warn if an old-style parameter definition is used 695 696Wopenmp-simd 697C C++ Var(warn_openmp_simd) Warning LangEnabledBy(C C++,Wall) 698Warn if a simd directive is overridden by the vectorizer cost model 699 700Woverlength-strings 701C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic) 702Warn if a string is longer than the maximum portable length specified by the standard 703 704Woverloaded-virtual 705C++ ObjC++ Var(warn_overloaded_virtual) Warning 706Warn about overloaded virtual function names 707 708Woverride-init 709C ObjC Var(warn_override_init) Warning EnabledBy(Wextra) 710Warn about overriding initializers without side effects 711 712Wpacked-bitfield-compat 713C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning 714Warn about packed bit-fields whose offset changed in GCC 4.4 715 716Wparentheses 717C ObjC C++ ObjC++ Var(warn_parentheses) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 718Warn about possibly missing parentheses 719 720Wpedantic 721C ObjC C++ ObjC++ CPP(cpp_pedantic) CppReason(CPP_W_PEDANTIC) Warning 722; Documented in common.opt 723 724Wpmf-conversions 725C++ ObjC++ Var(warn_pmf2ptr) Init(1) Warning 726Warn when converting the type of pointers to member functions 727 728Wpointer-arith 729C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic) 730Warn about function pointer arithmetic 731 732Wpointer-sign 733C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic) 734Warn when a pointer differs in signedness in an assignment 735 736Wpointer-to-int-cast 737C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning 738Warn when a pointer is cast to an integer of a different size 739 740Wpragmas 741C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning 742Warn about misuses of pragmas 743 744Wproperty-assign-default 745ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning 746Warn if a property for an Objective-C object has no assign semantics specified 747 748Wprotocol 749ObjC ObjC++ Var(warn_protocol) Init(1) Warning 750Warn if inherited methods are unimplemented 751 752Wredundant-decls 753C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning 754Warn about multiple declarations of the same object 755 756Wreorder 757C++ ObjC++ Var(warn_reorder) Warning LangEnabledBy(C++ ObjC++,Wall) 758Warn when the compiler reorders code 759 760Wreturn-type 761C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 762Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++) 763 764Wselector 765ObjC ObjC++ Var(warn_selector) Warning 766Warn if a selector has multiple methods 767 768Wsequence-point 769C ObjC C++ ObjC++ Var(warn_sequence_point) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 770Warn about possible violations of sequence point rules 771 772Wshadow-ivar 773ObjC ObjC++ Var(warn_shadow_ivar) EnabledBy(Wshadow) Init(1) Warning 774Warn if a local declaration hides an instance variable 775 776Wshift-count-negative 777C ObjC C++ ObjC++ Var(warn_shift_count_negative) Init(1) Warning 778Warn if shift count is negative 779 780Wshift-count-overflow 781C ObjC C++ ObjC++ Var(warn_shift_count_overflow) Init(1) Warning 782Warn if shift count >= width of type 783 784Wsign-compare 785C ObjC C++ ObjC++ Var(warn_sign_compare) Warning LangEnabledBy(C++ ObjC++,Wall) 786Warn about signed-unsigned comparisons 787 788Wsign-compare 789C ObjC C++ ObjC++ EnabledBy(Wextra) 790; 791 792Wsign-conversion 793C ObjC C++ ObjC++ Var(warn_sign_conversion) LangEnabledBy(C ObjC,Wconversion) 794Warn for implicit type conversions between signed and unsigned integers 795 796Wsign-promo 797C++ ObjC++ Var(warn_sign_promo) Warning 798Warn when overload promotes from unsigned to signed 799 800Wstrict-null-sentinel 801C++ ObjC++ Warning Var(warn_strict_null_sentinel) 802Warn about uncasted NULL used as sentinel 803 804Wstrict-prototypes 805C ObjC Var(warn_strict_prototypes) Warning 806Warn about unprototyped function declarations 807 808Wstrict-aliasing= 809C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0) 810; 811 812Wstrict-overflow= 813C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) 814; 815 816Wstrict-selector-match 817ObjC ObjC++ Var(warn_strict_selector_match) Warning 818Warn if type signatures of candidate methods do not match exactly 819 820Wsync-nand 821C C++ Var(warn_sync_nand) Init(1) Warning 822Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used 823 824Wsynth 825C++ ObjC++ Var(warn_synth) Warning 826Deprecated. This switch has no effect 827 828Wsystem-headers 829C ObjC C++ ObjC++ Warning 830; Documented in common.opt 831 832Wtraditional 833C ObjC CPP(cpp_warn_traditional) CppReason(CPP_W_TRADITIONAL) Var(warn_traditional) Init(0) Warning 834Warn about features not present in traditional C 835 836Wtraditional-conversion 837C ObjC Var(warn_traditional_conversion) Warning 838Warn of prototypes causing type conversions different from what would happen in the absence of prototype 839 840Wtrigraphs 841C ObjC C++ ObjC++ CPP(warn_trigraphs) CppReason(CPP_W_TRIGRAPHS) Var(cpp_warn_trigraphs) Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 842Warn if trigraphs are encountered that might affect the meaning of the program 843 844Wundeclared-selector 845ObjC ObjC++ Var(warn_undeclared_selector) Warning 846Warn about @selector()s without previously declared methods 847 848Wundef 849C ObjC C++ ObjC++ CPP(warn_undef) CppReason(CPP_W_UNDEF) Var(cpp_warn_undef) Init(0) Warning 850Warn if an undefined macro is used in an #if directive 851 852Wuninitialized 853C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall) 854; 855 856Wmaybe-uninitialized 857C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall) 858; 859 860Wunknown-pragmas 861C ObjC C++ ObjC++ Warning Var(warn_unknown_pragmas) LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) 862Warn about unrecognized pragmas 863 864Wunsuffixed-float-constants 865C ObjC Var(warn_unsuffixed_float_constants) Warning 866Warn about unsuffixed float constants 867 868Wunused 869C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall) 870; documented in common.opt 871 872Wunused-local-typedefs 873C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused) 874Warn when typedefs locally defined in a function are not used 875 876Wunused-macros 877C ObjC C++ ObjC++ CppReason(CPP_W_UNUSED_MACROS) Var(cpp_warn_unused_macros) Warning 878Warn about macros defined in the main file that are not used 879 880Wunused-result 881C ObjC C++ ObjC++ Var(warn_unused_result) Init(1) Warning 882Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value 883 884Wvariadic-macros 885C ObjC C++ ObjC++ CPP(warn_variadic_macros) CppReason(CPP_W_VARIADIC_MACROS) Var(cpp_warn_variadic_macros) Init(0) Warning LangEnabledBy(C ObjC C++ ObjC++,Wpedantic || Wtraditional) 886Warn about using variadic macros 887 888Wvarargs 889C ObjC C++ ObjC++ Warning Var(warn_varargs) Init(1) 890Warn about questionable usage of the macros used to retrieve variable arguments 891 892Wvla 893C ObjC C++ ObjC++ Var(warn_vla) Init(-1) Warning 894Warn if a variable length array is used 895 896Wvolatile-register-var 897C ObjC C++ ObjC++ Var(warn_volatile_register_var) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) 898Warn when a register variable is declared volatile 899 900Wvirtual-move-assign 901C++ ObjC++ Var(warn_virtual_move_assign) Warning Init(1) 902Warn if a virtual base has a non-trivial move assignment operator 903 904Wwrite-strings 905C ObjC C++ ObjC++ Var(warn_write_strings) Warning 906In 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. 907 908Wzero-as-null-pointer-constant 909C++ ObjC++ Var(warn_zero_as_null_pointer_constant) Warning 910Warn when a literal '0' is used as null pointer 911 912Wuseless-cast 913C++ ObjC++ Var(warn_useless_cast) Warning 914Warn about useless casts 915 916ansi 917C ObjC C++ ObjC++ 918A synonym for -std=c89 (for C) or -std=c++98 (for C++) 919 920; This should really just be C++/ObjC++ but we (NetBSD) use it when 921; calling C and ObjC compilers as well. 922cxx-isystem 923C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 924-cxx-isystem <dir> Add <dir> to the start of the C++ system include path 925 926d 927C ObjC C++ ObjC++ Joined 928; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD? 929 930fabi-compat-version= 931C++ ObjC++ Joined RejectNegative UInteger Var(flag_abi_compat_version) Init(-1) 932The version of the C++ ABI used for -Wabi warnings and link compatibility aliases 933 934faccess-control 935C++ ObjC++ Var(flag_access_control) Init(1) 936Enforce class member access control semantics 937 938fada-spec-parent= 939C ObjC C++ ObjC++ RejectNegative Joined Var(ada_specs_parent) 940-fada-spec-parent=unit Dump Ada specs as child units of given parent 941 942fall-virtual 943C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 944 945fallow-parameterless-variadic-functions 946C ObjC Var(flag_allow_parameterless_variadic_functions) 947Allow variadic functions without named parameter 948 949falt-external-templates 950C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 951No longer supported 952 953fasm 954C ObjC C++ ObjC++ Var(flag_no_asm, 0) 955Recognize the \"asm\" keyword 956 957; Define extra predefined macros for use in libgcc. 958fbuilding-libgcc 959C ObjC C++ ObjC++ Undocumented Var(flag_building_libgcc) 960 961fbuiltin 962C ObjC C++ ObjC++ Var(flag_no_builtin, 0) 963Recognize built-in functions 964 965fbuiltin- 966C ObjC C++ ObjC++ Joined 967 968fcanonical-system-headers 969C ObjC C++ ObjC++ 970Where shorter, use canonicalized paths to systems headers. 971 972fcheck-pointer-bounds 973C ObjC C++ ObjC++ LTO Report Var(flag_check_pointer_bounds) 974Add Pointer Bounds Checker instrumentation. fchkp-* flags are used to 975control instrumentation. Currently available for C, C++ and ObjC. 976 977fchkp-check-incomplete-type 978C ObjC C++ ObjC++ LTO Report Var(flag_chkp_incomplete_type) Init(1) 979Generate pointer bounds checks for variables with incomplete type 980 981fchkp-zero-input-bounds-for-main 982C ObjC C++ ObjC++ LTO Report Var(flag_chkp_zero_input_bounds_for_main) Init(0) 983Use zero bounds for all incoming arguments in 'main' function. It helps when 984instrumented binaries are used with legacy libs. 985 986fchkp-first-field-has-own-bounds 987C ObjC C++ ObjC++ LTO RejectNegative Report Var(flag_chkp_first_field_has_own_bounds) 988Forces Pointer Bounds Checker to use narrowed bounds for address of the first 989field in the structure. By default pointer to the first field has the same 990bounds as pointer to the whole structure. 991 992fchkp-narrow-bounds 993C ObjC C++ ObjC++ LTO Report Var(flag_chkp_narrow_bounds) Init(1) 994Control how Pointer Bounds Checker handle pointers to object fields. When 995narrowing is on, field bounds are used. Otherwise full object bounds are used. 996 997fchkp-narrow-to-innermost-array 998C ObjC C++ ObjC++ LTO RejectNegative Report Var(flag_chkp_narrow_to_innermost_arrray) 999Forces Pointer Bounds Checker to use bounds of the innermost arrays in case of 1000nested static arryas access. By default outermost array is used. 1001 1002fchkp-optimize 1003C ObjC C++ ObjC++ LTO Report Var(flag_chkp_optimize) Init(-1) 1004Allow Pointer Bounds Checker optimizations. By default allowed 1005on optimization levels >0. 1006 1007fchkp-use-fast-string-functions 1008C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_fast_string_functions) Init(0) 1009Allow to use *_nobnd versions of string functions by Pointer Bounds Checker. 1010 1011fchkp-use-nochk-string-functions 1012C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_nochk_string_functions) Init(0) 1013Allow to use *_nochk versions of string functions by Pointer Bounds Checker. 1014 1015fchkp-use-static-bounds 1016C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_static_bounds) Init(1) 1017Use statically initialized variable for vars bounds instead of 1018generating them each time it is required. 1019 1020fchkp-use-static-const-bounds 1021C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_static_const_bounds) Init(-1) 1022Use statically initialized variable for constant bounds instead of 1023generating them each time it is required. 1024 1025fchkp-treat-zero-dynamic-size-as-infinite 1026C ObjC C++ ObjC++ LTO Report Var(flag_chkp_zero_dynamic_size_as_infinite) Init(0) 1027With this option zero size obtained dynamically for objects with 1028incomplete type will be treated as infinite. 1029 1030fchkp-check-read 1031C ObjC C++ ObjC++ LTO Report Var(flag_chkp_check_read) Init(1) 1032Generate checks for all read accesses to memory. 1033 1034fchkp-check-write 1035C ObjC C++ ObjC++ LTO Report Var(flag_chkp_check_write) Init(1) 1036Generate checks for all write accesses to memory. 1037 1038fchkp-store-bounds 1039C ObjC C++ ObjC++ LTO Report Var(flag_chkp_store_bounds) Init(1) 1040Generate bounds stores for pointer writes. 1041 1042fchkp-instrument-calls 1043C ObjC C++ ObjC++ LTO Report Var(flag_chkp_instrument_calls) Init(1) 1044Generate bounds passing for calls. 1045 1046fchkp-instrument-marked-only 1047C ObjC C++ ObjC++ LTO Report Var(flag_chkp_instrument_marked_only) Init(0) 1048Instrument only functions marked with bnd_instrument attribute. 1049 1050fchkp-use-wrappers 1051C ObjC C++ ObjC++ LTO Report Var(flag_chkp_use_wrappers) Init(1) 1052Transform instrumented builtin calls into calls to wrappers. 1053 1054static-libmpx 1055Driver 1056 1057static-libmpxwrappers 1058Driver 1059 1060fcilkplus 1061C ObjC C++ ObjC++ LTO Report Var(flag_cilkplus) Init(0) 1062Enable Cilk Plus 1063 1064fcond-mismatch 1065C ObjC C++ ObjC++ 1066Allow the arguments of the '?' operator to have different types 1067 1068fconserve-space 1069C++ ObjC++ Var(flag_conserve_space) 1070Does nothing. Preserved for backward compatibility. 1071 1072fconstant-string-class= 1073ObjC ObjC++ Joined MissingArgError(no class name specified with %qs) 1074-fconst-string-class=<name> Use class <name> for constant strings 1075 1076fconstexpr-depth= 1077C++ ObjC++ Joined RejectNegative UInteger Var(max_constexpr_depth) Init(512) 1078-fconstexpr-depth=<number> Specify maximum constexpr recursion depth 1079 1080fdebug-cpp 1081C ObjC C++ ObjC++ 1082Emit debug annotations during preprocessing 1083 1084fdeduce-init-list 1085C++ ObjC++ Var(flag_deduce_init_list) Init(0) 1086-fdeduce-init-list enable deduction of std::initializer_list for a template type parameter from a brace-enclosed initializer-list 1087 1088fdeclone-ctor-dtor 1089C++ ObjC++ Var(flag_declone_ctor_dtor) Init(-1) 1090Factor complex constructors and destructors to favor space over speed 1091 1092fdefault-inline 1093C++ ObjC++ Ignore 1094Does nothing. Preserved for backward compatibility. 1095 1096fdirectives-only 1097C ObjC C++ ObjC++ 1098Preprocess directives only. 1099 1100fdollars-in-identifiers 1101C ObjC C++ ObjC++ 1102Permit '$' as an identifier character 1103 1104fdump-ada-spec 1105C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec) 1106Write all declarations as Ada code transitively 1107 1108fdump-ada-spec-slim 1109C ObjC C++ ObjC++ RejectNegative Var(flag_dump_ada_spec_slim) 1110Write all declarations as Ada code for the given file only 1111 1112felide-constructors 1113C++ ObjC++ Var(flag_elide_constructors) Init(1) 1114 1115fenforce-eh-specs 1116C++ ObjC++ Var(flag_enforce_eh_specs) Init(1) 1117Generate code to check exception specifications 1118 1119fenum-int-equiv 1120C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1121 1122fexec-charset= 1123C ObjC C++ ObjC++ Joined RejectNegative 1124-fexec-charset=<cset> Convert all strings and character constants to character set <cset> 1125 1126fextended-identifiers 1127C ObjC C++ ObjC++ 1128Permit universal character names (\\u and \\U) in identifiers 1129 1130finput-charset= 1131C ObjC C++ ObjC++ Joined RejectNegative 1132-finput-charset=<cset> Specify the default character set for source files 1133 1134fextern-tls-init 1135C++ ObjC++ Var(flag_extern_tls_init) Init(-1) 1136Support dynamic initialization of thread-local variables in a different translation unit 1137 1138fexternal-templates 1139C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1140 1141ffor-scope 1142C++ ObjC++ Var(flag_new_for_scope) Init(1) 1143Scope of for-init-statement variables is local to the loop 1144 1145ffreestanding 1146C ObjC C++ ObjC++ 1147Do not assume that standard C libraries and \"main\" exist 1148 1149fgnu-keywords 1150C++ ObjC++ Var(flag_no_gnu_keywords, 0) 1151Recognize GNU-defined keywords 1152 1153fgnu-runtime 1154ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime,0) Init(NEXT_OBJC_RUNTIME) 1155Generate code for GNU runtime environment 1156 1157fgnu89-inline 1158C ObjC Var(flag_gnu89_inline) Init(-1) 1159Use traditional GNU semantics for inline functions 1160 1161fguiding-decls 1162C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1163 1164fhandle-exceptions 1165C++ ObjC++ Optimization Alias(fexceptions) Warn({-fhandle-exceptions has been renamed -fexceptions (and is now on by default)}) 1166 1167fhonor-std 1168C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1169 1170fhosted 1171C ObjC 1172Assume normal C execution environment 1173 1174fhuge-objects 1175C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1176No longer supported 1177 1178fimplement-inlines 1179C++ ObjC++ Var(flag_implement_inlines) Init(1) 1180Export functions even if they can be inlined 1181 1182fimplicit-inline-templates 1183C++ ObjC++ Var(flag_implicit_inline_templates) Init(1) 1184Emit implicit instantiations of inline templates 1185 1186fimplicit-templates 1187C++ ObjC++ Var(flag_implicit_templates) Init(1) 1188Emit implicit instantiations of templates 1189 1190ffriend-injection 1191C++ ObjC++ Var(flag_friend_injection) 1192Inject friend functions into enclosing namespace 1193 1194fkeep-inline-dllexport 1195C C++ ObjC ObjC++ Var(flag_keep_inline_dllexport) Init(1) Report Condition(TARGET_DLLIMPORT_DECL_ATTRIBUTES) 1196Don't emit dllexported inline functions unless needed 1197 1198flabels-ok 1199C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1200 1201flax-vector-conversions 1202C ObjC C++ ObjC++ Var(flag_lax_vector_conversions) 1203Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types. 1204 1205fms-extensions 1206C ObjC C++ ObjC++ Var(flag_ms_extensions) 1207Don't warn about uses of Microsoft extensions 1208 1209fmudflap 1210C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1211 1212fmudflapth 1213C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1214 1215fmudflapir 1216C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1217 1218fname-mangling-version- 1219C++ ObjC++ Joined Ignore Warn(switch %qs is no longer supported) 1220 1221fnew-abi 1222C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1223 1224fnext-runtime 1225ObjC ObjC++ LTO Report RejectNegative Var(flag_next_runtime) 1226Generate code for NeXT (Apple Mac OS X) runtime environment 1227 1228fnil-receivers 1229ObjC ObjC++ Var(flag_nil_receivers) Init(1) 1230Assume that receivers of Objective-C messages may be nil 1231 1232flocal-ivars 1233ObjC ObjC++ Var(flag_local_ivars) Init(1) 1234Allow access to instance variables as if they were local declarations within instance method implementations. 1235 1236fivar-visibility= 1237ObjC ObjC++ Joined RejectNegative Enum(ivar_visibility) Var(default_ivar_visibility) Init(IVAR_VISIBILITY_PROTECTED) 1238-fvisibility=[private|protected|public|package] Set the default symbol visibility 1239 1240Enum 1241Name(ivar_visibility) Type(enum ivar_visibility) UnknownError(unrecognized ivar visibility value %qs) 1242 1243EnumValue 1244Enum(ivar_visibility) String(private) Value(IVAR_VISIBILITY_PRIVATE) 1245 1246EnumValue 1247Enum(ivar_visibility) String(protected) Value(IVAR_VISIBILITY_PROTECTED) 1248 1249EnumValue 1250Enum(ivar_visibility) String(public) Value(IVAR_VISIBILITY_PUBLIC) 1251 1252EnumValue 1253Enum(ivar_visibility) String(package) Value(IVAR_VISIBILITY_PACKAGE) 1254 1255fnonansi-builtins 1256C++ ObjC++ Var(flag_no_nonansi_builtin, 0) 1257 1258fnonnull-objects 1259C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1260 1261fnothrow-opt 1262C++ ObjC++ Optimization Var(flag_nothrow_opt) 1263Treat a throw() exception specification as noexcept to improve code size 1264 1265fobjc-abi-version= 1266ObjC ObjC++ LTO Joined Report RejectNegative UInteger Var(flag_objc_abi) 1267Specify which ABI to use for Objective-C family code and meta-data generation. 1268 1269; Generate special '- .cxx_construct' and '- .cxx_destruct' methods 1270; to initialize any non-POD ivars in Objective-C++ classes. 1271fobjc-call-cxx-cdtors 1272ObjC++ Var(flag_objc_call_cxx_cdtors) 1273Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed 1274 1275fobjc-direct-dispatch 1276ObjC ObjC++ Var(flag_objc_direct_dispatch) 1277Allow fast jumps to the message dispatcher 1278 1279; Nonzero means that we will allow new ObjC exception syntax (@throw, 1280; @try, etc.) in source code. 1281fobjc-exceptions 1282ObjC ObjC++ Var(flag_objc_exceptions) 1283Enable Objective-C exception and synchronization syntax 1284 1285fobjc-gc 1286ObjC ObjC++ LTO Var(flag_objc_gc) 1287Enable garbage collection (GC) in Objective-C/Objective-C++ programs 1288 1289fobjc-nilcheck 1290ObjC ObjC++ Var(flag_objc_nilcheck,1) 1291Enable inline checks for nil receivers with the NeXT runtime and ABI version 2. 1292 1293; Nonzero means that we generate NeXT setjmp based exceptions. 1294fobjc-sjlj-exceptions 1295ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1) 1296Enable Objective-C setjmp exception handling runtime 1297 1298fobjc-std=objc1 1299ObjC ObjC++ Var(flag_objc1_only) 1300Conform to the Objective-C 1.0 language as implemented in GCC 4.0 1301 1302fopenacc 1303C ObjC C++ ObjC++ LTO Var(flag_openacc) 1304Enable OpenACC 1305 1306fopenmp 1307C ObjC C++ ObjC++ LTO Var(flag_openmp) 1308Enable OpenMP (implies -frecursive in Fortran) 1309 1310fopenmp-simd 1311C ObjC C++ ObjC++ Var(flag_openmp_simd) 1312Enable OpenMP's SIMD directives 1313 1314foperator-names 1315C++ ObjC++ 1316Recognize C++ keywords like \"compl\" and \"xor\" 1317 1318foptional-diags 1319C++ ObjC++ Ignore 1320Does nothing. Preserved for backward compatibility. 1321 1322fpch-deps 1323C ObjC C++ ObjC++ 1324 1325fpch-preprocess 1326C ObjC C++ ObjC++ 1327Look for and use PCH files even when preprocessing 1328 1329fpermissive 1330C++ ObjC++ Var(flag_permissive) 1331Downgrade conformance errors to warnings 1332 1333fplan9-extensions 1334C ObjC Var(flag_plan9_extensions) 1335Enable Plan 9 language extensions 1336 1337fpreprocessed 1338C ObjC C++ ObjC++ 1339Treat the input file as already preprocessed 1340 1341ftrack-macro-expansion 1342C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger 1343; converted into ftrack-macro-expansion= 1344 1345ftrack-macro-expansion= 1346C ObjC C++ ObjC++ JoinedOrMissing RejectNegative UInteger 1347-ftrack-macro-expansion=<0|1|2> Track locations of tokens coming from macro expansion and display them in error messages 1348 1349fpretty-templates 1350C++ ObjC++ Var(flag_pretty_templates) Init(1) 1351-fno-pretty-templates Do not pretty-print template specializations as the template signature followed by the arguments 1352 1353freplace-objc-classes 1354ObjC ObjC++ LTO Var(flag_replace_objc_classes) 1355Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime 1356 1357frepo 1358C++ ObjC++ 1359Enable automatic template instantiation 1360 1361frtti 1362C++ ObjC++ Optimization Var(flag_rtti) Init(1) 1363Generate run time type descriptor information 1364 1365fshort-double 1366C ObjC C++ ObjC++ LTO Optimization Var(flag_short_double) 1367Use the same size for double as for float 1368 1369fshort-enums 1370C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums) 1371Use the narrowest integer type possible for enumeration types 1372 1373fshort-wchar 1374C ObjC C++ ObjC++ LTO Optimization Var(flag_short_wchar) 1375Force the underlying type for \"wchar_t\" to be \"unsigned short\" 1376 1377fsigned-bitfields 1378C ObjC C++ ObjC++ Var(flag_signed_bitfields) Init(1) 1379When \"signed\" or \"unsigned\" is not given make the bitfield signed 1380 1381fsigned-char 1382C ObjC C++ ObjC++ LTO Var(flag_signed_char) 1383Make \"char\" signed by default 1384 1385fsized-deallocation 1386C++ ObjC++ Var(flag_sized_deallocation) Init(-1) 1387Enable C++14 sized deallocation support 1388 1389fsquangle 1390C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1391 1392fstats 1393C++ ObjC++ Var(flag_detailed_statistics) 1394Display statistics accumulated during compilation 1395 1396fstrict-enums 1397C++ ObjC++ Optimization Var(flag_strict_enums) 1398Assume that values of enumeration type are always within the minimum range of that type 1399 1400fstrict-prototype 1401C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1402 1403ftabstop= 1404C ObjC C++ ObjC++ Joined RejectNegative UInteger 1405-ftabstop=<number> Distance between tab stops for column reporting 1406 1407ftemplate-backtrace-limit= 1408C++ ObjC++ Joined RejectNegative UInteger Var(template_backtrace_limit) Init(10) 1409Set the maximum number of template instantiation notes for a single warning or error 1410 1411ftemplate-depth- 1412C++ ObjC++ Joined RejectNegative Undocumented Alias(ftemplate-depth=) 1413 1414ftemplate-depth= 1415C++ ObjC++ Joined RejectNegative UInteger 1416-ftemplate-depth=<number> Specify maximum template instantiation depth 1417 1418fthis-is-variable 1419C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1420 1421fthreadsafe-statics 1422C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1) 1423-fno-threadsafe-statics Do not generate thread-safe code for initializing local statics 1424 1425funsigned-bitfields 1426C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0) 1427When \"signed\" or \"unsigned\" is not given make the bitfield unsigned 1428 1429funsigned-char 1430C ObjC C++ ObjC++ LTO Var(flag_signed_char, 0) 1431Make \"char\" unsigned by default 1432 1433fuse-cxa-atexit 1434C++ ObjC++ Var(flag_use_cxa_atexit) Init(DEFAULT_USE_CXA_ATEXIT) 1435Use __cxa_atexit to register destructors 1436 1437fuse-cxa-get-exception-ptr 1438C++ ObjC++ Var(flag_use_cxa_get_exception_ptr) Init(2) 1439Use __cxa_get_exception_ptr in exception handling 1440 1441fvisibility-inlines-hidden 1442C++ ObjC++ 1443Marks all inlined functions and methods as having hidden visibility 1444 1445fvisibility-ms-compat 1446C++ ObjC++ Var(flag_visibility_ms_compat) 1447Changes visibility to match Microsoft Visual Studio by default 1448 1449fvtable-gc 1450C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1451No longer supported 1452 1453fvtable-thunks 1454C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1455No longer supported 1456 1457fweak 1458C++ ObjC++ Var(flag_weak) Init(1) 1459Emit common-like symbols as weak symbols 1460 1461fwide-exec-charset= 1462C ObjC C++ ObjC++ Joined RejectNegative 1463-fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset> 1464 1465fworking-directory 1466C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1) 1467Generate a #line directive pointing at the current working directory 1468 1469fxref 1470C++ ObjC++ Ignore Warn(switch %qs is no longer supported) 1471No longer supported 1472 1473fzero-link 1474ObjC ObjC++ Var(flag_zero_link) 1475Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode 1476 1477gen-decls 1478ObjC ObjC++ Var(flag_gen_declaration) 1479Dump declarations to a .decl file 1480 1481femit-struct-debug-baseonly 1482C ObjC C++ ObjC++ 1483-femit-struct-debug-baseonly Aggressive reduced debug info for structs 1484 1485femit-struct-debug-reduced 1486C ObjC C++ ObjC++ 1487-femit-struct-debug-reduced Conservative reduced debug info for structs 1488 1489femit-struct-debug-detailed= 1490C ObjC C++ ObjC++ Joined 1491-femit-struct-debug-detailed=<spec-list> Detailed reduced debug info for structs 1492 1493fext-numeric-literals 1494C++ ObjC++ 1495Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding 1496number literal rather than a user-defined number literal. 1497 1498idirafter 1499C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 1500-idirafter <dir> Add <dir> to the end of the system include path 1501 1502imacros 1503C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs) 1504-imacros <file> Accept definition of macros in <file> 1505 1506imultilib 1507C ObjC C++ ObjC++ Joined Separate 1508-imultilib <dir> Set <dir> to be the multilib include subdirectory 1509 1510include 1511C ObjC C++ ObjC++ Joined Separate MissingArgError(missing filename after %qs) 1512-include <file> Include the contents of <file> before other files 1513 1514iprefix 1515C ObjC C++ ObjC++ Joined Separate 1516-iprefix <path> Specify <path> as a prefix for next two options 1517 1518isysroot 1519C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 1520-isysroot <dir> Set <dir> to be the system root directory 1521 1522isystem 1523C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 1524-isystem <dir> Add <dir> to the start of the system include path 1525 1526iquote 1527C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 1528-iquote <dir> Add <dir> to the end of the quote include path 1529 1530iremap 1531C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) 1532-iremap <src:dst> Convert <src> to <dst> if it occurs as prefix in __FILE__. 1533 1534iwithprefix 1535C ObjC C++ ObjC++ Joined Separate 1536-iwithprefix <dir> Add <dir> to the end of the system include path 1537 1538iwithprefixbefore 1539C ObjC C++ ObjC++ Joined Separate 1540-iwithprefixbefore <dir> Add <dir> to the end of the main include path 1541 1542lang-asm 1543C Undocumented RejectDriver 1544 1545no-integrated-cpp 1546Driver 1547 1548nostdinc 1549C ObjC C++ ObjC++ 1550Do not search standard system include directories (those specified with -isystem will still be used) 1551 1552nostdinc++ 1553C++ ObjC++ 1554Do not search standard system include directories for C++ 1555 1556o 1557C ObjC C++ ObjC++ Joined Separate 1558; Documented in common.opt 1559 1560pedantic 1561C ObjC C++ ObjC++ Alias(Wpedantic) 1562; Documented in common.opt 1563 1564print-objc-runtime-info 1565ObjC ObjC++ 1566Generate C header of platform-specific features 1567 1568remap 1569C ObjC C++ ObjC++ 1570Remap file names when including files 1571 1572std=c++98 1573C++ ObjC++ 1574Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum 1575 1576std=c++03 1577C++ ObjC++ Alias(std=c++98) 1578Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum 1579 1580std=c++11 1581C++ ObjC++ 1582Conform to the ISO 2011 C++ standard 1583 1584std=c++0x 1585C++ ObjC++ Alias(std=c++11) Undocumented 1586Deprecated in favor of -std=c++11 1587 1588std=c++1y 1589C++ ObjC++ Alias(std=c++14) Undocumented 1590Deprecated in favor of -std=c++14 1591 1592std=c++14 1593C++ ObjC++ Undocumented 1594Conform to the ISO 2014 C++ standard (experimental and incomplete support) 1595 1596std=c++1z 1597C++ ObjC++ 1598Conform to the ISO 2017(?) C++ draft standard (experimental and incomplete support) 1599 1600std=c++17 1601C++ ObjC++ Alias(std=c++1z) Undocumented 1602 1603std=c11 1604C ObjC 1605Conform to the ISO 2011 C standard 1606 1607std=c1x 1608C ObjC Alias(std=c11) 1609Deprecated in favor of -std=c11 1610 1611std=c89 1612C ObjC Alias(std=c90) 1613Conform to the ISO 1990 C standard 1614 1615std=c90 1616C ObjC 1617Conform to the ISO 1990 C standard 1618 1619std=c99 1620C ObjC 1621Conform to the ISO 1999 C standard 1622 1623std=c9x 1624C ObjC Alias(std=c99) 1625Deprecated in favor of -std=c99 1626 1627std=gnu++98 1628C++ ObjC++ 1629Conform to the ISO 1998 C++ standard revised by the 2003 technical 1630corrigendum with GNU extensions 1631 1632std=gnu++03 1633C++ ObjC++ Alias(std=gnu++98) 1634Conform to the ISO 1998 C++ standard revised by the 2003 technical 1635corrigendum with GNU extensions 1636 1637std=gnu++11 1638C++ ObjC++ 1639Conform to the ISO 2011 C++ standard with GNU extensions (experimental and incomplete support) 1640 1641std=gnu++0x 1642C++ ObjC++ Alias(std=gnu++11) 1643Deprecated in favor of -std=gnu++11 1644 1645std=gnu++1y 1646C++ ObjC++ Alias(std=gnu++14) Undocumented 1647 1648std=gnu++14 1649C++ ObjC++ 1650Conform to the ISO 2014 C++ standard with GNU extensions (experimental and incomplete support) 1651 1652std=gnu++1z 1653C++ ObjC++ 1654Conform to the ISO 201z(7?) C++ draft standard with GNU extensions (experimental and incomplete support) 1655 1656std=gnu++17 1657C++ ObjC++ Alias(std=gnu++1z) Undocumented 1658 1659std=gnu11 1660C ObjC 1661Conform to the ISO 2011 C standard with GNU extensions 1662 1663std=gnu1x 1664C ObjC Alias(std=gnu11) 1665Deprecated in favor of -std=gnu11 1666 1667std=gnu89 1668C ObjC Alias(std=gnu90) 1669Conform to the ISO 1990 C standard with GNU extensions 1670 1671std=gnu90 1672C ObjC 1673Conform to the ISO 1990 C standard with GNU extensions 1674 1675std=gnu99 1676C ObjC 1677Conform to the ISO 1999 C standard with GNU extensions 1678 1679std=gnu9x 1680C ObjC Alias(std=gnu99) 1681Deprecated in favor of -std=gnu99 1682 1683std=iso9899:1990 1684C ObjC Alias(std=c90) 1685Conform to the ISO 1990 C standard 1686 1687std=iso9899:199409 1688C ObjC 1689Conform to the ISO 1990 C standard as amended in 1994 1690 1691std=iso9899:1999 1692C ObjC Alias(std=c99) 1693Conform to the ISO 1999 C standard 1694 1695std=iso9899:199x 1696C ObjC Alias(std=c99) 1697Deprecated in favor of -std=iso9899:1999 1698 1699std=iso9899:2011 1700C ObjC Alias(std=c11) 1701Conform to the ISO 2011 C standard 1702 1703traditional 1704Driver 1705 1706traditional-cpp 1707C ObjC C++ ObjC++ 1708Enable traditional preprocessing 1709 1710trigraphs 1711C ObjC C++ ObjC++ 1712-trigraphs Support ISO C trigraphs 1713 1714undef 1715C ObjC C++ ObjC++ Var(flag_undef) 1716Do not predefine system-specific and GCC-specific macros 1717 1718v 1719C ObjC C++ ObjC++ 1720; Documented in common.opt 1721 1722w 1723C ObjC C++ ObjC++ 1724; Documented in common.opt 1725 1726; This comment is to ensure we retain the blank line above. 1727