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