[8u] RFR: 8246223: Windows build fails after JDK-8227269

Alex Kashchenko akashche at redhat.com
Thu Jun 4 14:02:41 UTC 2020


On 06/04/2020 06:49 AM, Andrew Hughes wrote:
> On 03/06/2020 21:50, Alex Kashchenko wrote:
>> Hi,
>>
>> Please review the fix to JDK-8246223:
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8246223
>>
>> Webrev: https://cr.openjdk.java.net/~akasko/jdk8u/8246223/webrev.00/
>>
>> Problem appeared to be caused by C99 syntax used in JDK-8227269 that is
>> not supported by VS2010 compiler (newer VS versions were not affected).
>>
>> This patch fixes the compatibility of classTrack.c with C89 moving
>> variable declarations to the beginning of corresponding scope blocks.
>>
>> Testing: checked that it can be compiled with VS2010 and newer toolchains.
>>
> 
> I managed to get the same build failure on gcc with
> -Werror=declaration-after-statement. I'll propose a patch to add that to
> the build so we can catch these failures earlier in future.
> 
> It seems VS2010 doesn't conform to either standard exactly. When I first
> tried to build with -std=c89, I got failures due to the use of C++-style
> comments, which VS2010 is allowing.
> 
> Applying your patch fixes the failures and looks good to go.
> Please flag the bug with jdk8u-critical-fix.

Thanks for the review! I've added critical request to the bug.


-- 
-Alex



More information about the jdk8u-dev mailing list