I'm not sure if
-DDEBUG
does anything. I'd recommend adding -D_GLIBCXX_DEBUG
to debug builds to enable container bounds checking. Also -pedantic-errors
(in both) is a good idea to ensure standard compliance. (-pedantc
has the same effect, but gives warnings instead of errors, which doens't matter since you have -Werror
).