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

David Holmes david.holmes at oracle.com
Sun Feb 16 17:53:02 PST 2014


On 12/02/2014 5:42 AM, 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.

I'd say that's a bug in the checking logic.

But all still good.

Thanks,
David

> 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
>


More information about the hotspot-dev mailing list