Re:Useful GCC warning options not enabled by -Wall -Wextra
by Shorel on Wednesday October 04, 2017 @01:37PM
(#15402306)
I find more useful to make the program also warning free in clang instead of adding such options.
[ Parent
| on HN ]
Re:Useful GCC warning options not enabled by -Wall -Wextra
by jhasse on Wednesday October 04, 2017 @06:45PM
(#15405398)
clang just adds more stuff to -Wextra but you can get most of the warnings in GCC too.
Re:Useful GCC warning options not enabled by -Wall -Wextra
by Shorel on Thursday October 05, 2017 @04:36AM
(#15407541)
It's more than only warnings.
If you code runs fine with two or three different compilers you can also be sure that you don't rely on undefined or compiler specific behaviour.
It's the same reason some multiplatform libraries are extremely battle tested and comparatively bug free when compared to single platform code.