]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/gcc/c.opt
This commit was generated by cvs2svn to compensate for changes in r169695,
[FreeBSD/FreeBSD.git] / contrib / gcc / c.opt
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
62 ; $FreeBSD$
63
64 Language
65 C
66
67 Language
68 ObjC
69
70 Language
71 C++
72
73 Language
74 ObjC++
75
76 -output-pch=
77 C ObjC C++ ObjC++ Joined Separate
78
79 A
80 C ObjC C++ ObjC++ Joined Separate
81 -A<question>=<answer>   Assert the <answer> to <question>.  Putting '-' before <question> disables the <answer> to <question>
82
83 C
84 C ObjC C++ ObjC++
85 Do not discard comments
86
87 CC
88 C ObjC C++ ObjC++
89 Do not discard comments in macro expansions
90
91 D
92 C ObjC C++ ObjC++ Joined Separate
93 -D<macro>[=<val>]       Define a <macro> with <val> as its value.  If just <macro> is given, <val> is taken to be 1
94
95 E
96 C ObjC C++ ObjC++ Undocumented
97
98 H
99 C ObjC C++ ObjC++
100 Print the name of header files as they are used
101
102 I
103 C ObjC C++ ObjC++ Joined Separate
104 -I <dir>        Add <dir> to the end of the main include path.  -I- gives more include path control; see info documentation
105
106 M
107 C ObjC C++ ObjC++
108 Generate make dependencies
109
110 MD
111 C ObjC C++ ObjC++ Separate
112 Generate make dependencies and compile
113
114 MF
115 C ObjC C++ ObjC++ Joined Separate
116 -MF <file>      Write dependency output to the given file
117
118 MG
119 C ObjC C++ ObjC++
120 Treat missing header files as generated files
121
122 MM
123 C ObjC C++ ObjC++
124 Like -M but ignore system header files
125
126 MMD
127 C ObjC C++ ObjC++ Separate
128 Like -MD but ignore system header files
129
130 MP
131 C ObjC C++ ObjC++
132 Generate phony targets for all headers
133
134 MQ
135 C ObjC C++ ObjC++ Joined Separate
136 -MQ <target>    Add a MAKE-quoted target
137
138 MT
139 C ObjC C++ ObjC++ Joined Separate
140 -MT <target>    Add an unquoted target
141
142 P
143 C ObjC C++ ObjC++
144 Do not generate #line directives
145
146 U
147 C ObjC C++ ObjC++ Joined Separate
148 -U<macro>       Undefine <macro>
149
150 Wabi
151 C++ ObjC++
152
153 Wall
154 C ObjC C++ ObjC++
155 Enable most warning messages
156
157 Wbad-function-cast
158 C ObjC
159 Warn about casting functions to incompatible types
160
161 Wcast-qual
162 C ObjC C++ ObjC++
163 Warn about casts which discard qualifiers
164
165 Wchar-subscripts
166 C ObjC C++ ObjC++
167 Warn about subscripts whose type is \"char\"
168
169 Wcomment
170 C ObjC C++ ObjC++
171 Warn about possibly nested block comments, and C++ comments spanning more than one physical line
172
173 Wcomments
174 C ObjC C++ ObjC++
175 Synonym for -Wcomment
176
177 Wconversion
178 C ObjC C++ ObjC++
179 Warn about possibly confusing type conversions
180
181 Wctor-dtor-privacy
182 C++ ObjC++
183 Warn when all constructors and destructors are private
184
185 Wdeclaration-after-statement
186 C ObjC
187 Warn when a declaration is found after a statement
188
189 Wdeprecated
190 C++ ObjC++
191 Warn about deprecated compiler features
192
193 Wdiv-by-zero
194 C ObjC
195 Warn about compile-time integer division by zero
196
197 Weffc++
198 C++ ObjC++
199 Warn about violations of Effective C++ style rules
200
201 Wendif-labels
202 C ObjC C++ ObjC++
203 Warn about stray tokens after #elif and #endif
204
205 Werror
206 C ObjC C++ ObjC++
207 ; Documented in common.opt
208
209 Werror-implicit-function-declaration
210 C ObjC RejectNegative
211 Make implicit function declarations an error
212
213 Wfloat-equal
214 C ObjC C++ ObjC++
215 Warn if testing floating point numbers for equality
216
217 Wformat
218 C ObjC C++ ObjC++
219 Warn about printf/scanf/strftime/strfmon format string anomalies
220
221 Wformat-extra-args
222 C ObjC C++ ObjC++
223 Warn if passing too many arguments to a function for its format string
224
225 Wformat-nonliteral
226 C ObjC C++ ObjC++
227 Warn about format strings that are not literals
228
229 Wformat-security
230 C ObjC C++ ObjC++
231 Warn about possible security problems with format functions
232
233 Wformat-y2k
234 C ObjC C++ ObjC++
235 Warn about strftime formats yielding 2-digit years
236
237 Wformat-zero-length
238 C ObjC
239
240 Wformat=
241 C ObjC C++ ObjC++ Joined
242
243 Winit-self
244 C ObjC C++ ObjC++
245 Warn about variables which are initialized to themselves.
246
247 Wimplicit
248 C ObjC C++ ObjC++
249
250 Wimplicit-function-declaration
251 C ObjC
252 Warn about implicit function declarations
253
254 Wimplicit-int
255 C ObjC
256 Warn when a declaration does not specify a type
257
258 Wimport
259 C ObjC C++ ObjC++
260 Deprecated.  This switch has no effect.
261
262 Winvalid-offsetof
263 C++ ObjC++
264 Warn about invalid uses of the \"offsetof\" macro
265
266 Winvalid-pch
267 C ObjC C++ ObjC++
268 Warn about PCH files that are found but not used
269
270 Wlong-long
271 C ObjC C++ ObjC++
272 Do not warn about using \"long long\" when -pedantic
273
274 Wmain
275 C ObjC
276 Warn about suspicious declarations of \"main\"
277
278 Wmissing-braces
279 C ObjC C++ ObjC++
280 Warn about possibly missing braces around initializers
281
282 Wmissing-declarations
283 C ObjC
284 Warn about global functions without previous declarations
285
286 Wmissing-format-attribute
287 C ObjC C++ ObjC++
288 Warn about functions which might be candidates for format attributes
289
290 Wmissing-prototypes
291 C ObjC
292 Warn about global functions without prototypes
293
294 Wmultichar
295 C ObjC C++ ObjC++
296 Warn about use of multi-character character constants
297
298 Wnested-externs
299 C ObjC
300 Warn about \"extern\" declarations not at file scope
301
302 Wnon-template-friend
303 C++ ObjC++
304 Warn when non-templatized friend functions are declared within a template
305
306 Wnon-virtual-dtor
307 C++ ObjC++
308 Warn about non-virtual destructors
309
310 Wnonnull
311 C ObjC
312
313 Wold-style-cast
314 C++ ObjC++
315 Warn if a C-style cast is used in a program
316
317 Wold-style-definition
318 C ObjC
319 Warn if an old-style parameter definition is used
320
321 Woverloaded-virtual
322 C++ ObjC++
323 Warn about overloaded virtual function names
324
325 Wparentheses
326 C ObjC C++ ObjC++
327 Warn about possibly missing parentheses
328
329 Wpmf-conversions
330 C++ ObjC++
331 Warn when converting the type of pointers to member functions
332
333 Wpointer-arith
334 C ObjC C++ ObjC++
335 Warn about function pointer arithmetic
336
337 Wprotocol
338 ObjC ObjC++
339 Warn if inherited methods are unimplemented
340
341 Wredundant-decls
342 C ObjC C++ ObjC++
343 Warn about multiple declarations of the same object
344
345 Wreorder
346 C++ ObjC++
347 Warn when the compiler reorders code
348
349 Wreturn-type
350 C ObjC C++ ObjC++
351 Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
352
353 Wselector
354 ObjC ObjC++
355 Warn if a selector has multiple methods
356
357 Wsequence-point
358 C ObjC
359 Warn about possible violations of sequence point rules
360
361 Wsign-compare
362 C ObjC C++ ObjC++
363 Warn about signed-unsigned comparisons
364
365 Wsign-promo
366 C++ ObjC++
367 Warn when overload promotes from unsigned to signed
368
369 Wstrict-prototypes
370 C ObjC
371 Warn about unprototyped function declarations
372
373 Wsynth
374 C++ ObjC++
375 Warn when synthesis behavior differs from Cfront
376
377 Wsystem-headers
378 C ObjC C++ ObjC++
379 Do not suppress warnings from system headers
380
381 Wtraditional
382 C ObjC
383 Warn about features not present in traditional C
384
385 Wtrigraphs
386 C ObjC C++ ObjC++
387 Warn if trigraphs are encountered that might affect the meaning of the program
388
389 Wundeclared-selector
390 ObjC ObjC++
391
392 Wundef
393 C ObjC C++ ObjC++
394 Warn if an undefined macro is used in an #if directive
395
396 Wunknown-pragmas
397 C ObjC C++ ObjC++
398 Warn about unrecognized pragmas
399
400 Wunused-macros
401 C ObjC C++ ObjC++
402 Warn about macros defined in the main file that are not used
403
404 Wwrite-strings
405 C ObjC C++ ObjC++
406 Give strings the type \"array of char\"
407
408 ansi
409 C ObjC C++ ObjC++
410 A synonym for -std=c89 (for C) or -std=c++98 (for C++).
411
412 d
413 C ObjC C++ ObjC++ Joined
414 ; Documented in common.opt.  FIXME - what about -dI, -dD, -dN and -dD?
415
416 faccess-control
417 C++ ObjC++
418 Enforce class member access control semantics
419
420 fall-virtual
421 C++ ObjC++
422
423 falt-external-templates
424 C++ ObjC++
425 Change when template instances are emitted
426
427 fasm
428 C ObjC C++ ObjC++
429 Recognize the \"asm\" keyword
430
431 fbuiltin
432 C ObjC C++ ObjC++
433 Recognize built-in functions
434
435 fbuiltin-
436 C ObjC C++ ObjC++ Joined
437
438 fcheck-new
439 C++ ObjC++
440 Check the return value of new
441
442 fcond-mismatch
443 C ObjC C++ ObjC++
444 Allow the arguments of the '?' operator to have different types
445
446 fconserve-space
447 C++ ObjC++
448 Reduce the size of object files
449
450 fconst-strings
451 C++ ObjC++
452 Make string literals \"const char[]\" not \"char[]\"
453
454 fconstant-string-class=
455 ObjC ObjC++ Joined
456 -fconst-string-class=<name>     Use class <name> for constant strings
457
458 fdefault-inline
459 C++ ObjC++
460 Inline member functions by default
461
462 fdollars-in-identifiers
463 C ObjC C++ ObjC++
464 Permit '$' as an identifier character
465
466 fdump-
467 C ObjC C++ ObjC++ Joined RejectNegative
468 -fdump-<type>   Dump various compiler internals to a file
469
470 felide-constructors
471 C++ ObjC++
472
473 fenforce-eh-specs
474 C++ ObjC++
475 Generate code to check exception specifications
476
477 fenum-int-equiv
478 C++ ObjC++
479
480 fexec-charset=
481 C ObjC C++ ObjC++ Joined RejectNegative
482 -fexec-charset=<cset>   Convert all strings and character constants to character set <cset>
483
484 finput-charset=
485 C ObjC C++ ObjC++ Joined RejectNegative
486 -finput-charset=<cset>      Specify the default character set for source files.
487
488
489 fexternal-templates
490 C++ ObjC++
491
492 ffixed-form
493 C ObjC
494
495 ffixed-line-length-
496 C ObjC Joined
497
498 ffor-scope
499 C++ ObjC++
500 Scope of for-init-statement variables is local to the loop
501
502 ffreestanding
503 C ObjC
504 Do not assume that standard C libraries and \"main\" exist
505
506 fgnu-keywords
507 C++ ObjC++
508 Recognize GNU-defined keywords
509
510 fgnu-runtime
511 ObjC ObjC++
512 Generate code for GNU runtime environment
513
514 fguiding-decls
515 C++ ObjC++
516
517 fhandle-exceptions
518 C++ ObjC++
519
520 fhonor-std
521 C++ ObjC++
522
523 fhosted
524 C ObjC
525 Assume normal C execution environment
526
527 fhuge-objects
528 C++ ObjC++
529 Enable support for huge objects
530
531 fimplement-inlines
532 C++ ObjC++
533 Export functions even if they can be inlined
534
535 fimplicit-inline-templates
536 C++ ObjC++
537 Emit implicit instantiations of inline templates
538
539 fimplicit-templates
540 C++ ObjC++
541 Emit implicit instantiations of templates
542
543 flabels-ok
544 C++ ObjC++
545
546 fms-extensions
547 C ObjC C++ ObjC++
548 Don't warn about uses of Microsoft extensions
549
550 fname-mangling-version-
551 C++ ObjC++ Joined
552
553 fnew-abi
554 C++ ObjC++
555
556 fnext-runtime
557 ObjC ObjC++
558 Generate code for NeXT (Apple Mac OS X) runtime environment
559
560 fnil-receivers
561 ObjC ObjC++
562 Assume that receivers of Objective-C messages may be nil
563
564 fnonansi-builtins
565 C++ ObjC++
566
567 fnonnull-objects
568 C++ ObjC++
569
570 fobjc-exceptions
571 ObjC ObjC++
572 Enable Objective-C exception and synchronization syntax
573
574 foperator-names
575 C++ ObjC++
576 Recognize C++ kewords like \"compl\" and \"xor\"
577
578 foptional-diags
579 C++ ObjC++
580 Enable optional diagnostics
581
582 fpch-deps
583 C ObjC C++ ObjC++
584
585 fpermissive
586 C++ ObjC++
587 Downgrade conformance errors to warnings
588
589 fpreprocessed
590 C ObjC C++ ObjC++
591 Treat the input file as already preprocessed
592
593 freplace-objc-classes
594 ObjC ObjC++
595 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime
596
597 frepo
598 C++ ObjC++
599 Enable automatic template instantiation
600
601 frtti
602 C++ ObjC++
603 Generate run time type descriptor information
604
605 fshort-double
606 C ObjC C++ ObjC++
607 Use the same size for double as for float
608
609 fshort-enums
610 C ObjC C++ ObjC++
611 Use the narrowest integer type possible for enumeration types
612
613 fshort-wchar
614 C ObjC C++ ObjC++
615 Force the underlying type for \"wchar_t\" to be \"unsigned short\"
616
617 fshow-column
618 C ObjC C++ ObjC++
619
620 fsigned-bitfields
621 C ObjC C++ ObjC++
622 When \"signed\" or \"unsigned\" is not given make the bitfield signed
623
624 fsigned-char
625 C ObjC C++ ObjC++
626 Make \"char\" signed by default
627
628 fsquangle
629 C++ ObjC++
630
631 fstats
632 C++ ObjC++
633 Display statistics accumulated during compilation
634
635 fstrict-prototype
636 C++ ObjC++
637
638 ftabstop=
639 C ObjC C++ ObjC++ Joined RejectNegative UInteger
640 -ftabstop=<number>      Distance between tab stops for column reporting
641
642 ftemplate-depth-
643 C++ ObjC++ Joined RejectNegative UInteger 
644 -ftemplate-depth-<number>       Specify maximum template instantiation depth
645
646 fthis-is-variable
647 C++ ObjC++
648
649 funsigned-bitfields
650 C ObjC C++ ObjC++
651 When \"signed\" or \"unsigned\" is not given make the bitfield unsigned
652
653 funsigned-char
654 C ObjC C++ ObjC++
655 Make \"char\" unsigned by default
656
657 fuse-cxa-atexit
658 C++ ObjC++
659 Use __cxa_atexit to register destructors
660
661 fvtable-gc
662 C++ ObjC++
663 Discard unused virtual functions
664
665 fvtable-thunks
666 C++ ObjC++
667 Implement vtables using thunks
668
669 fweak
670 C++ ObjC++
671 Emit common-like symbols as weak symbols
672
673 fwide-exec-charset=
674 C ObjC C++ ObjC++ Joined RejectNegative
675 -fwide-exec-charset=<cset>      Convert all wide strings and character constants to character set <cset>
676
677 fworking-directory
678 C ObjC C++ ObjC++
679 Generate a #line directive pointing at the current working directory
680
681 fxref
682 C++ ObjC++
683 Emit cross referencing information
684
685 fzero-link
686 ObjC ObjC++
687 Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode
688
689 gen-decls
690 ObjC ObjC++
691 Dump declarations to a .decl file
692
693 idirafter
694 C ObjC C++ ObjC++ Joined Separate
695 -idirafter <dir>        Add <dir> to the end of the system include path
696
697 imacros
698 C ObjC C++ ObjC++ Joined Separate
699 -imacros <file> Accept definition of macros in <file>
700
701 include
702 C ObjC C++ ObjC++ Joined Separate
703 -include <file> Include the contents of <file> before other files
704
705 iprefix
706 C ObjC C++ ObjC++ Joined Separate
707 -iprefix <path> Specify <path> as a prefix for next two options
708
709 isysroot
710 C ObjC C++ ObjC++ Joined Separate
711 -isysroot <dir> Set <dir> to be the system root directory
712
713 isystem
714 C ObjC C++ ObjC++ Joined Separate
715 -isystem <dir>  Add <dir> to the start of the system include path
716
717 iwithprefix
718 C ObjC C++ ObjC++ Joined Separate
719 -iwithprefix <dir>      Add <dir> to the end of the system include path
720
721 iwithprefixbefore
722 C ObjC C++ ObjC++ Joined Separate
723 -iwithprefixbefore <dir>        Add <dir> to the end of the main include path
724
725 lang-asm
726 C Undocumented
727
728 lang-objc
729 C ObjC C++ ObjC++ Undocumented
730
731 nostdinc
732 C ObjC C++ ObjC++
733 Do not search standard system include directories (those specified with -isystem will still be used)
734
735 nostdinc++
736 C++ ObjC++
737 Do not search standard system include directories for C++
738
739 o
740 C ObjC C++ ObjC++ Joined Separate
741 ; Documented in common.opt
742
743 pedantic
744 C ObjC C++ ObjC++
745 ; Documented in common.opt
746
747 pedantic-errors
748 C ObjC C++ ObjC++
749 ; Documented in common.opt
750
751 print-objc-runtime-info
752 ObjC ObjC++
753 Generate C header of platform-specific features
754
755 remap
756 C ObjC C++ ObjC++
757 Remap file names when including files
758
759 std=c++98
760 C++ ObjC++
761 Conform to the ISO 1998 C++ standard
762
763 std=c89
764 C ObjC
765 Conform to the ISO 1990 C standard
766
767 std=c99
768 C ObjC
769 Conform to the ISO 1999 C standard
770
771 std=c9x
772 C ObjC
773 Deprecated in favor of -std=c99
774
775 std=gnu++98
776 C++ ObjC++
777 Conform to the ISO 1998 C++ standard with GNU extensions
778
779 std=gnu89
780 C ObjC
781 Conform to the ISO 1990 C standard with GNU extensions
782
783 std=gnu99
784 C ObjC
785 Conform to the ISO 1999 C standard with GNU extensions
786
787 std=gnu9x
788 C ObjC
789 Deprecated in favor of -std=gnu99
790
791 std=iso9899:1990
792 C ObjC
793 Conform to the ISO 1990 C standard
794
795 std=iso9899:199409
796 C ObjC
797 Conform to the ISO 1990 C standard as amended in 1994
798
799 std=iso9899:1999
800 C ObjC
801 Conform to the ISO 1999 C standard
802
803 std=iso9899:199x
804 C ObjC
805 Deprecated in favor of -std=iso9899:1999
806
807 traditional-cpp
808 C ObjC C++ ObjC++
809 Enable traditional preprocessing
810
811 trigraphs
812 C ObjC C++ ObjC++
813 -trigraphs      Support ISO C trigraphs
814
815 undef
816 C ObjC C++ ObjC++
817 Do not predefine system-specific and GCC-specific macros
818
819 v
820 C ObjC C++ ObjC++
821 Enable verbose output
822
823 w
824 C ObjC C++ ObjC++
825 ; Documented in common.opt
826
827 fformat-extensions
828 C ObjC C++ ObjC++
829 Enable FreeBSD format extensions
830
831 ; This comment is to ensure we retain the blank line above.