RFR: 8030350: Enable additional compiler warnings for GCC
mike.duigou at oracle.com
Wed Dec 18 21:47:53 UTC 2013
On Dec 18 2013, at 05:48 , Dave Pointon <dpointo8 at linux.vnet.ibm.com> wrote:
> Hiya Mike ,
> On Tue, 2013-12-17 at 16:08 -0800, Mike Duigou wrote:
>> For the curious, yes, the additional checks do generate additional warnings. ;-)
>> This change is targeted at the JDK 9 repos but could be backported to JDK 8 fairly easily/safely.
> All dev &/or build environments in which I've worked require that
> compilation is clean i.e. self-evidently no errors and definitely no
> warnings, so if warnings are expected in the build, is there a
> definition/listing of them in order that they (the expected warnings)
> may be safely discounted, thus allowing effort to be concentrated on
> those that are unwanted/unexpected?
No, there is no such list.
Part of the problem is due to the cross-platform nature of the OpenJDK source. For some warnings the only solution would be to duplicate and tweak source to satisfy different compilers. (This is most often seen as warnings for unused parameters or locals).
The second reason is that as we incrementally advance the compiler options used for building OpenJDK previously undisclosed/undetected warnings and errors are encountered. The effort to correct these notices is generally only done on an as-needed basis. This does mean that sometimes warnings go unfixed.
Lastly, practices have historically been somewhat lax, best practices change over time and OpenJDK does suffer from accumulated technical debt. The project has been working diligently for several years to reduce the backlog but on a project this large it has/is taking a sustained effort to reduce it.
Contributions welcome :-),
More information about the build-dev