forked from riscvarchive/riscv-gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.opt
3415 lines (2546 loc) · 98.7 KB
/
common.opt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; Options for the language- and target-independent parts of the compiler.
; Copyright (C) 2003-2020 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 3, or (at your option) any later
; version.
;
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; for more details.
;
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
; See the GCC internals manual (options.texi) for a description of this file's format.
; Please try to keep this file in ASCII collating order.
Variable
int target_flags
Variable
int optimize
Variable
int optimize_size
Variable
int optimize_debug
; Not used directly to control optimizations, only to save -Ofast
; setting for "optimize" attributes.
Variable
int optimize_fast
; True if this is the lto front end. This is used to disable gimple
; generation and lowering passes that are normally run on the output
; of a front end. These passes must be bypassed for lto since they
; have already been done before the gimple was written.
Variable
bool in_lto_p = false
; This variable is set to non-0 only by LTO front-end. 1 indicates that
; the output produced will be used for incrmeental linking (thus weak symbols
; can still be bound) and 2 indicates that the IL is going to be linked and
; and output to LTO object file.
Variable
enum incremental_link flag_incremental_link = INCREMENTAL_LINK_NONE
; 0 means straightforward implementation of complex divide acceptable.
; 1 means wide ranges of inputs must work for complex divide.
; 2 means C99-like requirements for complex multiply and divide.
Variable
int flag_complex_method = 1
; Language specific warning pass for unused results.
Variable
bool flag_warn_unused_result = false
; Nonzero if we should write GIMPLE bytecode for link-time optimization.
Variable
int flag_generate_lto
; Nonzero if we should write GIMPLE bytecode for offload compilation.
Variable
int flag_generate_offload = 0
; Nonzero means we should be saving declaration info into a .X file.
Variable
int flag_gen_aux_info = 0
; Nonzero if we are compiling code for a shared library, zero for
; executable.
Variable
int flag_shlib
; These two are really VEC(char_p,heap) *.
Variable
void *flag_instrument_functions_exclude_functions
Variable
void *flag_instrument_functions_exclude_files
; Generic structs (e.g. templates not explicitly specialized)
; may not have a compilation unit associated with them, and so
; may need to be treated differently from ordinary structs.
;
; Structs only handled by reference (indirectly), will also usually
; not need as much debugging information.
Variable
enum debug_struct_file debug_struct_ordinary[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }
Variable
enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }
; True if we should exit after parsing options.
Variable
bool exit_after_options
; Type(s) of debugging information we are producing (if any). See
; flag-types.h for the definitions of the different possible types of
; debugging information.
Variable
enum debug_info_type write_symbols = NO_DEBUG
; Level of debugging information we are producing. See flag-types.h
; for the definitions of the different possible levels.
Variable
enum debug_info_levels debug_info_level = DINFO_LEVEL_NONE
; Nonzero means use GNU-only extensions in the generated symbolic
; debugging information. Currently, this only has an effect when
; write_symbols is set to DBX_DEBUG or XCOFF_DEBUG.
Variable
bool use_gnu_debug_info_extensions
; Original value of maximum field alignment in bytes, specified via
; -fpack-struct=<value>.
Variable
unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT
; Type of stack check.
Variable
enum stack_check_type flag_stack_check = NO_STACK_CHECK
; True if stack usage information needs to be computed.
Variable
bool flag_stack_usage_info = false
; -dA causes debug commentary information to be produced in
; the generated assembly code (to make it more readable). This option
; is generally only of use to those who actually need to read the
; generated assembly code (perhaps while debugging the compiler itself).
; Currently, this switch is only used by dwarf2out.c; however, it is intended
; to be a catchall for printing debug information in the assembler file.
Variable
int flag_debug_asm
; How many NOP insns to place at each function entry by default
Variable
HOST_WIDE_INT function_entry_patch_area_size
; And how far the real asm entry point is into this area
Variable
HOST_WIDE_INT function_entry_patch_area_start
; Balance between GNAT encodings and standard DWARF to emit.
Variable
enum dwarf_gnat_encodings gnat_encodings = DWARF_GNAT_ENCODINGS_DEFAULT
; -dP causes the rtl to be emitted as a comment in assembly.
Variable
int flag_dump_rtl_in_asm
; Whether -da was passed (used only in handle_common_deferred_options).
Variable
bool flag_dump_all_passed
; Other flags saying which kinds of debugging dump have been requested.
Variable
int rtl_dump_and_exit
Variable
int flag_print_asm_name
; Name of top-level original source file (what was input to cpp).
; This comes from the #-command at the beginning of the actual input.
; If there isn't any there, then this is the cc1 input file name.
Variable
const char *main_input_filename
; Pointer to base name in main_input_filename, with directories and a
; single final extension removed, and the length of this base
; name.
Variable
const char *main_input_basename
Variable
int main_input_baselength
; Which options have been printed by --help.
Variable
char *help_printed
; Which enums have been printed by --help. 0 = not printed, no
; relevant options seen, 1 = relevant option seen, not yet printed, 2
; = printed.
Variable
char *help_enum_printed
; The number of columns for --help output.
Variable
unsigned int help_columns
; Whether this options structure has been through finish_options
Variable
bool flag_opts_finished
; What the sanitizer should instrument
Variable
unsigned int flag_sanitize
; What sanitizers should recover from errors
Variable
unsigned int flag_sanitize_recover = (SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT | SANITIZE_KERNEL_ADDRESS) & ~(SANITIZE_UNREACHABLE | SANITIZE_RETURN)
; What the coverage sanitizers should instrument
Variable
unsigned int flag_sanitize_coverage
; Flag whether a prefix has been added to dump_base_name
Variable
bool dump_base_name_prefixed = false
; Flag whether HSA generation has been explicitely disabled
Variable
bool flag_disable_hsa = false
###
Driver
-assemble
Driver Alias(S)
-compile
Driver Alias(c)
-completion=
Common Driver Joined Undocumented
Provide bash completion for options starting with provided string.
-coverage
Driver Alias(coverage)
-debug
Common Alias(g)
-dump
Common Separate Alias(d)
-dump=
Common Joined Alias(d)
-dumpbase
Common Separate Alias(dumpbase)
-dumpdir
Common Separate Alias(dumpdir)
-entry
Driver Separate Alias(e)
-entry=
Driver Joined Alias(e)
-extra-warnings
Common Warning Alias(Wextra)
-for-assembler
Driver Separate Alias(Xassembler)
-for-assembler=
Driver JoinedOrMissing Alias(Xassembler)
-for-linker
Driver Separate Alias(Xlinker)
-for-linker=
Driver JoinedOrMissing Alias(Xlinker)
-force-link
Driver Separate Alias(u)
-force-link=
Driver Joined Alias(u)
-help
Common Driver Var(help_flag)
Display this information.
-help=
Common Driver Report Joined
--help=<class> Display descriptions of a specific class of options. <class> is one or more of optimizers, target, warnings, undocumented, params.
-language
Driver Separate Alias(x)
-language=
Driver Joined Alias(x)
-library-directory
Driver Separate Alias(L)
-library-directory=
Driver Joined Alias(L)
-no-canonical-prefixes
Driver Alias(no-canonical-prefixes)
-no-standard-libraries
Driver Alias(nostdlib)
-no-sysroot-suffix
Driver Var(no_sysroot_suffix)
-no-warnings
Common Alias(w)
-optimize
Common Alias(O)
-output
Common Driver Separate Alias(o) MissingArgError(missing filename after %qs)
-output=
Common Driver Joined Alias(o) MissingArgError(missing filename after %qs)
-pass-exit-codes
Driver Alias(pass-exit-codes)
-pedantic
Common Alias(Wpedantic)
-pedantic-errors
Common Alias(pedantic-errors)
-pie
Driver Alias(pie)
-static-pie
Driver Alias(static-pie)
-pipe
Driver Alias(pipe)
-prefix
Driver Separate Alias(B)
-prefix=
Driver JoinedOrMissing Alias(B)
-preprocess
Driver Alias(E)
-print-file-name
Driver Separate Alias(print-file-name=)
-print-file-name=
Driver JoinedOrMissing Alias(print-file-name=)
-print-libgcc-file-name
Driver Alias(print-libgcc-file-name)
-print-multi-directory
Driver Alias(print-multi-directory)
-print-multi-lib
Driver Alias(print-multi-lib)
-print-multi-os-directory
Driver Alias(print-multi-os-directory)
-print-multiarch
Driver Alias(print-multiarch)
-print-prog-name
Driver Separate Alias(print-prog-name=)
-print-prog-name=
Driver JoinedOrMissing Alias(print-prog-name=)
-print-search-dirs
Driver Alias(print-search-dirs)
-print-sysroot
Driver Alias(print-sysroot)
-print-sysroot-headers-suffix
Driver Alias(print-sysroot-headers-suffix)
-profile
Common Alias(p)
-save-temps
Driver Alias(save-temps)
-shared
Driver Alias(shared)
-specs
Driver Separate Alias(specs=)
-specs=
Driver Joined Alias(specs=)
-static
Driver Alias(static)
-symbolic
Driver Alias(symbolic)
-target-help
Common Driver
Alias for --help=target.
-time
Driver Alias(time)
-verbose
Driver Alias(v)
;; The driver used to convert options such as --help into forms such
;; as -fhelp; the following four entries are for compatibility with
;; any direct uses of those (undocumented) -f forms
fhelp
Common Driver Alias(-help)
fhelp=
Common Driver Joined Alias(-help=)
ftarget-help
Common Driver Alias(-target-help)
fversion
Common Driver Alias(-version)
-sysroot
Driver Separate Alias(-sysroot=)
-sysroot=
Driver JoinedOrMissing
-version
Common Driver
B
Driver Joined Separate
E
Driver
L
Driver Joined Separate
N
Driver
O
Common JoinedOrMissing Optimization
-O<number> Set optimization level to <number>.
Os
Common Optimization
Optimize for space rather than speed.
Ofast
Common Optimization
Optimize for speed disregarding exact standards compliance.
Og
Common Optimization
Optimize for debugging experience rather than speed or size.
Q
Driver
Qn
Driver Negative(Qy)
Qy
Driver Negative(Qn)
R
Driver Joined Separate
S
Driver
T
Driver Joined Separate
Tbss
Driver Separate
Tbss=
Driver Joined
Tdata
Driver Separate
Tdata=
Driver Joined
Ttext
Driver Separate
Ttext=
Driver Joined
W
Common RejectNegative Warning Alias(Wextra)
This switch is deprecated; use -Wextra instead.
Wa,
Driver JoinedOrMissing RejectNegative
Wl,
Driver JoinedOrMissing RejectNegative
Wp,
Driver JoinedOrMissing RejectNegative
Waggregate-return
Common Var(warn_aggregate_return) Warning
Warn about returning structures, unions or arrays.
Waggressive-loop-optimizations
Common Var(warn_aggressive_loop_optimizations) Init(1) Warning
Warn if a loop with constant number of iterations triggers undefined behavior.
Warray-bounds
Common Var(warn_array_bounds) Warning
Warn if an array is accessed out of bounds.
Warray-bounds=
Common Joined RejectNegative UInteger Var(warn_array_bounds) Warning IntegerRange(0, 2)
Warn if an array is accessed out of bounds.
Wattributes
Common Var(warn_attributes) Init(1) Warning
Warn about inappropriate attribute usage.
Wattribute-alias
Common Alias(Wattribute_alias=, 1, 0) Warning
Warn about type safety and similar errors and mismatches in declarations with alias attributes.
Wattribute-alias=
Common Joined RejectNegative UInteger Var(warn_attribute_alias) Init(1) Warning IntegerRange(0, 2)
Warn about type safety and similar errors and mismatches in declarations with alias attributes.
Wcannot-profile
Common Var(warn_cannot_profile) Init(1) Warning
Warn when profiling instrumentation was requested, but could not be applied to
a certain function.
Wcast-align
Common Var(warn_cast_align) Warning
Warn about pointer casts which increase alignment.
Wcast-align=strict
Common Var(warn_cast_align,2) Warning
Warn about pointer casts which increase alignment.
Wcpp
Common Var(warn_cpp) Init(1) Warning
Warn when a #warning directive is encountered.
Wattribute-warning
Common Var(warn_attribute_warning) Init(1) Warning
Warn about uses of __attribute__((warning)) declarations.
Wdeprecated
Common Var(warn_deprecated) Init(1) Warning
Warn if a deprecated compiler feature, class, method, or field is used.
Wdeprecated-declarations
Common Var(warn_deprecated_decl) Init(1) Warning
Warn about uses of __attribute__((deprecated)) declarations.
Wdisabled-optimization
Common Var(warn_disabled_optimization) Warning
Warn when an optimization pass is disabled.
Werror
Common Var(warnings_are_errors)
Treat all warnings as errors.
Werror=
Common Joined
Treat specified warning as error.
Wextra
Common Var(extra_warnings) Warning
Print extra (possibly unwanted) warnings.
Wfatal-errors
Common Var(flag_fatal_errors)
Exit on the first error occurred.
Wframe-larger-than=
Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_frame_larger_than_size) Init(HOST_WIDE_INT_MAX)
-Wframe-larger-than=<byte-size> Warn if a function's stack frame requires in excess of <byte-size>.
Wno-frame-larger-than
Common Alias(Wframe-larger-than=,18446744073709551615EiB,none) Warning
Disable -Wframe-larger-than= warning. Equivalent to -Wframe-larger-than=<SIZE_MAX> or larger.
Wfree-nonheap-object
Common Var(warn_free_nonheap_object) Init(1) Warning
Warn when attempting to free a non-heap object.
Whsa
Common Var(warn_hsa) Init(1) Warning
Warn when a function cannot be expanded to HSAIL.
Wimplicit-fallthrough
Common Alias(Wimplicit-fallthrough=,3,0) Warning
Wimplicit-fallthrough=
Common Var(warn_implicit_fallthrough) RejectNegative Joined UInteger Warning IntegerRange(0, 5)
Warn when a switch case falls through.
Winline
Common Var(warn_inline) Warning Optimization
Warn when an inlined function cannot be inlined.
Winvalid-memory-model
Common Var(warn_invalid_memory_model) Init(1) Warning
Warn when an atomic memory model parameter is known to be outside the valid range.
Wlarger-than-
Common RejectNegative Joined Warning Undocumented Alias(Wlarger-than=)
Wlarger-than=
Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_larger_than_size) Init(HOST_WIDE_INT_MAX)
-Wlarger-than=<byte-size> Warn if an object's size exceeds <byte-size>.
Wno-larger-than
Common Alias(Wlarger-than=,18446744073709551615EiB,none) Warning
Disable -Wlarger-than= warning. Equivalent to -Wlarger-than=<SIZE_MAX> or larger.
Wnonnull-compare
Var(warn_nonnull_compare) Warning
Warn if comparing pointer parameter with nonnull attribute with NULL.
Wnull-dereference
Common Var(warn_null_dereference) Warning
Warn if dereferencing a NULL pointer may lead to erroneous or undefined behavior.
Wunsafe-loop-optimizations
Common Ignore Warning
Does nothing. Preserved for backward compatibility.
Wmissing-noreturn
Common Warning Alias(Wsuggest-attribute=noreturn)
Wodr
Common Var(warn_odr_violations) Init(1) Warning
Warn about some C++ One Definition Rule violations during link time optimization.
Woverflow
Common Var(warn_overflow) Init(1) Warning
Warn about overflow in arithmetic expressions.
Wlto-type-mismatch
Common Var(warn_lto_type_mismatch) Init(1) Warning
During link time optimization warn about mismatched types of global declarations.
Wpacked
Common Var(warn_packed) Warning
Warn when the packed attribute has no effect on struct layout.
Wpadded
Common Var(warn_padded) Warning
Warn when padding is required to align structure members.
Wpedantic
Common Var(pedantic) Init(0) Warning
Issue warnings needed for strict compliance to the standard.
Wreturn-local-addr
Common Var(warn_return_local_addr) Init(1) Warning
Warn about returning a pointer/reference to a local or temporary variable.
Wshadow
Common Var(warn_shadow) Warning
Warn when one variable shadows another. Same as -Wshadow=global.
Wshadow=global
Common Warning Alias(Wshadow)
Warn when one variable shadows another (globally).
Wshadow=local
Common Var(warn_shadow_local) Warning EnabledBy(Wshadow)
Warn when one local variable shadows another local variable or parameter.
Wshadow-local
Common Warning Undocumented Alias(Wshadow=local)
Wshadow=compatible-local
Common Var(warn_shadow_compatible_local) Warning EnabledBy(Wshadow=local)
Warn when one local variable shadows another local variable or parameter of compatible type.
Wshadow-compatible-local
Common Warning Undocumented Alias(Wshadow=compatible-local)
Wstack-protector
Common Var(warn_stack_protect) Warning
Warn when not issuing stack smashing protection for some reason.
Wstack-usage=
Common Joined RejectNegative Host_Wide_Int ByteSize Var(warn_stack_usage) Warning Init(HOST_WIDE_INT_MAX)
-Wstack-usage=<byte-size> Warn if stack usage might exceed <byte-size>.
Wno-stack-usage
Common Alias(Wstack-usage=,18446744073709551615EiB,none) Warning
Disable Wstack-usage= warning. Equivalent to Wstack-usage=<SIZE_MAX> or larger.
Wstrict-aliasing
Common Warning
Warn about code which might break strict aliasing rules.
Wstrict-aliasing=
Common Joined RejectNegative UInteger Var(warn_strict_aliasing) Warning
Warn about code which might break strict aliasing rules.
Wstrict-overflow
Common Warning
Warn about optimizations that assume that signed overflow is undefined.
Wstrict-overflow=
Common Joined RejectNegative UInteger Var(warn_strict_overflow) Warning
Warn about optimizations that assume that signed overflow is undefined.
Wsuggest-attribute=cold
Common Var(warn_suggest_attribute_cold) Warning
Warn about functions which might be candidates for __attribute__((cold)).
Wsuggest-attribute=const
Common Var(warn_suggest_attribute_const) Warning
Warn about functions which might be candidates for __attribute__((const)).
Wsuggest-attribute=pure
Common Var(warn_suggest_attribute_pure) Warning
Warn about functions which might be candidates for __attribute__((pure)).
Wsuggest-attribute=noreturn
Common Var(warn_suggest_attribute_noreturn) Warning
Warn about functions which might be candidates for __attribute__((noreturn)).
Wsuggest-attribute=malloc
Common Var(warn_suggest_attribute_malloc) Warning
Warn about functions which might be candidates for __attribute__((malloc)).
Wsuggest-final-types
Common Var(warn_suggest_final_types) Warning
Warn about C++ polymorphic types where adding final keyword would improve code quality.
Wsuggest-final-methods
Common Var(warn_suggest_final_methods) Warning
Warn about C++ virtual methods where adding final keyword would improve code quality.
Wswitch-unreachable
Common Var(warn_switch_unreachable) Warning Init(1)
Warn about statements between switch's controlling expression and the first
case.
Wsystem-headers
Common Var(warn_system_headers) Warning
Do not suppress warnings from system headers.
Wtrampolines
Common Var(warn_trampolines) Warning
Warn whenever a trampoline is generated.
Wtype-limits
Common Var(warn_type_limits) Warning EnabledBy(Wextra)
Warn if a comparison is always true or always false due to the limited range of the data type.
Wuninitialized
Common Var(warn_uninitialized) Warning EnabledBy(Wextra)
Warn about uninitialized automatic variables.
Wmaybe-uninitialized
Common Var(warn_maybe_uninitialized) Warning EnabledBy(Wuninitialized)
Warn about maybe uninitialized automatic variables.
Wunreachable-code
Common Ignore Warning
Does nothing. Preserved for backward compatibility.
Wunused
Common Var(warn_unused) Init(0) Warning
Enable all -Wunused- warnings.
Wunused-but-set-parameter
Common Var(warn_unused_but_set_parameter) Warning EnabledBy(Wunused && Wextra)
Warn when a function parameter is only set, otherwise unused.
Wunused-but-set-variable
Common Var(warn_unused_but_set_variable) Warning EnabledBy(Wunused)
Warn when a variable is only set, otherwise unused.
Wunused-function
Common Var(warn_unused_function) Warning EnabledBy(Wunused)
Warn when a function is unused.
Wunused-label
Common Var(warn_unused_label) Warning EnabledBy(Wunused)
Warn when a label is unused.
Wunused-parameter
Common Var(warn_unused_parameter) Warning EnabledBy(Wunused && Wextra)
Warn when a function parameter is unused.
Wunused-value
Common Var(warn_unused_value) Warning EnabledBy(Wunused)
Warn when an expression value is unused.
Wunused-variable
Common Var(warn_unused_variable) Warning EnabledBy(Wunused)
Warn when a variable is unused.
Wcoverage-mismatch
Common Var(warn_coverage_mismatch) Init(1) Warning
Warn in case profiles in -fprofile-use do not match.
Wmissing-profile
Common Var(warn_missing_profile) Init(1) Warning
Warn in case profiles in -fprofile-use do not exist.
Wvector-operation-performance
Common Var(warn_vector_operation_performance) Warning
Warn when a vector operation is compiled outside the SIMD.
Xassembler
Driver Separate
Xlinker
Driver Separate
Xpreprocessor
Driver Separate
Z
Driver
aux-info
Common Separate Var(aux_info_file_name)
-aux-info <file> Emit declaration information into <file>.
aux-info=
Common Joined Alias(aux-info)
auxbase
Common Separate RejectDriver Var(aux_base_name)
auxbase-strip
Common Separate RejectDriver
coverage
Driver
c
Driver
d
Common Joined
-d<letters> Enable dumps from specific passes of the compiler.
dumpbase
Common Separate Var(dump_base_name)
-dumpbase <file> Set the file basename to be used for dumps.
dumpdir
Common Separate Var(dump_dir_name)
-dumpdir <dir> Set the directory name to be used for dumps.
dumpmachine
Driver
dumpspecs
Driver
dumpversion
Driver
dumpfullversion
Driver
e
Driver Joined Separate
; This option has historically been passed down to the linker by an
; accident of a %{e*} spec, so ensure it continues to be passed down
; as a single option. The supported option for this purpose is
; -rdynamic. See PR 47390.
export-dynamic
Driver Undocumented
; The version of the C++ ABI in use. The following values are allowed:
;
; 0: The version of the ABI believed most conformant with the C++ ABI
; specification. This ABI may change as bugs are discovered and fixed.
; Therefore, 0 will not necessarily indicate the same ABI in different
; versions of G++.
;
; 1: The version of the ABI first used in G++ 3.2. No longer selectable.
;
; 2: The version of the ABI first used in G++ 3.4, and the default
; until GCC 4.9.
;
; 3: The version of the ABI that fixes the missing underscore
; in template non-type arguments of pointer type.
;
; 4: The version of the ABI that introduces unambiguous mangling of
; vector types. First selectable in G++ 4.5.
;
; 5: The version of the ABI that ignores attribute const/noreturn
; in function pointer mangling, and corrects mangling of decltype and
; function parameters used in other parameters and the return type.
; First selectable in G++ 4.6.
;
; 6: The version of the ABI that doesn't promote scoped enums to int and
; changes the mangling of template argument packs, const/static_cast,
; prefix ++ and --, and a class scope function used as a template
; argument.
; First selectable in G++ 4.7.
;
; 7: The version of the ABI that treats nullptr_t as a builtin type and
; corrects the mangling of lambdas in default argument scope.
; First selectable in G++ 4.8.
;
; 8: The version of the ABI that corrects the substitution behavior of
; function types with function-cv-qualifiers.
; First selectable in G++ 4.9 and default in G++ 5.
;
; 9: The version of the ABI that corrects the alignment of nullptr_t.
; First selectable and default in G++ 5.2.
;
; 10: The version of the ABI that mangles attributes that affect type
; identity, such as ia32 calling convention attributes (stdcall, etc.)
; Default in G++ 6 (set in c_common_post_options).
;
; 11: The version of the ABI that corrects mangling of sizeof... expressions
; and introduces new inheriting constructor handling.
; Default in G++ 7.
;
; 12: Corrects the calling convention for classes with only deleted copy/move
; constructors and changes passing/returning of empty records.
; Default in G++ 8.1.
;
; 13: Fixes the accidental change in 12 to the calling convention for classes
; with deleted copy constructor and trivial move constructor.
; Default in G++ 8.2.
; 14: Corrects the mangling of nullptr expression.
; Default in G++ 10.
;
; Additional positive integers will be assigned as new versions of
; the ABI become the default version of the ABI.
fabi-version=
Common Joined RejectNegative UInteger Var(flag_abi_version) Init(0)
The version of the C++ ABI in use.
faggressive-loop-optimizations
Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1)
Aggressively optimize loops using language constraints.
falign-functions
Common Report Var(flag_align_functions) Optimization
Align the start of functions.
falign-functions=
Common RejectNegative Joined Var(str_align_functions) Optimization
flimit-function-alignment
Common Report Var(flag_limit_function_alignment) Optimization Init(0)
falign-jumps
Common Report Var(flag_align_jumps) Optimization
Align labels which are only reached by jumping.
falign-jumps=
Common RejectNegative Joined Var(str_align_jumps) Optimization
falign-labels
Common Report Var(flag_align_labels) Optimization
Align all labels.
falign-labels=
Common RejectNegative Joined Var(str_align_labels) Optimization
falign-loops
Common Report Var(flag_align_loops) Optimization
Align the start of loops.
falign-loops=
Common RejectNegative Joined Var(str_align_loops) Optimization
fallow-store-data-races