3 ms·
This! I religiously use clang's -Weverything -Werror. Does it mean I spend more time dealing with false-positives? yes (though honestly, not that much). Does it
by halosghost 11y ago
This! I religiously use clang's -Weverything -Werror. Does it mean I spend more time dealing with false-positives? yes (though honestly, not that much). Does it also mean I end up writing much better code? yes, absolutely.
- blazespin 11y agoIt doesn't take long before you naturally write warning free code. (Which ends up making you a better coder, as well. Such a simple thing..)
- halosghost 11y agoI completely agree. In general, the only warnings I get on my code anymore are ones related to how a library I use does something. In those cases, I surround those particular library calls with no-warn pragmas for that particular warning and then I go about my day. It feels so much cleaner.
- nickpsecurity 11y agoI didn't use a lot of C or C++ but I agree from my limited experience. I noticed the warnings and errors kicked in when I did certain things. They aggravated or worried me. So, I figured out how to not cause them. Some of those became a habit even during my brief stints working in those languages. Same thing happens in other languages with good compilers. Won't stop lazy people from ignoring them but that says more about them than the compiler. ;)