Skip to content

Commit fdaab39

Browse files
authored
1 parent 3779f86 commit fdaab39

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

02-Use_the_Tools_Available.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,18 @@ You should use as many compilers as you can for your platform(s). Each compiler
9494
* `-Wcast-align` warn for potential performance problem casts
9595
* `-Wunused` warn on anything being unused
9696
* `-Woverloaded-virtual` warn if you overload (not override) a virtual function
97-
* `-pedantic`
97+
* `-Wpedantic` warn if non-standard C++ is used
9898
* `-Wconversion` warn on type conversions that may lose data
9999
* `-Wsign-conversion` warn on sign conversions
100100
* `-Wmisleading-indentation` warn if identation implies blocks where blocks do not exist
101-
101+
* `-Wduplicated-cond` warn if `if` / `else` chain has duplicated conditions
102+
* `-Wduplicated-branches` warn if `if` / `else` branches have duplicated code
103+
* `-Wlogical-op` warn about logical operations being used where bitwise were probably wanted
104+
* `-Wnull-dereference` warn if a null dereference is detected
105+
* `-Wuseless-cast` warn if you perform a cast to the same type
106+
* `-Wdouble-promotion` warn if `float` is implicit promoted to `double`
107+
* `-Wformat=2` warn on security issues around functions that format output (ie `printf`)
108+
102109
Consider using `-Weverything` and disabling the few warnings you need to on Clang
103110

104111

0 commit comments

Comments
 (0)