forked from Barro/compiler-warnings
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwarnings-detail-4.8.txt
355 lines (355 loc) · 14.9 KB
/
warnings-detail-4.8.txt
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
# enabled by default:
# -Waggressive-loop-optimizations
# Warn if a loop with constant number of iterations triggers undefined behavior
# -Wattributes
# Warn about inappropriate attribute usage
# -Wconversion-null
# Warn for converting NULL from/to a non-pointer type
# -Wcoverage-mismatch
# Warn in case profiles in -fprofile-use do not match
# -Wcpp
# Warn when a #warning directive is encountered
# -Wdeprecated
# Warn if a deprecated compiler feature, class, method, or field is used
# -Wdeprecated-declarations
# Warn about uses of __attribute__((deprecated)) declarations
# -Wdiv-by-zero
# Warn about compile-time integer division by zero
# -Wenum-compare
# Warn about comparison of different enum types
# -Wfree-nonheap-object
# Warn when attempting to free a non-heap object
# -Wimplicit-function-declaration
# Warn about implicit function declarations
# -Winherited-variadic-ctor
# Warn about C++11 inheriting constructors when the base has a variadic constructor
# -Wint-to-pointer-cast
# Warn when there is a cast to a pointer from an integer of a different size
# -Winvalid-memory-model
# Warn when an atomic memory model parameter is known to be outside the valid range.
# -Winvalid-offsetof
# Warn about invalid uses of the \"offsetof\" macro
# -Wlong-long
# Do not warn about using \"long long\" when -pedantic
# -Wmain
# Warn about suspicious declarations of \"main\"
# -Wmudflap
# Warn about constructs not instrumented by -fmudflap
# -Wnarrowing
# Warn about narrowing conversions within { } that are ill-formed in C++11
# -Wnon-template-friend
# Warn when non-templatized friend functions are declared within a template
# -Woverflow
# Warn about overflow in arithmetic expressions
# -Wpacked-bitfield-compat
# Warn about packed bit-fields whose offset changed in GCC 4.4
# -Wpmf-conversions
# Warn when converting the type of pointers to member functions
# -Wpointer-to-int-cast
# Warn when a pointer is cast to an integer of a different size
# -Wpragmas
# Warn about misuses of pragmas
# -Wproperty-assign-default
# Warn if a property for an Objective-C object has no assign semantics specified
# -Wprotocol
# Warn if inherited methods are unimplemented
# -Wpsabi
# -Wreturn-local-addr
# Warn about returning a pointer/reference to a local or temporary variable.
# -Wsync-nand
# Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used
# -Wunused-result
# Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value
# -Wvarargs
# Warn about questionable usage of the macros used to retrieve variable arguments
# -Wvariadic-macros
# Warn about using variadic macros
# -Wvirtual-move-assign
# Warn if a virtual base has a non-trivial move assignment operator
# -Wvla
# Warn if a variable length array is used
-Wabi
# Warn about things that will change when compiling with an ABI-compliant compiler
-Wabi-tag
# Warn if a subobject has an abi_tag attribute that the complete object type does not have
-Waggregate-return
# Warn about returning structures, unions or arrays
-Wall
# Enable most warning messages
# -Waddress
# Warn about suspicious uses of memory addresses
# -Warray-bounds
# Warn if an array is accessed out of bounds
# -Wc++0x-compat
# Deprecated in favor of -Wc++11-compat
# -Wnarrowing
# Warn about narrowing conversions within { } that are ill-formed in C++11
# -Wchar-subscripts
# Warn about subscripts whose type is \"char\"
# -Wdelete-non-virtual-dtor
# Warn about deleting polymorphic objects with non-virtual destructors
# -Wenum-compare
# Warn about comparison of different enum types
# -Wformat=1
# Warn about printf/scanf/strftime/strfmon format string anomalies
# -Wformat-contains-nul
# Warn about format strings that contain NUL bytes
# -Wformat-extra-args
# Warn if passing too many arguments to a function for its format string
# -Wformat-zero-length
# Warn about zero-length formats
# -Wnonnull
# Warn about NULL being passed to argument slots marked as requiring non-NULL
# -Wimplicit
# Warn about implicit declarations
# -Wimplicit-function-declaration
# Warn about implicit function declarations
# -Wimplicit-int
# Warn when a declaration does not specify a type
# -Winit-self
# Warn about variables which are initialized to themselves
# -Wmain
# Warn about suspicious declarations of \"main\"
# -Wmaybe-uninitialized
# Warn about maybe uninitialized automatic variables
# -Wmissing-braces
# Warn about possibly missing braces around initializers
# -Wnarrowing
# Warn about narrowing conversions within { } that are ill-formed in C++11
# -Wnonnull
# Warn about NULL being passed to argument slots marked as requiring non-NULL
# -Wparentheses
# Warn about possibly missing parentheses
# -Wpointer-sign
# Warn when a pointer differs in signedness in an assignment
# -Wreorder
# Warn when the compiler reorders code
# -Wreturn-type
# Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)
# -Wsequence-point
# Warn about possible violations of sequence point rules
# -Wsign-compare
# Warn about signed-unsigned comparisons
# -Wsizeof-pointer-memaccess
# -Wstrict-aliasing=3
# Warn about code which might break strict aliasing rules
# -Wstrict-overflow=1
# Warn about optimizations that assume that signed overflow is undefined
# -Wswitch
# Warn about enumerated switches, with no default, missing a case
# -Wuninitialized
# Warn about uninitialized automatic variables
# -Wmaybe-uninitialized
# Warn about maybe uninitialized automatic variables
# -Wunknown-pragmas
# Warn about unrecognized pragmas
# -Wunused
# Enable all -Wunused- warnings
# -Wunused-but-set-variable
# Warn when a variable is only set, otherwise unused
# -Wunused-function
# Warn when a function is unused
# -Wunused-label
# Warn when a label is unused
# -Wunused-local-typedefs
# Warn when typedefs locally defined in a function are not used
# -Wunused-value
# Warn when an expression value is unused
# -Wunused-variable
# Warn when a variable is unused
# -Wvolatile-register-var
# Warn when a register variable is declared volatile
-Wassign-intercept
# Warn whenever an Objective-C assignment is being intercepted by the garbage collector
-Wbad-function-cast
# Warn about casting functions to incompatible types
-Wbuiltin-macro-redefined
# Warn when a built-in preprocessor macro is undefined or redefined
-Wc++-compat
# Warn about C constructs that are not in the common subset of C and C++
# -Wenum-compare
# Warn about comparison of different enum types
-Wcast-align
# Warn about pointer casts which increase alignment
-Wcast-qual
# Warn about casts which discard qualifiers
-Wcomment
# Warn about possibly nested block comments, and C++ comments spanning more than one physical line
-Wconversion
# Warn for implicit type conversions that may change a value
# -Wsign-conversion
# Warn for implicit type conversions between signed and unsigned integers
-Wctor-dtor-privacy
# Warn when all constructors and destructors are private
-Wdeclaration-after-statement
# Warn when a declaration is found after a statement
-Wdisabled-optimization
# Warn when an optimization pass is disabled
-Wdouble-promotion
# Warn about implicit conversions from \"float\" to \"double\"
-Weffc++
# Warn about violations of Effective C++ style rules
# -Wdelete-non-virtual-dtor
# Warn about deleting polymorphic objects with non-virtual destructors
-Wendif-labels
# Warn about stray tokens after #elif and #endif
-Wextra
# Print extra (possibly unwanted) warnings
# -Wclobbered
# Warn about variables that might be changed by \"longjmp\" or \"vfork\"
# -Wempty-body
# Warn about an empty body in an if or else statement
# -Wignored-qualifiers
# Warn whenever type qualifiers are ignored.
# -Wmissing-field-initializers
# Warn about missing fields in struct initializers
# -Wmissing-parameter-type
# Warn about function parameters declared without a type specifier in K&R-style functions
# -Wold-style-declaration
# Warn for obsolescent usage in a declaration
# -Woverride-init
# Warn about overriding initializers without side effects
# -Wsign-compare
# Warn about signed-unsigned comparisons
# -Wtype-limits
# Warn if a comparison is always true or always false due to the limited range of the data type
# -Wuninitialized
# Warn about uninitialized automatic variables
# -Wmaybe-uninitialized
# Warn about maybe uninitialized automatic variables
# -Wunused-but-set-parameter
# Warn when a function parameter is only set, otherwise unused
# -Wunused-parameter
# Warn when a function parameter is unused
-Wfloat-equal
# Warn if testing floating point numbers for equality
-Wformat=
# Warn about printf/scanf/strftime/strfmon format string anomalies
-Wformat=2
# -Wformat-nonliteral
# Warn about format strings that are not literals
# -Wformat-security
# Warn about possible security problems with format functions
# -Wformat-y2k
# Warn about strftime formats yielding 2-digit years
-Wframe-larger-than=<number>
# Warn if a function's stack frame requires more than <number> bytes
-Wimport # IGNORED switch
-Winline
# Warn when an inlined function cannot be inlined
-Winvalid-pch
# Warn about PCH files that are found but not used
-Wjump-misses-init
# Warn when a jump misses a variable initialization
-Wlarger-than=<number>
# Warn if an object is larger than <number> bytes
-Wliteral-suffix
# Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.
-Wlogical-op
# Warn when a logical operator is suspiciously always evaluating to true or false
-Wmissing-declarations
# Warn about global functions without previous declarations
-Wmissing-include-dirs
# Warn about user-specified include directories that do not exist
-Wmissing-prototypes
# Warn about global functions without prototypes
-Wmultichar
# Warn about use of multi-character character constants
-Wnested-externs
# Warn about \"extern\" declarations not at file scope
-Wnoexcept
# Warn when a noexcept expression evaluates to false even though the expression can't actually throw
-Wnon-virtual-dtor
# Warn about non-virtual destructors
-Wnormalized=<id|nfc|nfkc>
# Warn about non-normalised Unicode strings
-Wold-style-cast
# Warn if a C-style cast is used in a program
-Wold-style-definition
# Warn if an old-style parameter definition is used
-Woverloaded-virtual
# Warn about overloaded virtual function names
-Wpacked
# Warn when the packed attribute has no effect on struct layout
-Wpadded
# Warn when padding is required to align structure members
-Wpedantic
# Issue warnings needed for strict compliance to the standard
# -Wmain
# Warn about suspicious declarations of \"main\"
# -Woverlength-strings
# Warn if a string is longer than the maximum portable length specified by the standard
# -Wpointer-sign
# Warn when a pointer differs in signedness in an assignment
-Wpointer-arith
# Warn about function pointer arithmetic
-Wredundant-decls
# Warn about multiple declarations of the same object
-Wselector
# Warn if a selector has multiple methods
-Wshadow
# Warn when one local variable shadows another
-Wsign-promo
# Warn when overload promotes from unsigned to signed
-Wstack-protector
# Warn when not issuing stack smashing protection for some reason
-Wstack-usage=
# Warn if stack usage might be larger than specified amount
-Wstrict-aliasing
# Warn about code which might break strict aliasing rules
-Wstrict-aliasing=
# Warn about code which might break strict aliasing rules
-Wstrict-null-sentinel
# Warn about uncasted NULL used as sentinel
-Wstrict-overflow
# Warn about optimizations that assume that signed overflow is undefined
-Wstrict-overflow=
# Warn about optimizations that assume that signed overflow is undefined
-Wstrict-prototypes
# Warn about unprototyped function declarations
-Wstrict-selector-match
# Warn if type signatures of candidate methods do not match exactly
-Wsuggest-attribute=const
# Warn about functions which might be candidates for __attribute__((const))
-Wsuggest-attribute=format
# Warn about functions which might be candidates for format attributes
-Wsuggest-attribute=noreturn
# Warn about functions which might be candidates for __attribute__((noreturn))
-Wsuggest-attribute=pure
# Warn about functions which might be candidates for __attribute__((pure))
-Wswitch-default
# Warn about enumerated switches missing a \"default:\" statement
-Wswitch-enum
# Warn about all enumerated switches missing a specific case
-Wsynth
# Deprecated. This switch has no effect
-Wsystem-headers
# Do not suppress warnings from system headers
-Wtraditional
# Warn about features not present in traditional C
-Wtraditional-conversion
# Warn of prototypes causing type conversions different from what would happen in the absence of prototype
-Wtrampolines
# Warn whenever a trampoline is generated
-Wtrigraphs
# Warn if trigraphs are encountered that might affect the meaning of the program
-Wundeclared-selector
# Warn about @selector()s without previously declared methods
-Wundef
# Warn if an undefined macro is used in an #if directive
-Wunreachable-code # IGNORED switch
# Does nothing. Preserved for backward compatibility.
-Wunsafe-loop-optimizations
# Warn if the loop cannot be optimized due to nontrivial assumptions.
-Wunsuffixed-float-constants
# Warn about unsuffixed float constants
-Wunused-macros
# Warn about macros defined in the main file that are not used
-Wuseless-cast
# Warn about useless casts
-Wvector-operation-performance
# Warn when a vector operation is compiled outside the SIMD
-Wwrite-strings
# In C++, nonzero means warn about deprecated conversion from string literals to 'char *'. In C, similar warning, except that the conversion is of course not deprecated by the ISO C standard.
-Wzero-as-null-pointer-constant
# Warn when a literal '0' is used as null pointer