RFR: JDK-8030350 : (s) Enable additional compiler warnings for GCC
erik.joelsson at oracle.com
Wed Feb 12 08:42:19 UTC 2014
Looks good to me.
On 2014-02-11 20:42, Mike Duigou wrote:
> Hello all;
> This is a final update to the previously reviewed changeset. I had to make one slight change in hotspot/src/os/bsd/vm/os_bsd.cpp to accommodate a problem which appeared since this process began.
> This change will be integrated through the jdk9/hs-rt repos.
> From the original review request:
>> This is a change which enables additional compiler warnings for native compilation when using GCC. The (-Wformat -Wformat-security) options are supported by GCC 3.0.4 (the earliest version I checked, c. February 2002) and later so we shouldn't see issues with incompatibility.- Wextra appears to have been added in GCC 3.4.X line (c. 2004) so it should also be reasonably well adopted and replaces -W.
>> The core of the change is to add :
>> -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2
>> for general C and CC++ compilations. For HotSpot C++ compiles a slightly less aggressive set is used:
>> -Wformat=2 -Wno-error=format-nonliteral
>> is used.
>> This change is targeted at the JDK 9 repos but could be backported to JDK 8 fairly easily/safely.
More information about the hotspot-runtime-dev