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