mirror of
https://github.com/cpp-best-practices/cppbestpractices.git
synced 2025-12-17 03:04:36 +03:00
Update 02-Use_the_Tools_Available.md
Add note about implicit-fallthrough with clang vs gcc
This commit is contained in:
@@ -125,6 +125,7 @@ You should use as many compilers as you can for your platform(s). Each compiler
|
|||||||
* `-Wdouble-promotion` (GCC >= 4.6, Clang >= 3.8) warn if `float` is implicit promoted to `double`
|
* `-Wdouble-promotion` (GCC >= 4.6, Clang >= 3.8) warn if `float` is implicit promoted to `double`
|
||||||
* `-Wformat=2` warn on security issues around functions that format output (ie `printf`)
|
* `-Wformat=2` warn on security issues around functions that format output (ie `printf`)
|
||||||
* `-Wlifetime` (only special branch of Clang currently) shows object lifetime issues
|
* `-Wlifetime` (only special branch of Clang currently) shows object lifetime issues
|
||||||
|
* `-Wimplicit-fallthrough` Warns when case statements fall-through. (Included with `-Wextra` in GCC, not in clang)
|
||||||
|
|
||||||
Consider using `-Weverything` and disabling the few warnings you need to on Clang
|
Consider using `-Weverything` and disabling the few warnings you need to on Clang
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user