RFR: Fix shenandoah jdk9 build on Windows

Aleksey Shipilev shade at redhat.com
Tue Feb 27 12:47:26 UTC 2018


On 02/27/2018 12:56 PM, Zhengyu Gu wrote:
> 
> 
> On 02/27/2018 04:09 AM, Aleksey Shipilev wrote:
>> On 02/26/2018 09:22 PM, Zhengyu Gu wrote:
>>> Fixed compilation errors on Windows.
>>>
>>> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/sh-jdk9-build/webrev.00/
>>
>> *) Not very sure this is the right thing to do:
>>
>>     50     _next = *const_cast<ShenandoahStrDedupEntry* volatile*>(&next);
>>
>> It seems to me that the "volatile" is not need in the original cast, so it is just:
>>
>>    50     _next = static_cast<ShenandoahStrDedupEntry* volatile>(next);
>>
>> ?
> That's what it was, VSC 2015 does not like it:
> 
> c:\Users\zhygu\workspace\sh-jdk\src\hotspot\share\gc/shenandoah/shenandoahStrDedupTable.hpp(50) :
> warning C4197: 'ShenandoahStrDedupEntry *volatile ' : top-level volatile in cast is ignored

Ah, I meant removing that superfluous "volatile":
 _next = static_cast<ShenandoahStrDedupEntry*>(next);

Does this also make compiler barf?

-Aleksey




More information about the shenandoah-dev mailing list