1 # options to filter out, and why
2 --all
-warnings
alias for -Wall
3 --extra
-warnings
alias for -Wextra
5 -Wabi this is now a no
-op
8 -Wabsolute
-value enabled by
-Wextra
9 -Waddress enabled by
-Wall
10 -Waddress
-of
-packed
-member default
11 -Waggregate
-return obsolescent
12 -Waggressive
-loop
-optimizations default
14 -Walign
-commons fortran
15 -Waligned
-new
=[none|global|all
] c
++
16 -Walloc
-size enabled by
-Wextra
17 -Walloc
-size
-larger
-than
=<bytes
> defaults to PTRDIFF_MAX
18 -Walloc
-zero Gnulib fixes this problem
19 -Walloca we like alloca
in small doses
20 -Walloca
-larger
-than
=<number
> FIXME
: choose something sane?
22 -Wanalyzer
-allocation
-size enabled by
-fanalyzer
23 -Wanalyzer
-deref
-before
-check enabled by
-fanalyzer
24 -Wanalyzer
-double
-fclose enabled by
-fanalyzer
25 -Wanalyzer
-double
-free enabled by
-fanalyzer
26 -Wanalyzer
-exposure
-through
-output
-file enabled by
-fanalyzer
27 -Wanalyzer
-exposure
-through
-uninit
-copy enabled by
-fanalyzer
28 -Wanalyzer
-fd
-access
-mode
-mismatch enabled by
-fanalyzer
29 -Wanalyzer
-fd
-double
-close enabled by
-fanalyzer
30 -Wanalyzer
-fd
-leak enabled by
-fanalyzer
31 -Wanalyzer
-fd
-phase
-mismatch enabled by
-fanalyzer
32 -Wanalyzer
-fd
-type-mismatch enabled by
-fanalyzer
33 -Wanalyzer
-fd
-use
-after
-close enabled by
-fanalyzer
34 -Wanalyzer
-fd
-use
-without
-check enabled by
-fanalyzer
35 -Wanalyzer
-file
-leak enabled by
-fanalyzer
36 -Wanalyzer
-free
-of
-non
-heap enabled by
-fanalyzer
37 -Wanalyzer
-imprecise
-fp
-arithmetic enabled by
-fanalyzer
38 -Wanalyzer
-infinite
-loop enabled by
-fanalyzer
39 -Wanalyzer
-infinite
-recursion enabled by
-fanalyzer
40 -Wanalyzer
-jump
-through
-null enabled by
-fanalyzer
41 -Wanalyzer
-malloc
-leak enabled by
-fanalyzer
42 -Wanalyzer
-mismatching
-deallocation enabled by
-fanalyzer
43 -Wanalyzer
-null
-argument enabled by
-fanalyzer
44 -Wanalyzer
-null
-dereference enabled by
-fanalyzer
45 -Wanalyzer
-out
-of
-bounds enabled by
-fanalyzer
46 -Wanalyzer
-overlapping
-buffers enabled by
-fanalyzer
47 -Wanalyzer
-possible
-null
-argument enabled by
-fanalyzer
48 -Wanalyzer
-possible
-null
-dereference enabled by
-fanalyzer
49 -Wanalyzer
-putenv
-of
-auto
-var enabled by
-fanalyzer
50 -Wanalyzer
-shift-count
-negative enabled by
-fanalyzer
51 -Wanalyzer
-shift-count
-overflow enabled by
-fanalyzer
52 -Wanalyzer
-stale
-setjmp
-buffer implied by
-fanalyzer
53 -Wanalyzer
-symbol
-too
-complex warns about compiler not about program
54 -Wanalyzer
-tainted
-allocation
-size FIXME requires
-fanalyzer
-checker
=taint
55 -Wanalyzer
-tainted
-array
-index FIXME requires
-fanalyzer
-checker
=taint
56 -Wanalyzer
-tainted
-assertion FIXME requires
-fanalyzer
-checker
=taint
57 -Wanalyzer
-tainted
-divisor FIXME requires
-fanalyzer
-checker
=taint
58 -Wanalyzer
-tainted
-offset FIXME requires
-fanalyzer
-checker
=taint
59 -Wanalyzer
-tainted
-size FIXME requires
-fanalyzer
-checker
=taint
60 -Wanalyzer
-undefined
-behavior
-strtok enabled by
-fanalyzer
61 -Wanalyzer
-va
-arg
-type-mismatch enabled by
-fanalyzer
62 -Wanalyzer
-va
-list
-exhausted enabled by
-fanalyzer
63 -Wanalyzer
-va
-list
-leak enabled by
-fanalyzer
64 -Wanalyzer
-va
-list
-use
-after
-va
-end enabled by
-fanalyzer
65 -Wanalyzer
-too
-complex enabled by
-fanalyzer
66 -Wanalyzer
-unsafe
-call
-within
-signal
-handler enabled by
-fanalyzer
67 -Wanalyzer
-use
-after
-free enabled by
-fanalyzer
68 -Wanalyzer
-use
-of
-pointer
-in-stale
-stack
-frame enabled by
-fanalyzer
69 -Wanalyzer
-use
-of
-uninitialized
-value enabled by
-fanalyzer
70 -Wanalyzer
-write
-to
-const enabled by
-fanalyzer
71 -Wanalyzer
-write
-to
-string
-literal enabled by
-fanalyzer
72 -Warray
-bounds covered by
-Warray
-bounds
=
73 -Warray
-bounds
=<0,2> handled specially by gl_MANYWARN_ALL_GCC
74 -Warray
-compare enabled by
-Wall
75 -Warray
-parameter enabled by
-Wall
76 -Warray
-parameter
=<0,2> enabled by
-Wall
77 -Warray
-temporaries fortran
78 -Wassign
-intercept objc
/objc
++
79 -Wattribute
-alias covered by
-Wattribute
-alias=2
80 -Wattribute
-alias=<0,2> handled specially by gl_MANYWARN_ALL_GCC
81 -Wattribute
-warning default
83 -Wbidi
-chars handled specially by gl_MANYWARN_ALL_GCC
84 -Wbidi
-chars
= handled specially by gl_MANYWARN_ALL_GCC
85 -Wbool
-compare enabled by
-Wall
86 -Wbool
-operation enabled by
-Wall
87 -Wbuiltin
-declaration
-mismatch default
88 -Wbuiltin
-macro
-redefined default
89 -Wc
++-compat only useful
for code meant to be compiled by a C
++ compiler
92 -Wc
++11-extensions c
++
94 -Wc
++14-extensions c
++
96 -Wc
++17-extensions c
++
99 -Wc
++20-extensions c
++
100 -Wc
++23-extensions c
++
101 -Wc
++26-extensions c
++
103 -Wc
-binding
-type fortran
104 -Wc11
-c23
-compat c compatibility
105 -Wc90
-c99
-compat c compatibility
106 -Wc99
-c11
-compat c compatibility
107 -Wcalloc
-transposed
-args enabled by
-Wextra
108 -Wcannot
-profile default
109 -Wcast
-align enabled by
-Wcast
-align
=strict
110 -Wcast
-function-type enabled by
-Wextra
111 -Wcast
-qual FIXME maybe? too much noise
; encourages bad changes
114 -Wcatch
-value
=<0,3> c
++
115 -Wchanges
-meaning c
++
116 -Wchar
-subscripts enabled by
-Wall
117 -Wcharacter
-truncation fortran
119 -Wclass
-conversion c
++ and objc
++
120 -Wclass
-memaccess c
++
121 -Wclobbered enabled by
-Wextra
122 -Wcomma
-subscript c
++ and objc
++
123 -Wcomment enabled by
-Wall
124 -Wcomments
alias for -Wcomment
125 -Wcompare
-distinct
-pointer
-types default
126 -Wcompare
-reals fortran
127 -Wcomplain
-wrong
-lang default
128 -Wconditionally
-supported c
++ and objc
++
129 -Wconversion FIXME maybe? too much noise
; encourages bad changes
130 -Wcoverage
-too
-many
-conditions default
131 -Wconversion
-extra fortran
132 -Wconversion
-null c
++ and objc
++
133 -Wcoverage
-invalid
-line
-number default
if --coverage
134 -Wcoverage
-mismatch default
136 -Wctad
-maybe
-unsupported c
++ and objc
++
137 -Wctor
-dtor
-privacy c
++
138 -Wdangling
-else enabled by
-Wparentheses
139 -Wdangling
-pointer enabled by
-Wall
140 -Wdangling
-pointer
=<0,2> enabled by
-Wall
141 -Wdangling
-reference c
++ and objc
++
142 -Wdeclaration
-after
-statement needed only
for pre
-C99
, so obsolete
143 -Wdeclaration
-missing
-parameter
-type default
144 -Wdelete
-incomplete c
++ and objc
++
145 -Wdelete
-non
-virtual
-dtor c
++
147 -Wdeprecated
-copy c
++ and objc
++
148 -Wdeprecated
-copy
-dtor c
++ and objc
++
149 -Wdeprecated
-declarations default
150 -Wdeprecated
-enum
-enum
-conversion c
++ and objc
++
151 -Wdeprecated
-enum
-float
-conversion c
++ and objc
++
152 -Wdesignated
-init default
153 -Wdiscarded
-array
-qualifiers default
154 -Wdiscarded
-qualifiers default
155 -Wdo
-subscript fortran
156 -Wdiv
-by
-zero default
157 -Wduplicate
-decl
-specifier enabled by
-Wall
159 -Welaborated
-enum
-base default
, c
++11+
160 -Wempty
-body enabled by
-Wextra
161 -Wenum
-compare enabled by
-Wall
162 -Wenum
-conversion enabled by
-Wextra
163 -Wenum
-int
-mismatch enabled by
-Wall
164 -Wendif
-labels default
165 -Werror
-implicit
-function-declaration deprecated
166 -Wexceptions c
++ and objc
++
167 -Wexpansion
-to
-defined enabled by
-Wextra
169 -Wfloat
-conversion FIXME maybe? borderline. some will want this
170 -Wfloat
-equal FIXME maybe? borderline. some will want this
171 -Wformat covered by
-Wformat
=2
172 -Wformat
-contains
-nul default
173 -Wformat
-diag enabled by
-Wformat
=2
174 -Wformat
-extra
-args enabled by
-Wformat
=2
175 -Wformat
-nonliteral enabled by
-Wformat
=2
176 -Wformat
-overflow
<0,2> gcc
--help=warnings artifact
177 -Wformat
-overflow
=<0,2> handled specially by gl_MANYWARN_ALL_GCC
178 -Wformat
-security enabled by
-Wformat
=2
179 -Wformat
-truncation covered by
-Wformat
-truncation
=2
180 -Wformat
-truncation
=<0,2> handled specially by gl_MANYWARN_ALL_GCC
181 -Wformat
-y2k enabled by
-Wformat
=2
182 -Wformat
-zero
-length enabled by
-Wformat
=2
183 -Wformat
=<0,2> gcc
--help=warnings artifact
184 -Wframe
-address enabled by
-Wall
185 -Wframe
-larger
-than
=<byte
-size
> FIXME
: choose something sane?
186 -Wfree
-nonheap
-object default
187 -Wfunction
-elimination fortran
188 -Wglobal
-module default
, c
++ and objc
++
191 -Wif
-not
-aligned default
192 -Wignored
-attributes default
193 -Wignored
-qualifiers enabled by
-Wextra
194 -Wimplicit enabled by
-Wall
195 -Wimplicit
-fallthrough covered by
-Wimplicit
-fallthrough
=2
196 -Wimplicit
-fallthrough
=<0,5> handled specially by gl_MANYWARN_ALL_GCC
197 -Wimplicit
-function-declaration enabled by
-Wimplicit
198 -Wimplicit
-int enabled by
-Wimplicit
199 -Wimplicit
-interface fortran
200 -Wimplicit
-procedure fortran
201 -Winaccessible
-base c
++ and objc
++
202 -Wincompatible
-pointer
-types default
203 -Winfinite
-recursion enabled by
-Wall
204 -Winherited
-variadic
-ctor c
++
205 -Winit
-list
-lifetime c
++ and objc
++
206 -Wint
-conversion default
207 -Wint
-in-bool
-context enabled by
-Wall
208 -Wint
-to
-pointer
-cast default
209 -Winteger
-division fortran
210 -Winterference
-size c
++
211 -Wintrinsic
-shadow fortran
212 -Wintrinsics
-std fortran
213 -Winvalid
-constexpr c
++
214 -Winvalid
-imported
-macros c
++ and objc
++
215 -Winvalid
-memory
-model default
216 -Winvalid
-offsetof c
++ and objc
++
217 -Winvalid
-utf8 enabled by
-finput
-charset
=UTF
-8
218 -Wjump
-misses
-init only useful
for code meant to be compiled by a C
++ compiler
219 -Wlarger
-than
- gcc
--help=warnings artifact
220 -Wlarger
-than
=<byte
-size
> FIXME
: choose something sane?
221 -Wline
-truncation fortran
222 -Wliteral
-suffix c
++ and objc
++
223 -Wlogical
-not
-parentheses enabled by
-Wall
224 -Wlong
-long obsolescent
225 -Wlto
-type-mismatch c
++ and objc
++
226 -Wmain enabled by
-Wall
227 -Wmaybe
-uninitialized enabled by
-Wall or
-Wextra
228 -Wmemset
-elt
-size enabled by
-Wall
229 -Wmemset
-transposed
-args enabled by
-Wall
230 -Wmisleading
-indentation enabled by
-Wall
231 -Wmismatched
-dealloc default
232 -Wmismatched
-new
-delete default
, c
++ and objc
++
233 -Wmismatched
-special
-enum d
234 -Wmismatched
-tags c
++ and objc
++
235 -Wmissing
-attributes enabled by
-Wall
236 -Wmissing
-braces enabled by
-Wall
237 -Wmissing
-field
-initializers enabled by
-Wextra
238 -Wmissing
-format
-attribute obsolescent
239 -Wmissing
-noreturn obsolescent
240 -Wmissing
-parameter
-type enabled by
-Wextra
241 -Wmissing
-profile default
242 -Wmissing
-requires default
, c
++
243 -Wmissing
-template
-keyword default
, c
++
245 -Wmultiple
-inheritance c
++ and objc
++
246 -Wmultistatement
-macros enabled by
-Wall
248 -Wnarrowing enabled by
-Wall
249 -Wno
-alloc
-size
-larger
-than see
-Walloc
-size
-larger
-than
250 -Wno
-alloca
-larger
-than see
-Walloca
-larger
-than
251 -Wno
-frame
-larger
-than see
-Wframe
-larger
-than
252 -Wno
-larger
-than see
-Wlarger
-than
253 -Wno
-stack
-usage see
-Wstack
-usage
254 -Wno
-vla
-larger
-than see
-Wvla
-larger
-than
257 -Wnon
-template
-friend c
++
258 -Wnon
-virtual
-dtor c
++
259 -Wnonnull enabled by
-Wall or
-Wformat
260 -Wnonnull
-compare enabled by
-Wall
262 -Wnormalized
=[none|id|nfc|nfkc
] defaults to nfc
263 -WNSObject
-attribute objc and objc
++
264 -Wobjc
-root
-class objc and objc
++
266 -Wold
-style
-cast c
++ and objc
++
267 -Wold
-style
-declaration enabled by
-Wextra
268 -Wopenacc
-parallelism OpenACC
271 -Woverloaded
-virtual c
++
272 -Woverloaded
-virtual
=<0,2> c
++
273 -Woverride
-init enabled by
-Wextra
274 -Woverride
-init
-side
-effects c
++ and objc
++
275 -Woverwrite
-recursive fortran
276 -Wpacked
-bitfield
-compat default
277 -Wpacked
-not
-aligned enabled by
-Wall
278 -Wpadded FIXME maybe? warns about "stabil" member
in /usr
/include
/bits
/timex.h
279 -Wparentheses enabled by
-Wall
280 -Wpedantic FIXME
: too strict?
281 -Wpessimizing
-move c
++ and objc
++
283 -Wplacement
-new
=<0,2> c
++
284 -Wpmf
-conversions c
++ and objc
++
285 -Wpointer
-compare default
286 -Wpointer
-sign enabled by
-Wall
287 -Wpointer
-to
-int
-cast default
290 -Wproperty
-assign
-default objc
++
293 -Wrange
-loop
-construct c
++ and objc
++
294 -Wreal
-q
-constant fortran
295 -Wrealloc
-lhs fortran
296 -Wrealloc
-lhs
-all fortran
297 -Wredundant
-decls FIXME maybe? many _gl_cxxalias_dummy FPs
298 -Wredundant
-move c
++ and objc
++
299 -Wredundant
-tags c
++ and objc
++
300 -Wregister c
++ and objc
++
301 -Wreorder c
++ and objc
++
302 -Wrestrict enabled by
-Wall
303 -Wreturn
-local-addr default
304 -Wreturn
-mismatch default
305 -Wreturn
-type enabled by
-Wall
306 -Wscalar
-storage
-order default
307 -Wselector objc and objc
++
308 -Wsequence
-point enabled by
-Wall
309 -Wself
-move c
++ and objc
++
310 -Wshadow
-compatible
-local covered by
-Wshadow
312 -Wshadow
-local covered by
-Wshadow
313 -Wshadow
=compatible
-local covered by
-Wshadow
314 -Wshadow
=global covered by
-Wshadow
315 -Wshadow
=local covered by
-Wshadow
316 -Wshift
-count
-negative default
317 -Wshift
-count
-overflow default
318 -Wshift
-negative
-value enabled by
-Wextra
319 -Wshift
-overflow covered by
-Wshift
-overflow
=2
320 -Wshift
-overflow
=<0,2> gcc
--help=warnings artifact
321 -Wsign
-compare enabled by
-Wextra
322 -Wsign
-conversion FIXME maybe? borderline. some will want this
323 -Wsign
-promo c
++ and objc
++
324 -Wsized
-deallocation c
++ and objc
++
325 -Wsizeof
-array
-argument default
326 -Wsizeof
-array
-div enabled by
-Wall
327 -Wsizeof
-pointer
-div enabled by
-Wall
328 -Wsizeof
-pointer
-memaccess enabled by
-Wall
329 -Wstack
-usage
=<byte
-size
> FIXME
: choose something sane?
330 -Wstrict
-aliasing enabled by
-Wall
331 -Wstrict
-aliasing
=<0,3> FIXME
: choose something sane?
332 -Wstrict
-null
-sentinel c
++ and objc
++
333 -Wstrict
-overflow
=<0,5> FIXME
: choose something sane?
334 -Wstrict
-selector
-match objc and objc
++
335 -Wstring
-compare enabled by
-Wextra
336 -Wstringop
-overflow covered by
-Wstringop
-overflow
=2
337 -Wstringop
-overflow
=<0,4> defaults to
2
338 -Wstringop
-overread default
339 -Wstringop
-truncation default
340 -Wsubobject
-linkage c
++ and objc
++
341 -Wsuggest
-attribute
=returns_nonnull https
://gcc.gnu.org
/bugzilla
/show_bug.cgi?id
=114833
342 -Wsuggest
-override c
++ and objc
++
344 -Wswitch enabled by
-Wall
345 -Wswitch
-bool default
346 -Wswitch
-default https
://lists.gnu.org
/r
/bug
-gnulib
/2018-05/msg00179.html
347 -Wswitch
-enum FIXME maybe? borderline. some will want this
348 -Wswitch
-outside
-range default
349 -Wswitch
-unreachable default
352 -Wtarget
-lifetime fortran
353 -Wtautological
-compare enabled by
-Wall
354 -Wtemplate
-id
-cdtor default
, c
++ and objc
++
355 -Wtemplates c
++ and objc
++
356 -Wterminate c
++ and objc
++
357 -Wtraditional obsolescent
358 -Wtraditional
-conversion obsolescent
359 -Wtrigraphs enabled by
-Wall
360 -Wtrivial
-auto
-var
-init subsumed by
-Wmaybe
-uninitialized
362 -Wtype
-limits enabled by
-Wextra
363 -Wundeclared
-selector objc and objc
++
364 -Wundef FIXME maybe? too many false positives
365 -Wundefined
-do-loop fortran
368 -Wunreachable
-code obsolescent no
-op
369 -Wunsuffixed
-float
-constants triggers warning
in gnulib's timespec.h
370 -Wunused enabled by
-Wall
371 -Wunused
-but
-set-parameter enabled by
-Wunused
372 -Wunused
-but
-set-variable enabled by
-Wunused
373 -Wunused
-const
-variable covered by
-Wunused
-const
-variable
=2
374 -Wunused
-const
-variable
=<0,2> gcc
--help=warnings artifact
375 -Wunused
-dummy
-argument fortran
376 -Wunused
-function enabled by
-Wunused
377 -Wunused
-label enabled by
-Wunused
378 -Wunused
-local-typedefs enabled by
-Wunused
379 -Wunused
-parameter enabled by
-Wunused
380 -Wunused
-result enabled by
-Wunused
381 -Wunused
-value enabled by
-Wunused
382 -Wunused
-variable enabled by
-Wunused
383 -Wuse
-after
-free handled specially by gl_MANYWARN_ALL_GCC
384 -Wuse
-after
-free
=<0,3> handled specially by gl_MANYWARN_ALL_GCC
385 -Wuse
-without
-only fortran
386 -Wuseless
-cast c
++ and objc
++
388 -Wvexing
-parse c
++ and objc
++
389 -Wvirtual
-inheritance c
++
390 -Wvirtual
-move
-assign c
++
391 -Wvla
-larger
-than
=<number
> handled specially by gl_MANYWARN_ALL_GCC
392 -Wvla
-parameter enabled by
-Wall
393 -Wvolatile c
++ and objc
++
394 -Wvolatile
-register
-var enabled by
-Wall
395 -Wxor
-used
-as
-pow default
396 -Wzero
-as
-null
-pointer
-constant c
++ and objc
++
397 -Wzero
-length
-bounds enabled by
-Wall
399 -frequire
-return-statement go