You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 02-Use_the_Tools_Available.md
+28-4Lines changed: 28 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -88,15 +88,39 @@ You should use as many compilers as you can for your platform(s). Each compiler
88
88
*`-Wunused` warn on anything being unused
89
89
*`-Woverloaded-virtual` warn if you overload (not override) a virtual function
90
90
*`-pedantic`
91
+
*`-Wconversion` warn on type conversions that may lose data
92
+
*`-Wsign-conversion` warn on sign conversions
93
+
*`-Wmisleading-indentation` warn if identation implies blocks where blocks do not exist
94
+
95
+
Consider using `-Weverything` and disabling the few warnings you need to on Clang
96
+
91
97
92
98
`-Weffc++` warning mode can be too noisy, but if it works for your project, use it also.
93
99
94
100
### MSVC
95
101
96
-
`/W4 /W44640`
97
-
98
-
*`/W4` - All reasonable warnings
99
-
*`/w44640` - Enable warning on thread un-safe static member initialization
102
+
`/W4 /W44640` - use these and consider the following
103
+
104
+
*`/W4` All reasonable warnings
105
+
*[`/w14242`](https://msdn.microsoft.com/en-us/library/3hca13eh.aspx) 'identfier': conversion from 'type1' to 'type1', possible loss of data
106
+
*[`/w14254`](https://msdn.microsoft.com/en-us/library/3fbf7w04.aspx) 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
107
+
*[`/w14263`](https://msdn.microsoft.com/en-us/library/ay4h0tc9.aspx) 'function': member function does not override any base class virtual member function
108
+
*[`/w14265`](https://msdn.microsoft.com/en-us/library/wzxffy8c.aspx) 'classname': class has virtual functions, but destructor is not virtual instances of this class may not be destructed correctly
*[`/we4289`](https://msdn.microsoft.com/en-us/library/06d758c0.aspx) nonstandard extension used: 'variable': loop control variable declared in the for-loop is used outside the for-loop scope
111
+
*[`/w14296`](https://msdn.microsoft.com/en-us/library/wz2y40yt.aspx) 'operator': expression is always 'boolean_value'
112
+
*[`/w14311`](https://msdn.microsoft.com/en-us/library/4t91x2k5.aspx) 'variable': pointer truncation from 'type1' to 'type2'
113
+
*[`/w14545`](https://msdn.microsoft.com/en-us/library/s2xatszb.aspx) expression before comma evaluates to a function which is missing an argument list
114
+
*[`/w14546`](https://msdn.microsoft.com/en-us/library/7be2hd1z.aspx) function call before comma missing argument list
115
+
*[`/w14547`](https://msdn.microsoft.com/en-us/library/y1724hsf.aspx) 'operator': operator before comma has no effect; expected operator with side-effect
116
+
*[`/w14549`](https://msdn.microsoft.com/en-us/library/60yhzzeh.aspx) 'operator': operator before comma has no effect; did you intend 'operator'?
117
+
*[`/w14555`](https://msdn.microsoft.com/en-us/library/k64a6he5.aspx) expression has no effect; expected expression with side-effect
703E
118
+
*[`/w14619`](https://msdn.microsoft.com/en-us/library/tacee08d.aspx) #pragma warning: there is no warning number 'number'
119
+
*[`/w14640`](https://msdn.microsoft.com/en-us/library/4f5c8560.aspx) Enable warning on thread un-safe static member initialization
120
+
*[`/w14826`](https://msdn.microsoft.com/en-us/library/ms235307.aspx) Conversion from 'type1' to 'type_2' is sign-extended. This may cause unexpected runtime behavior.
121
+
*[`/w14905`](https://msdn.microsoft.com/en-us/library/zayh85yw.aspx) wide string literal cast to 'LPSTR'
122
+
*[`/w14906`](https://msdn.microsoft.com/en-us/library/ae10z5cb.aspx) string literal cast to 'LPWSTR'
123
+
*[`/w14928`](https://msdn.microsoft.com/en-us/library/cwck4ta9.aspx) illegal copy-initialization; more than one user-defined conversion has been implicitly applied
0 commit comments