André Pönitz <andre.poen...@mathematik.tu-chemnitz.de> writes: | On Sat, Sep 29, 2012 at 04:53:00AM -0400, Scott Kostyshak wrote: >> I have been thinking about compiler warnings because of the recent >> discussion here: >> http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg175099.html >> >> >From that thread, I have the understanding that some developers think >> it's important to fix warnings, although not if it is risky. I don't >> have much experience programming so I wouldn't be surprised if there's >> something wrong with the following logic: >> >> It seems to me that warnings should either be fixed when they occur or >> just ignored. That is, if a warning is viewed to be a problem, it >> should be fixed right when it's introduced. Or, if it is not viewed as >> a problem, it should just be permanently ignored. I don't see any >> advantage to having warnings sit around. >> >> Thus, I wonder if it would be useful to specify "-Werror" in the >> development build, which would turn all warnings into errors and would >> alert the author to fix them right away. > | And as soon as the next version of a compiler decides to spit out | more warnings (and we know that not all warnings are warranted)
What I know is that almost _all_ warnings _are_ warranted. And even when they are not, you can almost always fixup your code to not give the warning without making the code any uglier/more unclear. | the code base suddenly does not compile anymore, for no good reason, | and people will have to spend time to reconfigure or patch around | the problem, when all they want is just to get a fresh build. We certainly would not put that burden on our users, but for developers testing out new platforms haveing to do a --allow-warnings to configure would imho not be such a bad thing. | There's nothing wrong with keeping a -Werror enabling patch locally, | git makes this extremely easy. But it's nothing that should be on | by default. But we should perhaps have a configure switch for -Werror. Then we can argue later on what should be the default for it. -- Lgb