c.opt revision 132718
1; Options for the C, ObjC, C++ and ObjC++ front ends. 2; Copyright (C) 2003 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 2, 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 COPYING. If not, write to the Free 18; Software Foundation, 59 Temple Place - Suite 330, Boston, MA 19; 02111-1307, USA. 20 21 22; This file is processed by the script opts.sh. It is a database of 23; command line options, with each record separated by a blank line, 24; and each field appearing on its own line. The first field is the 25; command-line switch with the leading "-" removed. All options 26; beginning with "f" or "W" are implicitly assumed to take a "no-" 27; form; this form should not be listed. If you do not want this 28; negative form and you want it to be automatically rejected, add 29; RejectNegative to the second field. 30 31; The second field is a space-separated list of which parts of the 32; compiler recognize the switch, as declared by "Language" entries. 33; If the switch takes an argument, then you should also specify 34; "Joined" and/or "Separate" to indicate where the argument can 35; appear. If a Joined argument can legitimately be omitted, specify 36; "JoinedOrMissing" instead of "Joined". If the argument to a switch 37; is a non-negative integer, you can specify "UInteger" and the switch 38; decoder will convert the argument for you, or complain to the user 39; if the argument is invalid. 40 41; The third field is the help text to output with --help. This is 42; automatically line-wrapped on output. Normally the switch is output 43; automatically, with the help text on the right hand side of the 44; output. However, if the help text contains a tab character, the 45; text to the left of the tab is output instead of the switch, and the 46; text to its right forms the help. This is useful for elaborating on 47; what type of argument a switch takes, for example. If the second 48; field contains "Undocumented" then nothing is output with --help. 49; Only do this with good reason like the switch being internal between 50; the driver and the front end - it is not an excuse to leave a switch 51; undocumented. 52 53; Comments can appear on their own line anwhere in the file, preceded 54; by a semicolon. Whitespace is permitted before the semicolon. 55 56; For each switch XXX below, an enumeration constant is created by the 57; script opts.sh spelt OPT_XXX, but with all non-alphanumeric 58; characters replaced with an underscore. 59 60; Please try to keep this file in ASCII collating order. 61 62Language 63C 64 65Language 66ObjC 67 68Language 69C++ 70 71Language 72ObjC++ 73 74-output-pch= 75C ObjC C++ ObjC++ Joined Separate 76 77A 78C ObjC C++ ObjC++ Joined Separate 79-A<question>=<answer> Assert the <answer> to <question>. Putting '-' before <question> disables the <answer> to <question> 80 81C 82C ObjC C++ ObjC++ 83Do not discard comments 84 85CC 86C ObjC C++ ObjC++ 87Do not discard comments in macro expansions 88 89D 90C ObjC C++ ObjC++ Joined Separate 91-D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1 92 93E 94C ObjC C++ ObjC++ Undocumented 95 96H 97C ObjC C++ ObjC++ 98Print the name of header files as they are used 99 100I 101C ObjC C++ ObjC++ Joined Separate 102-I <dir> Add <dir> to the end of the main include path. -I- gives more include path control; see info documentation 103 104M 105C ObjC C++ ObjC++ 106Generate make dependencies 107 108MD 109C ObjC C++ ObjC++ Separate 110Generate make dependencies and compile 111 112MF 113C ObjC C++ ObjC++ Joined Separate 114-MF <file> Write dependency output to the given file 115 116MG 117C ObjC C++ ObjC++ 118Treat missing header files as generated files 119 120MM 121C ObjC C++ ObjC++ 122Like -M but ignore system header files 123 124MMD 125C ObjC C++ ObjC++ Separate 126Like -MD but ignore system header files 127 128MP 129C ObjC C++ ObjC++ 130Generate phony targets for all headers 131 132MQ 133C ObjC C++ ObjC++ Joined Separate 134-MQ <target> Add a MAKE-quoted target 135 136MT 137C ObjC C++ ObjC++ Joined Separate 138-MT <target> Add an unquoted target 139 140P 141C ObjC C++ ObjC++ 142Do not generate #line directives 143 144U 145C ObjC C++ ObjC++ Joined Separate 146-U<macro> Undefine <macro> 147 148Wabi 149C++ ObjC++ 150 151Wall 152C ObjC C++ ObjC++ 153Enable most warning messages 154 155Wbad-function-cast 156C ObjC 157Warn about casting functions to incompatible types 158 159Wcast-qual 160C ObjC C++ ObjC++ 161Warn about casts which discard qualifiers 162 163Wchar-subscripts 164C ObjC C++ ObjC++ 165Warn about subscripts whose type is \"char\" 166 167Wcomment 168C ObjC C++ ObjC++ 169Warn about possibly nested block comments, and C++ comments spanning more than one physical line 170 171Wcomments 172C ObjC C++ ObjC++ 173Synonym for -Wcomment 174 175Wconversion 176C ObjC C++ ObjC++ 177Warn 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