c.opt revision 132718
11539Srgrimes; Options for the C, ObjC, C++ and ObjC++ front ends. 21539Srgrimes; Copyright (C) 2003 Free Software Foundation, Inc. 31539Srgrimes; 41539Srgrimes; This file is part of GCC. 51539Srgrimes; 61539Srgrimes; GCC is free software; you can redistribute it and/or modify it under 71539Srgrimes; the terms of the GNU General Public License as published by the Free 81539Srgrimes; Software Foundation; either version 2, or (at your option) any later 91539Srgrimes; version. 101539Srgrimes; 111539Srgrimes; GCC is distributed in the hope that it will be useful, but WITHOUT ANY 121539Srgrimes; WARRANTY; without even the implied warranty of MERCHANTABILITY or 131539Srgrimes; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 141539Srgrimes; for more details. 151539Srgrimes; 161539Srgrimes; You should have received a copy of the GNU General Public License 171539Srgrimes; along with GCC; see the file COPYING. If not, write to the Free 181539Srgrimes; Software Foundation, 59 Temple Place - Suite 330, Boston, MA 191539Srgrimes; 02111-1307, USA. 201539Srgrimes 211539Srgrimes 221539Srgrimes; This file is processed by the script opts.sh. It is a database of 231539Srgrimes; command line options, with each record separated by a blank line, 241539Srgrimes; and each field appearing on its own line. The first field is the 251539Srgrimes; command-line switch with the leading "-" removed. All options 261539Srgrimes; beginning with "f" or "W" are implicitly assumed to take a "no-" 271539Srgrimes; form; this form should not be listed. If you do not want this 281539Srgrimes; negative form and you want it to be automatically rejected, add 291539Srgrimes; RejectNegative to the second field. 301539Srgrimes 311539Srgrimes; The second field is a space-separated list of which parts of the 321539Srgrimes; compiler recognize the switch, as declared by "Language" entries. 331539Srgrimes; If the switch takes an argument, then you should also specify 3421055Speter; "Joined" and/or "Separate" to indicate where the argument can 3521055Speter; appear. If a Joined argument can legitimately be omitted, specify 361539Srgrimes; "JoinedOrMissing" instead of "Joined". If the argument to a switch 371539Srgrimes; is a non-negative integer, you can specify "UInteger" and the switch 388858Srgrimes; decoder will convert the argument for you, or complain to the user 391539Srgrimes; if the argument is invalid. 401539Srgrimes 411539Srgrimes; The third field is the help text to output with --help. This is 421539Srgrimes; automatically line-wrapped on output. Normally the switch is output 431539Srgrimes; automatically, with the help text on the right hand side of the 441539Srgrimes; output. However, if the help text contains a tab character, the 458858Srgrimes; text to the left of the tab is output instead of the switch, and the 461539Srgrimes; text to its right forms the help. This is useful for elaborating on 471539Srgrimes; what type of argument a switch takes, for example. If the second 481539Srgrimes; field contains "Undocumented" then nothing is output with --help. 491539Srgrimes; Only do this with good reason like the switch being internal between 501539Srgrimes; the driver and the front end - it is not an excuse to leave a switch 511539Srgrimes; undocumented. 521539Srgrimes 531539Srgrimes; Comments can appear on their own line anwhere in the file, preceded 541539Srgrimes; by a semicolon. Whitespace is permitted before the semicolon. 551539Srgrimes 561539Srgrimes; For each switch XXX below, an enumeration constant is created by the 571539Srgrimes; script opts.sh spelt OPT_XXX, but with all non-alphanumeric 581539Srgrimes; characters replaced with an underscore. 591539Srgrimes 601539Srgrimes; Please try to keep this file in ASCII collating order. 6121055Speter 6221055SpeterLanguage 631539SrgrimesC 641539Srgrimes 651539SrgrimesLanguage 661539SrgrimesObjC 671539Srgrimes 681539SrgrimesLanguage 6910132SpeterC++ 7010132Speter 711539SrgrimesLanguage 721539SrgrimesObjC++ 731539Srgrimes 741539Srgrimes-output-pch= 751539SrgrimesC ObjC C++ ObjC++ Joined Separate 761539Srgrimes 771539SrgrimesA 781539SrgrimesC ObjC C++ ObjC++ Joined Separate 791539Srgrimes-A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question> 801539Srgrimes 811539SrgrimesC 8213771SmppC ObjC C++ ObjC++ 831539SrgrimesDo not discard comments 841539Srgrimes 851539SrgrimesCC 861539SrgrimesC ObjC C++ ObjC++ 871539SrgrimesDo not discard comments in macro expansions 881539Srgrimes 891539SrgrimesD 901539SrgrimesC ObjC C++ ObjC++ Joined Separate 911539Srgrimes-D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1 921539Srgrimes 931539SrgrimesE 941539SrgrimesC ObjC C++ ObjC++ Undocumented 951539Srgrimes 961539SrgrimesH 971539SrgrimesC ObjC C++ ObjC++ 981539SrgrimesPrint the name of header files as they are used 991539Srgrimes 1001539SrgrimesI 1011539SrgrimesC ObjC C++ ObjC++ Joined Separate 1021539Srgrimes-I <dir> Add <dir> to the end of the main include path. -I- gives more include path control; see info documentation 1031539Srgrimes 1041539SrgrimesM 1051539SrgrimesC ObjC C++ ObjC++ 1061539SrgrimesGenerate make dependencies 1071539Srgrimes 1081539SrgrimesMD 1091539SrgrimesC ObjC C++ ObjC++ Separate 1101539SrgrimesGenerate make dependencies and compile 1111539Srgrimes 1121539SrgrimesMF 1131539SrgrimesC ObjC C++ ObjC++ Joined Separate 11410132Speter-MF <file> Write dependency output to the given file 11510132Speter 1161539SrgrimesMG 11713771SmppC ObjC C++ ObjC++ 1181539SrgrimesTreat missing header files as generated files 1191539Srgrimes 1201539SrgrimesMM 1211539SrgrimesC ObjC C++ ObjC++ 1221539SrgrimesLike -M but ignore system header files 1231539Srgrimes 1241539SrgrimesMMD 1251539SrgrimesC ObjC C++ ObjC++ Separate 1261539SrgrimesLike -MD but ignore system header files 1271539Srgrimes 1281539SrgrimesMP 12917902SpeterC ObjC C++ ObjC++ 1301539SrgrimesGenerate phony targets for all headers 13121055Speter 1321539SrgrimesMQ 1331539SrgrimesC ObjC C++ ObjC++ Joined Separate 1341539Srgrimes-MQ <target> Add a MAKE-quoted target 1351539Srgrimes 1361539SrgrimesMT 1371539SrgrimesC ObjC C++ ObjC++ Joined Separate 1381539Srgrimes-MT <target> Add an unquoted target 1391539Srgrimes 1401539SrgrimesP 14110132SpeterC ObjC C++ ObjC++ 1421539SrgrimesDo not generate #line directives 1431539Srgrimes 1441539SrgrimesU 1451539SrgrimesC ObjC C++ ObjC++ Joined Separate 1461539Srgrimes-U<macro> Undefine <macro> 14717902Speter 14817902SpeterWabi 14917902SpeterC++ ObjC++ 15017902Speter 15117902SpeterWall 15217902SpeterC ObjC C++ ObjC++ 15317902SpeterEnable most warning messages 15417902Speter 15517902SpeterWbad-function-cast 15617902SpeterC ObjC 15717902SpeterWarn about casting functions to incompatible types 15817902Speter 15917902SpeterWcast-qual 16017902SpeterC ObjC C++ ObjC++ 16117902SpeterWarn about casts which discard qualifiers 16217902Speter 16317902SpeterWchar-subscripts 16417902SpeterC ObjC C++ ObjC++ 16517902SpeterWarn about subscripts whose type is \"char\" 16617902Speter 16717902SpeterWcomment 16817902SpeterC ObjC C++ ObjC++ 16917902SpeterWarn about possibly nested block comments, and C++ comments spanning more than one physical line 17017902Speter 17117902SpeterWcomments 17217902SpeterC ObjC C++ ObjC++ 17317902SpeterSynonym for -Wcomment 17417902Speter 1751539SrgrimesWconversion 1761539SrgrimesC ObjC C++ ObjC++ 1771539SrgrimesWarn about possibly confusing type conversions 178 179Wctor-dtor-privacy 180C++ ObjC++ 181Warn when all constructors and destructors are private 182 183Wdeclaration-after-statement 184C ObjC 185Warn when a declaration is found after a statement 186 187Wdeprecated 188C++ ObjC++ 189Warn about deprecated compiler features 190 191Wdiv-by-zero 192C ObjC 193Warn about compile-time integer division by zero 194 195Weffc++ 196C++ ObjC++ 197Warn about violations of Effective C++ style rules 198 199Wendif-labels 200C ObjC C++ ObjC++ 201Warn about stray tokens after #elif and #endif 202 203Werror 204C ObjC C++ ObjC++ 205; Documented in common.opt 206 207Werror-implicit-function-declaration 208C ObjC RejectNegative 209Make implicit function declarations an error 210 211Wfloat-equal 212C ObjC C++ ObjC++ 213Warn if testing floating point numbers for equality 214 215Wformat 216C ObjC C++ ObjC++ 217Warn about printf/scanf/strftime/strfmon format string anomalies 218 219Wformat-extra-args 220C ObjC C++ ObjC++ 221Warn if passing too many arguments to a function for its format string 222 223Wformat-nonliteral 224C ObjC C++ ObjC++ 225Warn about format strings that are not literals 226 227Wformat-security 228C ObjC C++ ObjC++ 229Warn about possible security problems with format functions 230 231Wformat-y2k 232C ObjC C++ ObjC++ 233Warn about strftime formats yielding 2-digit years 234 235Wformat-zero-length 236C ObjC 237 238Wformat= 239C ObjC C++ ObjC++ Joined 240 241Winit-self 242C ObjC C++ ObjC++ 243Warn about variables which are initialized to themselves. 244 245Wimplicit 246C ObjC C++ ObjC++ 247 248Wimplicit-function-declaration 249C ObjC 250Warn about implicit function declarations 251 252Wimplicit-int 253C ObjC 254Warn when a declaration does not specify a type 255 256Wimport 257C ObjC C++ ObjC++ 258Deprecated. This switch has no effect. 259 260Winvalid-offsetof 261C++ ObjC++ 262Warn about invalid uses of the \"offsetof\" macro 263 264Winvalid-pch 265C ObjC C++ ObjC++ 266Warn about PCH files that are found but not used 267 268Wlong-long 269C ObjC C++ ObjC++ 270Do not warn about using \"long long\" when -pedantic 271 272Wmain 273C ObjC 274Warn about suspicious declarations of \"main\" 275 276Wmissing-braces 277C ObjC C++ ObjC++ 278Warn about possibly missing braces around initializers 279 280Wmissing-declarations 281C ObjC 282Warn about global functions without previous declarations 283 284Wmissing-format-attribute 285C ObjC C++ ObjC++ 286Warn about functions which might be candidates for format attributes 287 288Wmissing-prototypes 289C ObjC 290Warn about global functions without prototypes 291 292Wmultichar 293C ObjC C++ ObjC++ 294Warn about use of multi-character character constants 295 296Wnested-externs 297C ObjC 298Warn about \"extern\" declarations not at file scope 299 300Wnon-template-friend 301C++ ObjC++ 302Warn when non-templatized friend functions are declared within a template 303 304Wnon-virtual-dtor 305C++ ObjC++ 306Warn about non-virtual destructors 307 308Wnonnull 309C ObjC 310 311Wold-style-cast 312C++ ObjC++ 313Warn if a C-style cast is used in a program 314 315Wold-style-definition 316C ObjC 317Warn if an old-style parameter definition is used 318 319Woverloaded-virtual 320C++ ObjC++ 321Warn about overloaded virtual function names 322 323Wparentheses 324C ObjC C++ ObjC++ 325Warn about possibly missing parentheses 326 327Wpmf-conversions 328C++ ObjC++ 329Warn when converting the type of pointers to member functions 330 331Wpointer-arith 332C ObjC C++ ObjC++ 333Warn about function pointer arithmetic 334 335Wprotocol 336ObjC ObjC++ 337Warn if inherited methods are unimplemented 338 339Wredundant-decls 340C ObjC C++ ObjC++ 341Warn about multiple declarations of the same object 342 343Wreorder 344C++ ObjC++ 345Warn when the compiler reorders code 346 347Wreturn-type 348C ObjC C++ ObjC++ 349Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++) 350 351Wselector 352ObjC ObjC++ 353Warn if a selector has multiple methods 354 355Wsequence-point 356C ObjC 357Warn about possible violations of sequence point rules 358 359Wsign-compare 360C ObjC C++ ObjC++ 361Warn about signed-unsigned comparisons 362 363Wsign-promo 364C++ ObjC++ 365Warn when overload promotes from unsigned to signed 366 367Wstrict-prototypes 368C ObjC 369Warn about unprototyped function declarations 370 371Wsynth 372C++ ObjC++ 373Warn when synthesis behavior differs from Cfront 374 375Wsystem-headers 376C ObjC C++ ObjC++ 377Do not suppress warnings from system headers 378 379Wtraditional 380C ObjC 381Warn about features not present in traditional C 382 383Wtrigraphs 384C ObjC C++ ObjC++ 385Warn if trigraphs are encountered that might affect the meaning of the program 386 387Wundeclared-selector 388ObjC ObjC++ 389 390Wundef 391C ObjC C++ ObjC++ 392Warn if an undefined macro is used in an #if directive 393 394Wunknown-pragmas 395C ObjC C++ ObjC++ 396Warn about unrecognized pragmas 397 398Wunused-macros 399C ObjC C++ ObjC++ 400Warn about macros defined in the main file that are not used 401 402Wwrite-strings 403C ObjC C++ ObjC++ 404Give strings the type \"array of char\" 405 406ansi 407C ObjC C++ ObjC++ 408A synonym for -std=c89. In a future version of GCC it will become synonymous with -std=c99 instead 409 410d 411C ObjC C++ ObjC++ Joined 412; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD? 413 414faccess-control 415C++ ObjC++ 416Enforce class member access control semantics 417 418fall-virtual 419C++ ObjC++ 420 421falt-external-templates 422C++ ObjC++ 423Change when template instances are emitted 424 425fasm 426C ObjC C++ ObjC++ 427Recognize the \"asm\" keyword 428 429fbuiltin 430C ObjC C++ ObjC++ 431Recognize built-in functions 432 433fbuiltin- 434C ObjC C++ ObjC++ Joined 435 436fcheck-new 437C++ ObjC++ 438Check the return value of new 439 440fcond-mismatch 441C ObjC C++ ObjC++ 442Allow the arguments of the '?' operator to have different types 443 444fconserve-space 445C++ ObjC++ 446Reduce the size of object files 447 448fconst-strings 449C++ ObjC++ 450Make string literals \"const char[]\" not \"char[]\" 451 452fconstant-string-class= 453ObjC ObjC++ Joined 454-fconst-string-class=<name> Use class <name> for constant strings 455 456fdefault-inline 457C++ ObjC++ 458Inline member functions by default 459 460fdollars-in-identifiers 461C ObjC C++ ObjC++ 462Permit '$' as an identifier character 463 464fdump- 465C ObjC C++ ObjC++ Joined RejectNegative 466-fdump-<type> Dump various compiler internals to a file 467 468felide-constructors 469C++ ObjC++ 470 471fenforce-eh-specs 472C++ ObjC++ 473Generate code to check exception specifications 474 475fenum-int-equiv 476C++ ObjC++ 477 478fexec-charset= 479C ObjC C++ ObjC++ Joined RejectNegative 480-fexec-charset=<cset> Convert all strings and character constants to character set <cset> 481 482finput-charset= 483C ObjC C++ ObjC++ Joined RejectNegative 484-finput-charset=<cset> Specify the default character set for source files. 485 486 487fexternal-templates 488C++ ObjC++ 489 490ffixed-form 491C ObjC 492 493ffixed-line-length- 494C ObjC Joined 495 496ffor-scope 497C++ ObjC++ 498Scope of for-init-statement variables is local to the loop 499 500ffreestanding 501C ObjC 502Do not assume that standard C libraries and \"main\" exist 503 504fgnu-keywords 505C++ ObjC++ 506Recognize GNU-defined keywords 507 508fgnu-runtime 509ObjC ObjC++ 510Generate code for GNU runtime environment 511 512fguiding-decls 513C++ ObjC++ 514 515fhandle-exceptions 516C++ ObjC++ 517 518fhonor-std 519C++ ObjC++ 520 521fhosted 522C ObjC 523Assume normal C execution environment 524 525fhuge-objects 526C++ ObjC++ 527Enable support for huge objects 528 529fimplement-inlines 530C++ ObjC++ 531Export functions even if they can be inlined 532 533fimplicit-inline-templates 534C++ ObjC++ 535Emit implicit instantiations of inline templates 536 537fimplicit-templates 538C++ ObjC++ 539Emit implicit instantiations of templates 540 541flabels-ok 542C++ ObjC++ 543 544fms-extensions 545C ObjC C++ ObjC++ 546Don't warn about uses of Microsoft extensions 547 548fname-mangling-version- 549C++ ObjC++ Joined 550 551fnew-abi 552C++ ObjC++ 553 554fnext-runtime 555ObjC ObjC++ 556Generate code for NeXT (Apple Mac OS X) runtime environment 557 558fnil-receivers 559ObjC ObjC++ 560Assume that receivers of Objective-C messages may be nil 561 562fnonansi-builtins 563C++ ObjC++ 564 565fnonnull-objects 566C++ ObjC++ 567 568fobjc-exceptions 569ObjC ObjC++ 570Enable Objective-C exception and synchronization syntax 571 572foperator-names 573C++ ObjC++ 574Recognize C++ kewords like \"compl\" and \"xor\" 575 576foptional-diags 577C++ ObjC++ 578Enable optional diagnostics 579 580fpch-deps 581C ObjC C++ ObjC++ 582 583fpermissive 584C++ ObjC++ 585Downgrade conformance errors to warnings 586 587fpreprocessed 588C ObjC C++ ObjC++ 589Treat the input file as already preprocessed 590 591freplace-objc-classes 592ObjC ObjC++ 593Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime 594 595frepo 596C++ ObjC++ 597Enable automatic template instantiation 598 599frtti 600C++ ObjC++ 601Generate run time type descriptor information 602 603fshort-double 604C ObjC C++ ObjC++ 605Use the same size for double as for float 606 607fshort-enums 608C ObjC C++ ObjC++ 609Use the narrowest integer type possible for enumeration types 610 611fshort-wchar 612C ObjC C++ ObjC++ 613Force the underlying type for \"wchar_t\" to be \"unsigned short\" 614 615fshow-column 616C ObjC C++ ObjC++ 617 618fsigned-bitfields 619C ObjC C++ ObjC++ 620When \"signed\" or \"unsigned\" is not given make the bitfield signed 621 622fsigned-char 623C ObjC C++ ObjC++ 624Make \"char\" signed by default 625 626fsquangle 627C++ ObjC++ 628 629fstats 630C++ ObjC++ 631Display statistics accumulated during compilation 632 633fstrict-prototype 634C++ ObjC++ 635 636ftabstop= 637C ObjC C++ ObjC++ Joined RejectNegative UInteger 638-ftabstop=<number> Distance between tab stops for column reporting 639 640ftemplate-depth- 641C++ ObjC++ Joined RejectNegative UInteger 642-ftemplate-depth-<number> Specify maximum template instantiation depth 643 644fthis-is-variable 645C++ ObjC++ 646 647funsigned-bitfields 648C ObjC C++ ObjC++ 649When \"signed\" or \"unsigned\" is not given make the bitfield unsigned 650 651funsigned-char 652C ObjC C++ ObjC++ 653Make \"char\" unsigned by default 654 655fuse-cxa-atexit 656C++ ObjC++ 657Use __cxa_atexit to register destructors 658 659fvtable-gc 660C++ ObjC++ 661Discard unused virtual functions 662 663fvtable-thunks 664C++ ObjC++ 665Implement vtables using thunks 666 667fweak 668C++ ObjC++ 669Emit common-like symbols as weak symbols 670 671fwide-exec-charset= 672C ObjC C++ ObjC++ Joined RejectNegative 673-fwide-exec-charset=<cset> Convert all wide strings and character constants to character set <cset> 674 675fworking-directory 676C ObjC C++ ObjC++ 677Generate a #line directive pointing at the current working directory 678 679fxref 680C++ ObjC++ 681Emit cross referencing information 682 683fzero-link 684ObjC ObjC++ 685Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode 686 687gen-decls 688ObjC ObjC++ 689Dump declarations to a .decl file 690 691idirafter 692C ObjC C++ ObjC++ Joined Separate 693-idirafter <dir> Add <dir> to the end of the system include path 694 695imacros 696C ObjC C++ ObjC++ Joined Separate 697-imacros <file> Accept definition of macros in <file> 698 699include 700C ObjC C++ ObjC++ Joined Separate 701-include <file> Include the contents of <file> before other files 702 703iprefix 704C ObjC C++ ObjC++ Joined Separate 705-iprefix <path> Specify <path> as a prefix for next two options 706 707isysroot 708C ObjC C++ ObjC++ Joined Separate 709-isysroot <dir> Set <dir> to be the system root directory 710 711isystem 712C ObjC C++ ObjC++ Joined Separate 713-isystem <dir> Add <dir> to the start of the system include path 714 715iwithprefix 716C ObjC C++ ObjC++ Joined Separate 717-iwithprefix <dir> Add <dir> to the end of the system include path 718 719iwithprefixbefore 720C ObjC C++ ObjC++ Joined Separate 721-iwithprefixbefore <dir> Add <dir> to the end of the main include path 722 723lang-asm 724C Undocumented 725 726lang-objc 727C ObjC C++ ObjC++ Undocumented 728 729nostdinc 730C ObjC C++ ObjC++ 731Do not search standard system include directories (those specified with -isystem will still be used) 732 733nostdinc++ 734C++ ObjC++ 735Do not search standard system include directories for C++ 736 737o 738C ObjC C++ ObjC++ Joined Separate 739; Documented in common.opt 740 741pedantic 742C ObjC C++ ObjC++ 743; Documented in common.opt 744 745pedantic-errors 746C ObjC C++ ObjC++ 747; Documented in common.opt 748 749print-objc-runtime-info 750ObjC ObjC++ 751Generate C header of platform-specific features 752 753remap 754C ObjC C++ ObjC++ 755Remap file names when including files 756 757std=c++98 758C++ ObjC++ 759Conform to the ISO 1998 C++ standard 760 761std=c89 762C ObjC 763Conform to the ISO 1990 C standard 764 765std=c99 766C ObjC 767Conform to the ISO 1999 C standard 768 769std=c9x 770C ObjC 771Deprecated in favor of -std=c99 772 773std=gnu++98 774C++ ObjC++ 775Conform to the ISO 1998 C++ standard with GNU extensions 776 777std=gnu89 778C ObjC 779Conform to the ISO 1990 C standard with GNU extensions 780 781std=gnu99 782C ObjC 783Conform to the ISO 1999 C standard with GNU extensions 784 785std=gnu9x 786C ObjC 787Deprecated in favor of -std=gnu99 788 789std=iso9899:1990 790C ObjC 791Deprecated in favor of -std=c89 792 793std=iso9899:199409 794C ObjC 795Conform to the ISO 1990 C standard as amended in 1994 796 797std=iso9899:1999 798C ObjC 799Deprecated in favor of -std=c99 800 801std=iso9899:199x 802C ObjC 803Deprecated in favor of -std=c99 804 805traditional-cpp 806C ObjC C++ ObjC++ 807Enable traditional preprocessing 808 809trigraphs 810C ObjC C++ ObjC++ 811-trigraphs Support ISO C trigraphs 812 813undef 814C ObjC C++ ObjC++ 815Do not predefine system-specific and GCC-specific macros 816 817v 818C ObjC C++ ObjC++ 819Enable verbose output 820 821w 822C ObjC C++ ObjC++ 823; Documented in common.opt 824 825; This comment is to ensure we retain the blank line above. 826