This Time Self-Hosted
dark mode light mode Search

Importance of warnings

I think I already talked about the importance of warnings while programming, if I didn’t, I surely thought of doing so.

Today, I was reading michkap blog and I found this entry quite interesting (for the one who’re wondering, yeah I don’t feel strange reading MSDN blogs, and in particular michkap’s is mostly focused on Unicode and i18n, topics that I’m quite interest about).

What he says there is true for every reality, not only closed-source proprietary software development; for Gentoo users, this should be simpler to see than for other distributions, as the programs are built in front of users’ eyes, that can easily see the whole lot of warnings some packages outputs.

I try to make sure that my packages has no warnings as this usually means there are less chances that the software will break with newer versions of the compiler, I’ve also sent more than one time patches around just to fix warnings; I even committed to arts sources to fix some of them (and people who knows me are aware that I refrain also from touching arts’s ebuild). Unfortunately there are some people who simply ignore warnings and don’t even try to build their software with -Wextra -pedantic. Too bad 🙁

Oh for people wondering, there’s an option in gcc to suppress warnings’ generation, and it’s -w. If you really don’t care about warnings, you can try to put that in CFLAGS/CXXFLAGS; while I don’t think it would change anything in build speed, it might make the output more pleasant to the eyes, especially joined with -s in MAKEOPTS; but of course this means that you have to remove both if you want to report a bug, as we usually need to see warnings and build output.

Update (2017-04-28): I feel very sad to have found out over a year and a half later that Michael died. The links in this and other posts to his blog are now linked to the archive kindly provided and set up by Jan Kučera. Thank you, Jan. And thank you, Michael.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.