* config/ia64/fde-glibc.c (_GNU_SOURCE): Define to 1 instead of
[official-gcc.git] / gcc / c.opt
blob4f9859f6a7a7fe352f0cd92c36e221d38ab8029a
1 ; Options for the C, ObjC, C++ and ObjC++ front ends.
2 ; Copyright (C) 2003 Free Software Foundation, Inc.
4 ; This file is part of GCC.
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.
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.
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.
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.
53 ; Comments can appear on their own line anwhere in the file, preceded
54 ; by a semicolon.  Whitespace is permitted before the semicolon.
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.
60 ; Please try to keep this file in ASCII collating order.
62 Language
65 Language
66 ObjC
68 Language
69 C++
71 Language
72 ObjC++
74 -output-pch=
75 C ObjC C++ ObjC++ Joined Separate
78 C ObjC C++ ObjC++ Joined Separate
79 -A<question>=<answer>   Assert the <answer> to <question>.  Putting '-' before <question> disables the <answer> to <question>
82 C ObjC C++ ObjC++
83 Do not discard comments
86 C ObjC C++ ObjC++
87 Do not discard comments in macro expansions
90 C 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
94 C ObjC C++ ObjC++ Undocumented
97 C ObjC C++ ObjC++
98 Print the name of header files as they are used
101 C 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
105 C ObjC C++ ObjC++
106 Generate make dependencies
109 C ObjC C++ ObjC++ Separate
110 Generate make dependencies and compile
113 C ObjC C++ ObjC++ Joined Separate
114 -MF <file>      Write dependency output to the given file
117 C ObjC C++ ObjC++
118 Treat missing header files as generated files
121 C ObjC C++ ObjC++
122 Like -M but ignore system header files
125 C ObjC C++ ObjC++ Separate
126 Like -MD but ignore system header files
129 C ObjC C++ ObjC++
130 Generate phony targets for all headers
133 C ObjC C++ ObjC++ Joined Separate
134 -MQ <target>    Add a MAKE-quoted target
137 C ObjC C++ ObjC++ Joined Separate
138 -MT <target>    Add an unquoted target
141 C ObjC C++ ObjC++
142 Do not generate #line directives
145 C ObjC C++ ObjC++ Joined Separate
146 -U<macro>       Undefine <macro>
148 Wabi
149 C++ ObjC++
151 Wall
152 C ObjC C++ ObjC++
153 Enable most warning messages
155 Wbad-function-cast
156 C ObjC
157 Warn about casting functions to incompatible types
159 Wcast-qual
160 C ObjC C++ ObjC++
161 Warn about casts which discard qualifiers
163 Wchar-subscripts
164 C ObjC C++ ObjC++
165 Warn about subscripts whose type is \"char\"
167 Wcomment
168 C ObjC C++ ObjC++
169 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
171 Wcomments
172 C ObjC C++ ObjC++
173 Synonym for -Wcomment
175 Wconversion
176 C ObjC C++ ObjC++
177 Warn about possibly confusing type conversions
179 Wctor-dtor-privacy
180 C++ ObjC++
181 Warn when all constructors and destructors are private
183 Wdeclaration-after-statement
184 C ObjC
185 Warn when a declaration is found after a statement
187 Wdeprecated
188 C++ ObjC++
189 Warn about deprecated compiler features
191 Wdiv-by-zero
192 C ObjC
193 Warn about compile-time integer division by zero
195 Weffc++
196 C++ ObjC++
197 Warn about violations of Effective C++ style rules
199 Wendif-labels
200 C ObjC C++ ObjC++
201 Warn about stray tokens after #elif and #endif
203 Werror
204 C ObjC C++ ObjC++
205 ; Documented in common.opt
207 Werror-implicit-function-declaration
208 C ObjC RejectNegative
209 Make implicit function declarations an error
211 Wfloat-equal
212 C ObjC C++ ObjC++
213 Warn if testing floating point numbers for equality
215 Wformat
216 C ObjC C++ ObjC++
217 Warn about printf/scanf/strftime/strfmon format string anomalies
219 Wformat-extra-args
220 C ObjC C++ ObjC++
221 Warn if passing too many arguments to a function for its format string
223 Wformat-nonliteral
224 C ObjC C++ ObjC++
225 Warn about format strings that are not literals
227 Wformat-security
228 C ObjC C++ ObjC++
229 Warn about possible security problems with format functions
231 Wformat-y2k
232 C ObjC C++ ObjC++
233 Warn about strftime formats yielding 2-digit years
235 Wformat-zero-length
236 C ObjC
238 Wformat=
239 C ObjC C++ ObjC++ Joined
241 Winit-self
242 C ObjC C++ ObjC++
243 Warn about variables which are initialized to themselves.
245 Wimplicit
246 C ObjC C++ ObjC++
248 Wimplicit-function-declaration
249 C ObjC
250 Warn about implicit function declarations
252 Wimplicit-int
253 C ObjC
254 Warn when a declaration does not specify a type
256 Wimport
257 C ObjC C++ ObjC++
258 Deprecated.  This switch has no effect.
260 Winvalid-offsetof
261 C++ ObjC++
262 Warn about invalid uses of the \"offsetof\" macro
264 Winvalid-pch
265 C ObjC C++ ObjC++
266 Warn about PCH files that are found but not used
268 Wlong-long
269 C ObjC C++ ObjC++
270 Do not warn about using \"long long\" when -pedantic
272 Wmain
273 C ObjC
274 Warn about suspicious declarations of \"main\"
276 Wmissing-braces
277 C ObjC C++ ObjC++
278 Warn about possibly missing braces around initializers
280 Wmissing-declarations
281 C ObjC
282 Warn about global functions without previous declarations
284 Wmissing-format-attribute
285 C ObjC C++ ObjC++
286 Warn about functions which might be candidates for format attributes
288 Wmissing-prototypes
289 C ObjC
290 Warn about global functions without prototypes
292 Wmultichar
293 C ObjC C++ ObjC++
294 Warn about use of multi-character character constants
296 Wnested-externs
297 C ObjC
298 Warn about \"extern\" declarations not at file scope
300 Wnon-template-friend
301 C++ ObjC++
302 Warn when non-templatized friend functions are declared within a template
304 Wnon-virtual-dtor
305 C++ ObjC++
306 Warn about non-virtual destructors
308 Wnonnull
309 C ObjC
311 Wold-style-cast
312 C++ ObjC++
313 Warn if a C-style cast is used in a program
315 Wold-style-definition
316 C ObjC
317 Warn if an old-style parameter definition is used
319 Woverloaded-virtual
320 C++ ObjC++
321 Warn about overloaded virtual function names
323 Wparentheses
324 C ObjC C++ ObjC++
325 Warn about possibly missing parentheses
327 Wpmf-conversions
328 C++ ObjC++
329 Warn when converting the type of pointers to member functions
331 Wpointer-arith
332 C ObjC C++ ObjC++
333 Warn about function pointer arithmetic
335 Wprotocol
336 ObjC ObjC++
337 Warn if inherited methods are unimplemented
339 Wredundant-decls
340 C ObjC C++ ObjC++
341 Warn about multiple declarations of the same object
343 Wreorder
344 C++ ObjC++
345 Warn when the compiler reorders code
347 Wreturn-type
348 C ObjC C++ ObjC++
349 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
351 Wselector
352 ObjC ObjC++
353 Warn if a selector has multiple methods
355 Wsequence-point
356 C ObjC
357 Warn about possible violations of sequence point rules
359 Wsign-compare
360 C ObjC C++ ObjC++
361 Warn about signed-unsigned comparisons
363 Wsign-promo
364 C++ ObjC++
365 Warn when overload promotes from unsigned to signed
367 Wstrict-prototypes
368 C ObjC
369 Warn about unprototyped function declarations
371 Wsynth
372 C++ ObjC++
373 Warn when synthesis behavior differs from Cfront
375 Wsystem-headers
376 C ObjC C++ ObjC++
377 Do not suppress warnings from system headers
379 Wtraditional
380 C ObjC
381 Warn about features not present in traditional C
383 Wtrigraphs
384 C ObjC C++ ObjC++
385 Warn if trigraphs are encountered that might affect the meaning of the program
387 Wundeclared-selector
388 ObjC ObjC++
390 Wundef
391 C ObjC C++ ObjC++
392 Warn if an undefined macro is used in an #if directive
394 Wunknown-pragmas
395 C ObjC C++ ObjC++
396 Warn about unrecognized pragmas
398 Wunused-macros
399 C ObjC C++ ObjC++
400 Warn about macros defined in the main file that are not used
402 Wwrite-strings
403 C ObjC C++ ObjC++
404 Give strings the type \"array of char\"
406 ansi
407 C ObjC C++ ObjC++
408 A synonym for -std=c89.  In a future version of GCC it will become synonymous with -std=c99 instead
411 C ObjC C++ ObjC++ Joined
412 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
414 fabi-version=
415 C++ ObjC++ Joined UInteger
417 faccess-control
418 C++ ObjC++
419 Enforce class member access control semantics
421 fall-virtual
422 C++ ObjC++
424 falt-external-templates
425 C++ ObjC++
426 Change when template instances are emitted
428 fasm
429 C ObjC C++ ObjC++
430 Recognize the \"asm\" keyword
432 fbuiltin
433 C ObjC C++ ObjC++
434 Recognize built-in functions
436 fbuiltin-
437 C ObjC C++ ObjC++ Joined
439 fcheck-new
440 C++ ObjC++
441 Check the return value of new
443 fcond-mismatch
444 C ObjC C++ ObjC++
445 Allow the arguments of the '?' operator to have different types
447 fconserve-space
448 C++ ObjC++
449 Reduce the size of object files
451 fconst-strings
452 C++ ObjC++
453 Make string literals \"const char[]\" not \"char[]\"
455 fconstant-string-class=
456 ObjC ObjC++ Joined
457 -fconst-string-class=<name>     Use class <name> for constant strings
459 fdefault-inline
460 C++ ObjC++
461 Inline member functions by default
463 fdollars-in-identifiers
464 C ObjC C++ ObjC++
465 Permit '$' as an identifier character
467 fdump-
468 C ObjC C++ ObjC++ Joined RejectNegative
469 -fdump-<type>   Dump various compiler internals to a file
471 felide-constructors
472 C++ ObjC++
474 fenforce-eh-specs
475 C++ ObjC++
476 Generate code to check exception specifications
478 fenum-int-equiv
479 C++ ObjC++
481 fexec-charset=
482 C ObjC C++ ObjC++ Joined RejectNegative
483 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
485 fexternal-templates
486 C++ ObjC++
488 ffixed-form
489 C ObjC
491 ffixed-line-length-
492 C ObjC Joined
494 ffor-scope
495 C++ ObjC++
496 Scope of for-init-statement variables is local to the loop
498 ffreestanding
499 C ObjC
500 Do not assume that standard C libraries and \"main\" exist
502 fgnu-keywords
503 C++ ObjC++
504 Recognize GNU-defined keywords
506 fgnu-runtime
507 ObjC ObjC++
508 Generate code for GNU runtime environment
510 fguiding-decls
511 C++ ObjC++
513 fhandle-exceptions
514 C++ ObjC++
516 fhonor-std
517 C++ ObjC++
519 fhosted
520 C ObjC
521 Assume normal C execution environment
523 fhuge-objects
524 C++ ObjC++
525 Enable support for huge objects
527 fimplement-inlines
528 C++ ObjC++
529 Export functions even if they can be inlined
531 fimplicit-inline-templates
532 C++ ObjC++
533 Emit implicit instantiations of inline templates
535 fimplicit-templates
536 C++ ObjC++
537 Emit implicit instantiations of templates
539 flabels-ok
540 C++ ObjC++
542 fms-extensions
543 C ObjC C++ ObjC++
544 Don't warn about uses of Microsoft extensions
546 fname-mangling-version-
547 C++ ObjC++ Joined
549 fnew-abi
550 C++ ObjC++
552 fnext-runtime
553 ObjC ObjC++
554 Generate code for NeXT (Apple Mac OS X) runtime environment
556 fnil-receivers
557 ObjC ObjC++
558 Assume that receivers of Objective-C messages may be nil
560 fnonansi-builtins
561 C++ ObjC++
563 fnonnull-objects
564 C++ ObjC++
566 fobjc-exceptions
567 ObjC ObjC++
568 Enable Objective-C exception and synchronization syntax
570 foperator-names
571 C++ ObjC++
572 Recognize C++ kewords like \"compl\" and \"xor\"
574 foptional-diags
575 C++ ObjC++
576 Enable optional diagnostics
578 fpch-deps
579 C ObjC C++ ObjC++
581 fpermissive
582 C++ ObjC++
583 Downgrade conformance errors to warnings
585 fpreprocessed
586 C ObjC C++ ObjC++
587 Treat the input file as already preprocessed
589 freplace-objc-classes
590 ObjC ObjC++
591 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
593 frepo
594 C++ ObjC++
595 Enable automatic template instantiation
597 frtti
598 C++ ObjC++
599 Generate run time type descriptor information
601 fshort-double
602 C ObjC C++ ObjC++
603 Use the same size for double as for float
605 fshort-enums
606 C ObjC C++ ObjC++
607 Use the narrowest integer type possible for enumeration types
609 fshort-wchar
610 C ObjC C++ ObjC++
611 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
613 fshow-column
614 C ObjC C++ ObjC++
616 fsigned-bitfields
617 C ObjC C++ ObjC++
618 When \"signed\" or \"unsigned\" is not given make the bitfield signed
620 fsigned-char
621 C ObjC C++ ObjC++
622 Make \"char\" signed by default
624 fsquangle
625 C++ ObjC++
627 fstats
628 C++ ObjC++
629 Display statistics accumulated during compilation
631 fstrict-prototype
632 C++ ObjC++
634 ftabstop=
635 C ObjC C++ ObjC++ Joined RejectNegative UInteger
636 -ftabstop=<number>      Distance between tab stops for column reporting
638 ftemplate-depth-
639 C++ ObjC++ Joined RejectNegative UInteger 
640 -ftemplate-depth-<number>       Specify maximum template instantiation depth
642 fthis-is-variable
643 C++ ObjC++
645 funsigned-bitfields
646 C ObjC C++ ObjC++
647 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
649 funsigned-char
650 C ObjC C++ ObjC++
651 Make \"char\" unsigned by default
653 fuse-cxa-atexit
654 C++ ObjC++
655 Use __cxa_atexit to register destructors
657 fvtable-gc
658 C++ ObjC++
659 Discard unused virtual functions
661 fvtable-thunks
662 C++ ObjC++
663 Implement vtables using thunks
665 fweak
666 C++ ObjC++
667 Emit common-like symbols as weak symbols
669 fwide-exec-charset=
670 C ObjC C++ ObjC++ Joined RejectNegative
671 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>
673 fworking-directory
674 C ObjC C++ ObjC++
675 Generate a #line directive pointing at the current working directory
677 fxref
678 C++ ObjC++
679 Emit cross referencing information
681 fzero-link
682 ObjC ObjC++
683 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
685 gen-decls
686 ObjC ObjC++
687 Dump declarations to a .decl file
689 idirafter
690 C ObjC C++ ObjC++ Joined Separate
691 -idirafter <dir>        Add <dir> to the end of the system include path
693 imacros
694 C ObjC C++ ObjC++ Joined Separate
695 -imacros <file> Accept definition of macros in <file>
697 include
698 C ObjC C++ ObjC++ Joined Separate
699 -include <file> Include the contents of <file> before other files
701 iprefix
702 C ObjC C++ ObjC++ Joined Separate
703 -iprefix <path> Specify <path> as a prefix for next two options
705 isysroot
706 C ObjC C++ ObjC++ Joined Separate
707 -isysroot <dir> Set <dir> to be the system root directory
709 isystem
710 C ObjC C++ ObjC++ Joined Separate
711 -isystem <dir>  Add <dir> to the start of the system include path
713 iwithprefix
714 C ObjC C++ ObjC++ Joined Separate
715 -iwithprefix <dir>      Add <dir> to the end of the system include path
717 iwithprefixbefore
718 C ObjC C++ ObjC++ Joined Separate
719 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
721 lang-asm
722 C Undocumented
724 lang-objc
725 C ObjC C++ ObjC++ Undocumented
727 nostdinc
728 C ObjC C++ ObjC++
729 Do not search standard system include directories (those specified with -isystem will still be used)
731 nostdinc++
732 C++ ObjC++
733 Do not search standard system include directories for C++
736 C ObjC C++ ObjC++ Joined Separate
737 ; Documented in common.opt
739 pedantic
740 C ObjC C++ ObjC++
741 ; Documented in common.opt
743 pedantic-errors
744 C ObjC C++ ObjC++
745 ; Documented in common.opt
747 print-objc-runtime-info
748 ObjC ObjC++
749 Generate C header of platform-specific features
751 remap
752 C ObjC C++ ObjC++
753 Remap file names when including files
755 std=c++98
756 C++ ObjC++
757 Conform to the ISO 1998 C++ standard
759 std=c89
760 C ObjC
761 Conform to the ISO 1990 C standard
763 std=c99
764 C ObjC
765 Conform to the ISO 1999 C standard
767 std=c9x
768 C ObjC
769 Deprecated in favor of -std=c99
771 std=gnu++98
772 C++ ObjC++
773 Conform to the ISO 1998 C++ standard with GNU extensions
775 std=gnu89
776 C ObjC
777 Conform to the ISO 1990 C standard with GNU extensions
779 std=gnu99
780 C ObjC
781 Conform to the ISO 1999 C standard with GNU extensions
783 std=gnu9x
784 C ObjC
785 Deprecated in favor of -std=gnu99
787 std=iso9899:1990
788 C ObjC
789 Deprecated in favor of -std=c89
791 std=iso9899:199409
792 C ObjC
793 Conform to the ISO 1990 C standard as amended in 1994
795 std=iso9899:1999
796 C ObjC
797 Deprecated in favor of -std=c99
799 std=iso9899:199x
800 C ObjC
801 Deprecated in favor of -std=c99
803 traditional-cpp
804 C ObjC C++ ObjC++
805 Enable traditional preprocessing
807 trigraphs
808 C ObjC C++ ObjC++
809 -trigraphs      Support ISO C trigraphs
811 undef
812 C ObjC C++ ObjC++
813 Do not predefine system-specific and GCC-specific macros
816 C ObjC C++ ObjC++
817 Enable verbose output
820 C ObjC C++ ObjC++
821 ; Documented in common.opt
823 ; This comment is to ensure we retain the blank line above.