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