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