RFR: JDK-8030350 : (s) Enable additional compiler warnings for GCC

Coleen Phillimore coleen.phillimore at oracle.com
Tue Feb 11 20:53:00 UTC 2014


Still looks good!
Coleen

On 2/11/14 2:42 PM, 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.
>
> http://cr.openjdk.java.net/~mduigou/JDK-8030350/5/webrev/
>
> 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.
>
> Mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20140211/566ba978/attachment.html 


More information about the hotspot-runtime-dev mailing list