3 ms·
dont you folks believe that some of those should be ON by default?
by tester756 4y ago
dont you folks believe that some of those should be ON by default?
- rwmj 4y agoChanging defaults is hard and I can understand why compiler writers would be reluctant: Many of the suggested warnings will reject valid-but-marginal code that you might not have time to rewrite (or might not be able to, eg. it's in an external library that you don't understand well). Sanitisers and static analysers very often complain about quite valid code that doesn't need to be fixed at all. Some hardening flags cause significant performance regressions. Who is to say that -g3 is the best option? It causes huge binaries to be generated which might not be useful if you have other means to debug the code or can't/don't use gdb.
- mgaunard 4y agoMost of the useful flags are either on by default or do all get enabled with simple meta-flags. It's just that some people never bother to read the docs.
- preseinger 4y agomost of the comments you make on this website are incorrect, this one included do you maybe want to consider taking a step back and re-evaluating your opinions?