forked from Barro/compiler-warnings
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwarnings-detail-4.6.txt
288 lines (288 loc) · 11.6 KB
/
warnings-detail-4.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
# enabled by default:
# -Wattributes
# Warn about inappropriate attribute usage
# -Wclobbered
# Warn about variables that might be changed by \"longjmp\" or \"vfork\"
# -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
# -Wempty-body
# Warn about an empty body in an if or else statement
# -Wenum-compare
# Warn about comparison of different enum types
# -Wignored-qualifiers
# Warn whenever type qualifiers are ignored.
# -Wimplicit
# Warn about implicit declarations
# -Wimplicit-function-declaration
# Warn about implicit function declarations
# -Wimplicit-int
# Warn when a declaration does not specify a type
# -Wint-to-pointer-cast
# Warn when there is a cast to a pointer from an integer of a different size
# -Winvalid-offsetof
# Warn about invalid uses of the \"offsetof\" macro
# -Wjump-misses-init
# Warn when a jump misses a variable initialization
# -Wlong-long
# Do not warn about using \"long long\" when -pedantic
# -Wmain
# Warn about suspicious declarations of \"main\"
# -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
# -Wmudflap
# Warn about constructs not instrumented by -fmudflap
# -Wnon-template-friend
# Warn when non-templatized friend functions are declared within a template
# -Wold-style-declaration
# Warn for obsolescent usage in a declaration
# -Woverflow
# Warn about overflow in arithmetic expressions
# -Woverlength-strings
# Warn if a string is longer than the maximum portable length specified by the standard
# -Woverride-init
# Warn about overriding initializers without 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-sign
# Warn when a pointer differs in signedness in an assignment
# -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
# -Wsign-compare
# Warn about signed-unsigned comparisons
# -Wsign-conversion
# Warn for implicit type conversions between signed and unsigned integers
# -Wsync-nand
# Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used
# -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
# -Wunused-but-set-parameter
# Warn when a function parameter is only set, otherwise unused
# -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-parameter
# Warn when a function parameter is unused
# -Wunused-result
# Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value
# -Wunused-value
# Warn when an expression value is unused
# -Wunused-variable
# Warn when a variable is unused
# -Wvla
# Warn if a variable length array is used
-pedantic
# Issue warnings needed for strict compliance to the standard
-Wabi
# Warn about things that will change when compiling with an ABI-compliant compiler
-Waddress
# Warn about suspicious uses of memory addresses
-Waggregate-return
# Warn about returning structures, unions or arrays
-Wall
# Enable most warning messages
-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
-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++
-Wc++0x-compat
# Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x
-Wcast-align
# Warn about pointer casts which increase alignment
-Wcast-qual
# Warn about casts which discard qualifiers
-Wchar-subscripts
# Warn about subscripts whose type is \"char\"
-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
-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
-Wendif-labels
# Warn about stray tokens after #elif and #endif
-Wextra
# Print extra (possibly unwanted) warnings
-Wfloat-equal
# Warn if testing floating point numbers for equality
-Wformat
# 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-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
-Wformat-zero-length
# Warn about zero-length formats
-Wformat=
-Wframe-larger-than=<number>
# Warn if a function's stack frame requires more than <number> bytes
-Wimport # IGNORED switch
-Winit-self
# Warn about variables which are initialized to themselves
-Winline
# Warn when an inlined function cannot be inlined
-Winvalid-pch
# Warn about PCH files that are found but not used
-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-braces
# Warn about possibly missing braces around initializers
-Wmissing-declarations
# Warn about global functions without previous declarations
-Wmissing-format-attribute
# Warn about functions which might be candidates for format attributes
-Wmissing-include-dirs
# Warn about user-specified include directories that do not exist
-Wmissing-noreturn
# Warn about functions which might be candidates for __attribute__((noreturn))
-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
-Wnonnull
# Warn about NULL being passed to argument slots marked as requiring non-NULL
-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
-Wparentheses
# Warn about possibly missing parentheses
-Wpointer-arith
# Warn about function pointer arithmetic
-Wredundant-decls
# Warn about multiple declarations of the same object
-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++)
-Wselector
# Warn if a selector has multiple methods
-Wsequence-point
# Warn about possible violations of sequence point rules
-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
-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=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
# Warn about enumerated switches, with no default, missing a case
-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
-Wunknown-pragmas
# Warn about unrecognized pragmas
-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
# Enable all -Wunused- warnings
-Wunused-macros
# Warn about macros defined in the main file that are not used
-Wvariadic-macros
# Do not warn about using variadic macros when -pedantic
-Wvolatile-register-var
# Warn when a register variable is declared volatile
-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.