Re:Useful GCC warning options not enabled by -Wall -Wextra
by pm215 on Wednesday October 04, 2017 @12:39PM
(#15401754)
There isn't really a single coherent "C/C++ ecosystem", but for your average "build with make" program there isn't really a 'production' vs 'development' build distinction that would be easy to hang this off. (QEMU enables -Werror for builds from a git tree but we had to put a bit of special purpose in our configure script to do that.) You can't tie it to "is this a debug build" because some warnings only appear for optimised builds so ideally you want to have the check for both debug and optimised.
[ Parent
| on HN ]
Re:Useful GCC warning options not enabled by -Wall -Wextra
by boomlinde on Thursday October 05, 2017 @11:38AM
(#15410022)
You could add -Werror to cflags in the makefile on the condition that some release build specific environment variable is set, though just adding separate release/debug/dev targets doesn't seem too tricky.