I have a suggestion for how to at least partly enable -Werror in the new build. The penalty is slightly longer compile time, but the difference should be negligible.

We split the big java compilation in jdk in two. The first pass with -Werror and all warnings turned on, the second without. We make a list of packages that are passing -Werror and use as include list for the first and exclude list for the second. As you make more packages warning free, we add them to the list.

This solution is not as fine grained as a per package configured set of warning flags, but it's much better than we have today.

/Erik

On 2013-03-08 16:56, Alan Bateman wrote:
On 08/03/2013 15:49, Mike Duigou wrote:
Looks fine to me. Do we have an issue open for restoring warnings to the new build?

Mike

I don't know if there is an issue for that yet but as the new build compiles thousands of classes in a single compilation unit then it means we will need to make significant inroads on the warnings before more can be enabled. The approach with the old build was by area and good progress had been made but with the new build, then it may have to be by warning type as all areas are compiled together.

-Alan.

Reply via email to