forked from Barro/compiler-warnings
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwarnings-detail-6.txt
472 lines (472 loc) · 20.5 KB
/
warnings-detail-6.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
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
# enabled by default:
# -Waggressive-loop-optimizations
# Warn if a loop with constant number of iterations triggers undefined behavior.
# -Wattributes
# Warn about inappropriate attribute usage.
# -Wbuiltin-macro-redefined
# Warn when a built-in preprocessor macro is undefined or redefined.
# -Wc90-c99-compat
# Warn about features not present in ISO C90, but present in ISO C99.
# -Wlong-long
# Do not warn about using \"long long\" when -pedantic.
# -Wc99-c11-compat
# Warn about features not present in ISO C99, but present in ISO C11.
# -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.
# -Wdeclaration-after-statement
# Warn when a declaration is found after a statement.
# -Wdelete-incomplete
# Warn when deleting a pointer to incomplete type.
# -Wdeprecated
# Warn if a deprecated compiler feature, class, method, or field is used.
# -Wdeprecated-declarations
# Warn about uses of __attribute__((deprecated)) declarations.
# -Wdesignated-init
# Warn about positional initialization of structs requiring designated initializers.
# -Wdiscarded-array-qualifiers
# Warn if qualifiers on arrays which are pointer targets are discarded.
# -Wdiscarded-qualifiers
# Warn if type qualifiers on pointers are discarded.
# -Wdiv-by-zero
# Warn about compile-time integer division by zero.
# -Wendif-labels
# Warn about stray tokens after #elif and #endif.
# -Wenum-compare
# Warn about comparison of different enum types.
# -Wfree-nonheap-object
# Warn when attempting to free a non-heap object.
# -Whsa
# Warn when a function cannot be expanded to HSAIL.
# -Wignored-attributes
# Warn whenever attributes are ignored.
# -Wimplicit-function-declaration
# Warn about implicit function declarations.
# -Wimplicit-int
# Warn when a declaration does not specify a type.
# -Wincompatible-pointer-types
# Warn when there is a conversion between pointers that have incompatible types.
# -Winherited-variadic-ctor
# Warn about C++11 inheriting constructors when the base has a variadic constructor.
# -Wint-conversion
# Warn about incompatible integer to pointer and pointer to integer conversions.
# -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.
# -Wliteral-suffix
# Warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore.
# -Wlong-long
# Do not warn about using \"long long\" when -pedantic.
# -Wlto-type-mismatch
# During link time optimization warn about mismatched types of global declarations.
# -Wmain
# Warn about suspicious declarations of \"main\".
# -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.
# -Wodr
# Warn about some C++ One Definition Rule violations during link time optimization.
# -Woverflow
# Warn about overflow in arithmetic expressions.
# -Woverride-init-side-effects
# Warn about overriding initializers with side effects.
# -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.
# -Wscalar-storage-order
# Warn on suspicious constructs involving reverse scalar storage order.
# -Wshadow-ivar
# Warn if a local declaration hides an instance variable.
# -Wshift-count-negative
# Warn if shift count is negative.
# -Wshift-count-overflow
# Warn if shift count >= width of type.
# -Wshift-negative-value
# Warn if left shifting a negative value.
# -Wsizeof-array-argument
# Warn when sizeof is applied on a parameter declared as an array.
# -Wsubobject-linkage
# Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage.
# -Wswitch-bool
# Warn about switches with boolean controlling expression.
# -Wsync-nand
# Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used.
# -Wterminate
# Warn if a throw expression will always result in a call to terminate().
# -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.
# -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.
# -Wpsabi
-Wabi-tag
# Warn if a subobject has an abi_tag attribute that the complete object type does not have.
-Wabi=
# Warn about things that change between the current -fabi-version and the specified version.
-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.
# -Warray-bounds=1
# Warn if an array is accessed out of bounds.
# -Wbool-compare
# Warn about boolean expression compared with an integer value different from true/false.
# -Wc++11-compat
# Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011.
# -Wnarrowing
# Warn about narrowing conversions within { } that are ill-formed in C++11.
# -Wc++14-compat
# Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014.
# -Wchar-subscripts
# Warn about subscripts whose type is \"char\".
# -Wchkp
# Warn about memory access errors found by Pointer Bounds Checker.
# -Wcomment
# Warn about possibly nested block comments, and C++ comments spanning more than one physical line.
# -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.
# -Wframe-address
# Warn when __builtin_frame_address or __builtin_return_address is used unsafely.
# -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.
# -Wlogical-not-parentheses
# Warn when logical not is used on the left hand side operand of a comparison.
# -Wmain
# Warn about suspicious declarations of \"main\".
# -Wmaybe-uninitialized
# Warn about maybe uninitialized automatic variables.
# -Wmemset-transposed-args
# Warn about suspicious calls to memset where the third argument is constant literal zero and the second is not.
# -Wmisleading-indentation
# Warn when the indentation of the code does not reflect the block structure.
# -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.
# -Wnonnull-compare
# Warn if comparing pointer parameter with nonnull attribute with NULL.
# -Wopenmp-simd
# Warn if a simd directive is overridden by the vectorizer cost model.
# -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
# Warn about suspicious length parameters to certain string functions if the argument uses sizeof.
# -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.
# -Wtautological-compare
# Warn if a comparison always evaluates to true or false.
# -Wtrigraphs
# Warn if trigraphs are encountered that might affect the meaning of the program.
# -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.
# -Wunused-const-variable=1
# Warn when a const variable is unused.
# -Wvolatile-register-var
# Warn when a register variable is declared volatile.
-Warray-bounds=
# Warn if an array is accessed out of bounds.
-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.
-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.
-Wconditionally-supported
# Warn for conditionally-supported constructs.
-Wconversion
# Warn for implicit type conversions that may change a value.
# -Wfloat-conversion
# Warn for implicit type conversions that cause loss of floating point precision.
# -Wsign-conversion
# Warn for implicit type conversions between signed and unsigned integers.
-Wctor-dtor-privacy
# Warn when all constructors and destructors are private.
-Wdate-time
# Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage.
-Wdisabled-optimization
# Warn when an optimization pass is disabled.
-Wdouble-promotion
# Warn about implicit conversions from \"float\" to \"double\".
-Wduplicated-cond
# Warn about duplicated conditions in an if-else-if chain.
-Weffc++
# Warn about violations of Effective C++ style rules.
# -Wdelete-non-virtual-dtor
# Warn about deleting polymorphic objects with non-virtual destructors.
# -Wnon-virtual-dtor
# Warn about non-virtual destructors.
-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.
# -Wsized-deallocation
# Warn about missing sized deallocation functions.
# -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-signedness
# Warn about sign differences with format functions.
-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.
-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.
-Wmudflap # IGNORED switch
-Wmultichar
# Warn about use of multi-character character constants.
-Wmultiple-inheritance
# Warn on direct multiple inheritance.
-Wnamespaces
# Warn on namespace definition.
-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.
-Wnormalized=<none|id|nfc|nfkc>
# Warn about non-normalised Unicode strings.
-Wnull-dereference
# Warn if dereferencing a NULL pointer may lead to erroneous or undefined behavior.
-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.
# -Wendif-labels
# Warn about stray tokens after #elif and #endif.
# -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-arith
# Warn about function pointer arithmetic.
# -Wpointer-sign
# Warn when a pointer differs in signedness in an assignment.
# -Wvariadic-macros
# Warn about using variadic macros.
-Wplacement-new=
# Warn for placement new expressions with undefined behavior.
-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.
# -Wshadow-ivar
# Warn if a local declaration hides an instance variable.
-Wshift-overflow=
# Warn if left shift of a signed value overflows.
-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)).
-Wsuggest-final-methods
# Warn about C++ virtual methods where adding final keyword would improve code quality.
-Wsuggest-final-types
# Warn about C++ polymorphic types where adding final keyword would improve code quality.
-Wsuggest-override
# Suggest that the override keyword be used when the declaration of a virtual function overrides another.
-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.
-Wtemplates
# Warn on primary template declaration.
-Wtraditional
# Warn about features not present in traditional C.
# -Wvariadic-macros
# Warn about using variadic macros.
-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.
-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-const-variable=
# Warn when a const variable is unused.
-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.
-Wvirtual-inheritance
# Warn on direct virtual inheritance.
-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.