Clarify GCC/Clang compiler flags

Added a description for `-pedantic` and clarified similarly to the MSVC section
This commit is contained in:
Jonny Paton
2021-04-15 10:42:32 +01:00
committed by GitHub
parent 1be918f768
commit d7fd0817f5

View File

@@ -101,8 +101,9 @@ You should use as many compilers as you can for your platform(s). Each compiler
### GCC / Clang ### GCC / Clang
`-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic` `-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic` - use these and consider the following (see descriptions below)
* `-pedantic` - Warn on language extensions
* `-Wall -Wextra` reasonable and standard * `-Wall -Wextra` reasonable and standard
* `-Wshadow` warn the user if a variable declaration shadows one from a parent context * `-Wshadow` warn the user if a variable declaration shadows one from a parent context
* `-Wnon-virtual-dtor` warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors * `-Wnon-virtual-dtor` warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors