8000 Clarify GCC/Clang compiler flags · FinalBscTeam/cppbestpractices@d7fd081 · GitHub
[go: up one dir, main page]

Skip to content

Commit d7fd081

Browse files
authored
Clarify GCC/Clang compiler flags
Added a description for `-pedantic` and clarified similarly to the MSVC section
1 parent 1be918f commit d7fd081

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

02-Use_the_Tools_Available.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ You should use as many compilers as you can for your platform(s). Each compiler
101101

102102
### GCC / Clang
103103

104-
`-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic`
104+
`-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic` - use these and consider the following (see descriptions below)
105105

106+
* `-pedantic` - Warn on language extensions
106107
* `-Wall -Wextra` reasonable and standard
107108
* `-Wshadow` warn the user if a variable declaration shadows one from a parent context
108109
* `-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

0 commit comments

Comments
 (0)
0